coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: machiga on February 15, 2006, 02:01:03 PM

Title: Display the rating on thumbails page ?
Post by: machiga on February 15, 2006, 02:01:03 PM
Hello,
I would like to know if it possible to display the rate (or number of vote) on thumbnails page ?
On the config > Thumbnail View, I have :  Display number of views below the thumbnail (Yes/No),  Display number of comments below the thumbnail(Yes/No), etc...
There nothing about Rating (and I found nothin on Faq and Forum)... is there a technique ?
Thank you very much and have a great day !

Best Regards,
Machiga
Title: Re: Display the rating on thumbails page ?
Post by: machiga on February 17, 2006, 06:50:41 PM
Up up my dear little post.

Nobody can't help me ? I just would like to display the rating of a picture on thumbnails page. Then we can se if one picture was rated (by their number of stars or just some words like "2 votes")
Thank you very much.

Best Regards,
Machiga
Title: Re: Display the rating on thumbails page ?
Post by: machiga on February 20, 2006, 05:11:59 PM
Nobody can't really help me ?
I'll try to explain precisely what I want.
On my thumbnails page (where I have 20 photos / page), I would like to display the number of votes (and stars) like we can see on top rated page.

Is it possible to do that ?
If yes, how can we do that ? (I can't find a way... )

Thank you very much.
Best Regards,
Machiga
Title: Re: Display the rating on thumbails page ?
Post by: Joachim Müller on February 20, 2006, 10:06:37 PM
http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#lamesupport
Title: Re: Display the rating on thumbails page ?
Post by: machiga on February 21, 2006, 06:49:51 AM
Sorry about that...
I'll be patient
Title: Re: Display the rating on thumbails page ?
Post by: Joachim Müller on February 21, 2006, 06:56:13 AM
Items 2 and 5 apply for your question.
Title: Re: Display the rating on thumbails page ?
Post by: Abbas Ali on February 21, 2006, 08:19:14 AM
Edit include/functions.inc.php

Replace (in function get_pic_data) around line 939


if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name;


with


if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name,pic_rating,votes';


then just few lines below it Replace


if ($set_caption) build_caption($rowset);


with


if ($set_caption) build_caption($rowset, array('pic_rating'));



P.S: With some more coding this can be done as config settable option like others are.


Abbas
Title: Re: Display the rating on thumbails page ?
Post by: Joachim Müller on February 21, 2006, 09:18:02 AM
@Abbas: good work, I added a reminder to the appropriate board so that your idea doesn't get forgotten, see http://forum.coppermine-gallery.net/index.php?topic=28206.0
Title: Re: Display the rating on thumbails page ?
Post by: Abbas Ali on February 21, 2006, 09:31:15 AM
Thanks Joachim :)
Title: Re: Display the rating on thumbails page ?
Post by: machiga on February 21, 2006, 09:40:00 AM
Ok Gaugau, but sorry again, because I was sad to see my post goes on second/third page. I'm not really familiar with forum :/

Anyway Abbas Ali, I made the change that you proposed and your code works great !
Thank you very much !

Thank you everybody and good luck for the next release :)

++
machiga

edit : hum I can't find the "solved button"  ;D
Title: Re: Display the rating on thumbails page ?
Post by: Joachim Müller on February 21, 2006, 09:49:19 AM
threads are being sorted by date - currently your thread is on the first page. You can't mark a thread as solved, only moderators can. However, you can reply to your threads saying that they are solved just as you did. I marked the thread accordingly for you.
Title: Re: Display the rating on thumbails page ?
Post by: machiga on February 21, 2006, 09:57:44 AM
Oki, thanks again :)