PDA

View Full Version : Ratings Addon Version 1.3


Rob
05-06-2005, 06:24 PM
The latest version of the rating addon is at http://www.shiftedexposure.com/ratings_13.zip

Changes include statistics in the Admin|Addons page and hopefully a solution to web robots like Yahoo voting for your photos.

Let me know how it works for you.

raminia
05-06-2005, 08:13 PM
I'll upgrade right away, but how could I know yahoo is voting for me?

raminia
05-06-2005, 08:15 PM
and what's overlib? something new?

Rob
05-06-2005, 08:19 PM
Some people noticed in their logs that the Yahoo web crawler was rating photos. I had noticed it too with my photos getting rated 1 (first link). Of course, none of my pictures are that bad ;)

Overlib brings up nice popup windows. See my site, I use it for the main image (semi-transparent) and for the ratings. That is the best way to explain it :D

raminia
05-06-2005, 08:31 PM
ThNX , I'll try it later on:)

raminia
05-06-2005, 08:47 PM
BTW, I'm running my pblog at a subdomain pblog.raminia.com which is also available from www.raminia.com/pblog , what should I do for robot.txt?

Rob
05-06-2005, 08:49 PM
BTW, I'm running my pblog at a subdomain pblog.raminia.com which is also available from www.raminia.com/pblog , what should I do for robot.txt?Add /pblog to the start of each Disallow:

steff
05-06-2005, 09:26 PM
stats aren't working for me, error:


Access denied for user: 'steff@localhost' to database 'my_steff'


anyway the rating system works as before :)

my system information:


Host Information
PHP-version 4.3.11 (Pixelpost's min requirement: PHP version 4.3.0)

MySQL version 4.0.24-standard-log (Pixelpost's min requirement: MySQL 3.23.58)

GD-lib bundled (2.0.28 compatible) with JPEG support

Server software Apache

EXIF Pixelpost is using exifer v1.5 for EXIF information.

Paths
Guessed imagepath: /var/www/html/images/

Configured Imagepath ../images/

Image Directory: OK - Can we write to the directory? YES.

Thumbnails Directory: OK - Can we write to the directory? YES.

Language Directory: OK

Addons Directory: OK

Includes Directory: OK

Templates Directory: OK
[/code]

martinhruda
05-06-2005, 09:36 PM
ain't workin' for me neither, showing up the same error

Rob
05-08-2005, 02:14 PM
ain't workin' for me neither, showing up the same errorWhat other addons are you running? I use the exisiting database connection, so I expect another addon is messing up the database connection.

steff
05-08-2005, 06:28 PM
i'm using the 1.4 addons, and:

Visits Today (visits_today.php - version 0.1)
Pixelpost Stats (stats.php - version 0.1)
Pixelpost Search (search_addon.php - version 1.0) not used (no time to make it work)
Code generator for robot (increase_stats.php - version 0.1)
Pixelpost Photo Rating (ratings.php - version 1.3)

Joe[y]
05-08-2005, 07:08 PM
to save time steff try temporarily removing each one of those addons you listed from your server (you can keep a copy saved on your computer) and each time check to see if the error goes. that way you can narrow down which addon is messing things up.

steff
05-08-2005, 09:58 PM
I deleted all non-1.4 addons, and got the same error :(

Rob
05-08-2005, 09:59 PM
I deleted all non-1.4 addons, and got the same error :(Could you delete the 1.4 addons too please. I don't guarantee they all work perfectly either ;)

steff
05-08-2005, 10:38 PM
ok, i did delete *all* addons except rating_star, and nothing changed! :lol:

the only difference from your site could be I did a clean 1.4 install and then 1.4.1 upgrade, maybe you upgraded from 1.3... got no idea

Rob
05-09-2005, 03:30 AM
So the ratings do work, but the admin panel doesn't? :(

In MySQL 4.0.2, a new privilege was added, CREATE TEMPORARY TABLES. I use temporary tables to generate the stats. If you can grant that privilege to your user on that database, then it will start working.

Otherwise, the workaround is to not use temporary tables by removing the word TEMPORARY from line 135 of ratings.php. This isn't ideal, but will work fine if you are the only person who logs into the admin area.

I guess I will have to modify the script to do this automatically if you don't have the proper permissions, although you should have them. You can create tables, why shouldn't you be able to create temporary tables ;)

steff
05-13-2005, 09:02 AM
thanks :) now it works...
nice stats! :)

Rob
05-13-2005, 12:41 PM
thanks :) now it works...
nice stats! :)Which did you do? GRANT or modify the query?

