Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: 1 2 [3]

Author Topic: [ADDON] Article Rating [sNews 1.5]  (Read 27572 times)

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #30 on: December 19, 2007, 08:28:24 PM »

I am using sNews 1.6 and i like your Star Rating Article but friend some thing i don't remember

there is a rate.php code:
// User settings. //
Ok, briefly:-
Quote
$sNews_rate_dir ='rate/';   // location of this script.
Above, you enter the directory/folder name where you have placed this script, in relation to snews.php.
Quote
$sNews_rate_dir_images = 'gnomes/';  //name of directory with the image set to use in it.
The above is the directory name of the directory with the images (stars or whatever)
Quote
$sNews_rate_image_prefix = 'gnomes-';  // name your images with a prefix, (eg, star_ for star_00.png). Allows you to swap image set quickly.
This one is the prefix on the image names. If your images don't have a prefix, then leave it blank -- use 2 apostrophes like  ''
Quote
$sNews_rate_rank_descriptor = "gnome"; // describes the means of voting... eg, stars, bullet, houses... whatever the images imply
This one is what the viewer sees. For eg- This article has a 3 gnome rating
Quote
you notice in this above code some area are in red color. so please tell me what will i replace in these palaces

Sorry my enlish is not well

Thank you
« Last Edit: December 19, 2007, 08:30:02 PM by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

azad

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #31 on: December 20, 2007, 05:12:53 AM »

thank you for help friend.

==============rater.php code==================
// User settings. //
$sNews_rate_dir ='rater/';   // location of this script.
$sNews_rate_dir_images = 'img/';  //name of directory with the image set to use in it.
$sNews_rate_image_prefix = 'star_00, star_05, star_1, star_15, star_2, star_25, star_3, star_35, star_4, star_45, star_5';  // name your images with a prefix, (eg, star_ for star_00.png). Allows you to swap image set quickly.
$sNews_rate_rank_descriptor = "stars"; // describes the means of voting... eg, stars, bullet, houses... whatever the images imply
==============rater.php code==================
==============snews.php code==================
                        case ($tag != 'readmore' && $tag != 'comments' && $tag != 'edit'): echo $tag; break;
                     }
/*rating script -- */      }$sNews_rate_id=$r['id'];$sNews_item_name=$r['title'];$rated="true";include("rating/rating.php"); ///place rated articles here.
                  }
==============snews.php code==================


friend i was made a folder on root directory called rater there i create a file name rater.php and here i create a folder name img for image.

directory:
index.php
snews.php
images/all images
rater/rater.php
rater/img/11 images of stars

waiting for quick and kindly reply  ::)
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #32 on: December 20, 2007, 09:46:41 AM »

Quote
$sNews_rate_image_prefix = 'star_00, star_05, star_1, star_15, star_2, star_25, star_3, star_35, star_4, star_45, star_5';  // name your images with a prefix, (eg, star_ for star_00.png). Allows you to swap image set quickly.
From this I am assuming that your images are named star_00.gif or star_00.jpg or star_00.png.

So, for this eg, I will assume it is jpg (change as required).
You will need to name the images like this.
star_00.jpg
star_05.jpg
star_10.jpg
star_15.jpg
star_20.jpg
star_25.jpg
star_30.jpg
star_35.jpg
star_40.jpg
star_45.jpg
star_50.jpg

On the code line above, make it like
Quote
$sNews_rate_image_prefix = 'star_';
... and I think that would just about do it...
Logged
Of all the things I have lost, it is my mind that I miss the most.

azad

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #33 on: December 25, 2007, 05:19:50 AM »

thank you friend

yeah my images names are like star_00.jpg

tell me i was add my rather.php and snews.php code with images name, is that correct

==============rater.php code==================
// User settings. //
$sNews_rate_dir ='rater/';   // location of this script.
$sNews_rate_dir_images = 'img/';  //name of directory with the image set to use in it.
$sNews_rate_image_prefix = 'star_00, star_05, star_1, star_15, star_2, star_25, star_3, star_35, star_4, star_45, star_5';  // name your images with a prefix, (eg, star_ for star_00.png). Allows you to swap image set quickly.
$sNews_rate_rank_descriptor = "stars"; // describes the means of voting... eg, stars, bullet, houses... whatever the images imply
==============rater.php code==================
==============snews.php code==================
                        case ($tag != 'readmore' && $tag != 'comments' && $tag != 'edit'): echo $tag; break;
                     }
/*rating script -- */      }$sNews_rate_id=$r['id'];$sNews_item_name=$r['title'];$rated="true";include("rating/rating.php"); ///place rated articles here.
                  }
==============snews.php code==================

you are so friendly and honest.
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #34 on: December 26, 2007, 05:14:20 AM »

it is important that the images have 2 digits.

for one star, image to be named star_10.jpg
for two star, image to be named star_20.jpg
...etc

the prefix in this case is  star_ and that is all that goes into $sNews_rate_image_prefix
that is,
 $sNews_rate_image_prefix='star_';
Logged
Of all the things I have lost, it is my mind that I miss the most.

snews4me

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #35 on: July 09, 2010, 09:45:20 AM »

Does anyone know if this works in v1.7 ?

If so is there an install guide or step for step instructions ?

Much appreciated :)
Logged

Charles

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #36 on: July 31, 2012, 04:50:35 AM »

Version 1.00

Some graphic sets can be downloaded from my site... http://www.fiddlenfolk.com/downloads/downloads/
Updates:~
Tweaked instructions -- no code change


Hello Everyone;

Would like to implement this addon to v1.7MU. Does anyone have any "graphic sets"? (the link is not working.)

TIA.
Logged

walkie

  • Newbie
  • *
  • Karma: 0
  • Posts: 16
  • sNews lover <3
    • Jaded.dk
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #37 on: July 31, 2012, 01:42:21 PM »

Version 1.00

Some graphic sets can be downloaded from my site... http://www.fiddlenfolk.com/downloads/downloads/
Updates:~
Tweaked instructions -- no code change


Hello Everyone;

Would like to implement this addon to v1.7MU. Does anyone have any "graphic sets"? (the link is not working.)

TIA.

Hi Charles and welcome,

You can use this one :)

http://jaded.dk/ratings.gif - just don't use the url, as i'll be removing it again when you've got it.


GL implementing it :)
Logged

Charles

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
Re: [ADDON] Article Rating [sNews 1.5]
« Reply #38 on: July 31, 2012, 07:24:41 PM »

Got it... Thank you.
Logged
Pages: 1 2 [3]