steff
05-13-2005, 06:12 PM
oooops, sorry, I deleted the TEMPORARY keyword

(i can't grant privileges)

steff
05-30-2005, 12:53 PM
in my blog, the most rated photos of all is "Tramonto in Valdifiemme" with 123 votes, but this number replies in the following 4 photos, which doesn't have such a high number of votes


5 Most voted on photos Tramonto in Valdifiemme rated 4.89 with 123 votes
Elvis guarda... rated 3.7 with 123 votes
Magnolie rated 3.5 with 123 votes
Una statuina rated 3.33 with 123 votes
Gatto rated 4 with 123 votes

bexpress
06-10-2005, 02:53 PM
Hello! Is it possible to modify this slightly, so that an email is sent to me whenever a photo is rated, so that I don't have to check my admin panel? And also tell me which one was rated in the email? I'm guessing it would act similarly to the way it works with comments?

ie. ________ was rated with __ stars on ______ .

Any advice would be awesome!

davidm
06-29-2005, 01:43 PM
I am new to pixelpost, and I love the idea of the rating addon, but I fail to understand what I need to do for it to work...

Here is what I did :
- I copied ratings.php in the /addons folder
- I copied the overlib folder at the root (then, tried to place it in /includes)
- I copied the img folder at the root (not sure there)

If I understand the way pixelpost works, I probably need to call the addon with a tag I have to insert in my template (or some code, maybe). That's the thing, I don't know what I am supposed to add for this to work. There's no text file explaining this, and it's the first addon I am installing.

Please bear with me and give me some help !
Thanks,

David

steff
06-29-2005, 09:44 PM
just insert, in your image_template.html file, the following code:

<div>rate this image:<IMAGE_RATING_STARS></div>


cheers :)

davidm
06-29-2005, 09:55 PM
Thanks Steff !
Works like a charm.

PixelPost is really great, and this rating addon is really cool, but how was I supposed to find the info ?

If I want to find out the same thing for other addons... I might have missed something, but I didnt find the info where I usually get them (though I know quite a bit about CMS's...).

Is there some place this is documented ???

reflejandome
06-30-2005, 07:37 PM
i cann't dowload the addon, is there another alternate site ?? thx

steff
07-01-2005, 01:10 PM
Is there some place this is documented ???

yes, in the ratings.txt file which is into the zip file of the addon ;)

you can add more tags, ie:


4. Add the template tag <IMAGE_RATING_STARS> to your image_template.html where you want the 5 stars to appear. You can also use the tags <IMAGE_RATING> for the rating as a number and <IMAGE_VOTES> for the number of votes.

davidm
07-01-2005, 01:22 PM
Well I had no ratings.txt in the zip file, just checked it...

Would have noticed a txt file, since I was looking for one :p

steff
07-01-2005, 01:46 PM
I swear i had it! :P

here it is:


Ratings Addon v1.2
------------------

Rob Prouse - rob@prouse.org
http://www.shiftedexposure.com

History
-------

1.0 - Initial Release
1.1 - Changed rating to 'Unrated' from '-' for unrated photos
- When you mouse over a star, all stars to the left change
to the mouseover state to indicate what you will be voting.
- Removed the need to modify the <body> tag and the need for
the javascript file.
- Added circular stars as an option. PSD is included if you
want to modify it.
1.2 - Fixed HTML to make it compliant
- Added the overlib library for better mouse-overs. For more
information on the overlib library, go to
http://www.bosrup.com/web/overlib/
- You can now vote more than once for a photo, but now only
your last vote counts.
- Improved the stars images and included the PSD file so that
you can change the background colour.

About
-----

Gives each of your photos a 5 star rating. Users just have to click on
a star to rate your photo. It only allows one rating per person per
picture. Hovering over any of the stars will give the current rating
for that photo.

TODO
----

I want to add tags to display links to the top rated and most voted on
photos. If you have other ideas, let me know.

Install
-------

1. Unzip everything which I assume you did because you are reading this :D
2. Copy the img/ directory with the photos to the root of your pixelpost
install. There are three images that look best on a white or light
background. Feel free to replace them with other 12x12 images that work
better for your site. I have included stars in the shape of dots in
img/dots along with the PSD file if you want to modify it for your background
colours. You will also find the PSD for the default stars in img/stars. If you
create other stars, please email them to me at rob@prouse.org to include in
future releases.
3. Copy addons/ratings.php to your addons directory.
4. Add the template tag <IMAGE_RATING_STARS> to your image_template.html where you want
the 5 stars to appear. You can also use the tags <IMAGE_RATING> for the rating as
a number and <IMAGE_VOTES> for the number of votes.

You are done unless you want to use the overlib library for rollovers. If you do,
continue reading;

5. Copy the directory overlib/ to the root of your pixelpost install. This is the
javascript for the image rollovers.
6. If you want to use overlib, edit your image_template.html and add the following
line in the <head> section of the template;

<script type="text/javascript" src="overlib/overlib.js"></script>

7. Now add the following line right after the <body> tag;

<div id="overDiv" align="left" style="position:absolute; visibility:hidden; z-index:1000;"></div>

8. Now edit addons/rating.php and remove the // from the front of the following line;

//$use_overlib = true;

The database table will be created the first time you access the addon.

davidm
07-01-2005, 03:09 PM
Thanks a lot for this.
The download link is dead now, so it helps...

I notice one thing : your txt reads "Ratings Addon v1.2", maybe it was omitted in v1.3 which I downloaded...

reflejandome
07-02-2005, 08:08 PM
i posted the same problem but noone help me :(

steff
07-03-2005, 07:43 PM
please read in the forum! this temporary link has been already posted widely

http://www.pixelpost.org/v1/

reflejandome
07-04-2005, 07:45 AM
yes, but it is version 1.2, and there is a 1.3 version that solves the web-spiders problems ..........

reflejandome
07-11-2005, 11:29 AM
i try 1.3 version and i have the same problem with spider-web, particulary with yahoo ............

bexpress
07-18-2005, 03:11 AM
Any thoughts yet on a possible email-notification of a rating being given for a pic? Just bumping my question from page 2. Any help would be awesome!

anela
07-29-2005, 05:54 AM
I've looked around the forums for this a couple of times, but am just now getting around to asking about it...

Is there a way to make the temporary tables more permanent and be able to display the rating stats that are in the admin panel on a page of the photoblog?

Thanks :)

JaviMartín
06-05-2006, 09:36 PM
I've looked around the forums for this a couple of times, but am just now getting around to asking about it...

Is there a way to make the temporary tables more permanent and be able to display the rating stats that are in the admin panel on a page of the photoblog?

Thanks :)


Uppp... i'm very interested in this aspect. There is a way to know the last votes recived??

Thanks a lot

JaviMartín
06-28-2006, 12:43 PM
Uppp... i'm very interested in this aspect. There is a way to know the last votes recived??

Thanks a lot


Any idea yet??...

JaviMartín
07-01-2006, 09:44 AM
Hi!

I have a problem. When i see de statistics in my pixelpost administrator page, in the section "your most voted photos", it is an error, because all the photos are with 7 votes(and only the one most voted has 7 votes).

Anyone knows how to fix it?

Thanks a lot

My photogallery: http://javimartin.info

kalle
07-06-2006, 09:18 PM
Hi,

I just installed pixelpost 1.5 today since I just got so much spams... anyway so I re-installed several of my add-ons as well. One thing that I had problems before with was spider-rating. I changed the code and also added another column in the database so one can easily see what agents was used to do the rating.

I have also created several small addons that displays most rated pictures, highest rated etc. Take a look at my photoblog, http://www.yelloworb.com/photoblog/index.php?x=about#popular

I'm happy to share these mods with ppl, though Iäm not really familiar how to do that, just put them online and post the link here?

Also someone asked for getting a mail each time someone casts a vote, I believe I could quite quickly also add that into a modded ratings addon. Please get back with some more information of how you like to see that done.

JaviMartín
07-27-2006, 11:32 AM
Hi,

I just installed pixelpost 1.5 today since I just got so much spams... anyway so I re-installed several of my add-ons as well. One thing that I had problems before with was spider-rating. I changed the code and also added another column in the database so one can easily see what agents was used to do the rating.

I have also created several small addons that displays most rated pictures, highest rated etc. Take a look at my photoblog, http://www.yelloworb.com/photoblog/index.php?x=about#popular

I'm happy to share these mods with ppl, though Iäm not really familiar how to do that, just put them online and post the link here?

Also someone asked for getting a mail each time someone casts a vote, I believe I could quite quickly also add that into a modded ratings addon. Please get back with some more information of how you like to see that done.


Hi Kalle,

i was the one that asked for an advisor each time someone rate a photo on my photoblog.

About the info dispalyed... something basic is enought. Only the numer of votes the rating, and the photo rated, If its possible also the name of the person. And i really don't mind if the advise is by e-mail or throught the pixelpost administrator panel.

Thanks a lot.

P.D. My photoblog is: http://javimartin.info

aptass
04-23-2007, 07:44 PM
Hi

I'm having two minor things with this great mod, perhaps someone is able to help me.

I have tried to add <IMAGE_RATING_STARS> to comment_template.html.
Works fine but if someone vote, you will be redirected to the related index.php?showimage=imagenumber in the comment window.
Is it possible to not have this behavior?

And my second little thing. The row of stars always ends up with a linebreak.
So If I try to add <IMAGE_RATING_STARS> in a navigational row, I will get the ratingbar one row below. Is it possible to force the ratingmod not to switch rows.

I've checked the source for both my small requests, but I lack any phpskills to work it out.

klimin_a_s
07-03-2007, 08:17 AM
Nice addon! Thank you!

I have just installed it, works great!

But I have to make some modifications for enabling bilingual feature. You can improve future versions of your addon, if you want...

Instruction:

1. Open file /addons/ratings.php
Find
$mouse_in .= "return overlib('Currently rated $rating with $votes', CAPTION, 'Rate This Image $i/5', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', LEFT, ABOVE );";{
Replace with
if ( strtolower($_GET['lang'])==strtolower($PP_supp_lang[$cfgrow['langfile']][0])) {
$bilingual_method = 'DEFAULT'; //get==default lang
} else {
if ( strtolower($_GET['lang'])==strtolower($PP_supp_lang[$cfgrow['altlangfile']][0])) {
$bilingual_method = 'ALT'; //get==alt lang
} else {
if ( strtolower($_COOKIE['lang'])==strtolower($PP_supp_lang[$cfgrow['langfile']][0])) {
$bilingual_method = 'DEFAULT'; //get=='' and cookie==default lang
} else {
if ( strtolower($_COOKIE['lang'])==strtolower($PP_supp_lang[$cfgrow['altlangfile']][0])) {
$bilingual_method = 'ALT'; //get=='' and cookie==alt lang
} else {
$bilingual_method = 'DEFAULT'; //get=='' and cookie=='' (default lang)
}
}
}
}

switch ($bilingual_method)
{
case 'DEFAULT':
$mouse_in .= "return overlib('Currently rated $rating with $votes', CAPTION, 'Rate This Image $i/5', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', LEFT, ABOVE );";
case 'ALT':
$mouse_in .= "return overlib('(ALT TEXT) ......', CAPTION, '(ALT TEXT) ......', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', LEFT, ABOVE );";
}


Replace (ALT TEXT)...... with your ALTERNATIVE-text.

Ubbe
08-09-2007, 12:21 PM
Hey - this is a great addon - even though the new fancy ajax edition has come.

Anyway my question is, how can I remove some of the decimals on the <IMAGE_RATING> so that I get 4.0 in rating insted of 4.00 ??

BR
Ubbe

ranmajen
06-16-2008, 08:06 AM
I have installed this addon but nothing has been shown on the image page. How to fix it?