forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: wickedmoon on September 19, 2004, 01:42:54 am

Title: Newbie question
Post by: wickedmoon on September 19, 2004, 01:42:54 am
I've been looking for an image ranking script and Coppermine seems to fit the bill, except for one small thing. I was looking for a ranking system that worked similar to sites like http://www.ratepic.com. Here you get a row of 10 radio buttons, marked one to ten, which you click to rank the picture. I didn't see anything like this in the demo?

Also, I know Coppermine has an e-card option, but I already use an e-card script, so wondered how easy it would be to link the two. All I'd need is the URL of my e-card script inserted as a prefix to the full URL of the image, as stored in Coppermine. I'm assuming this is going to be quite easy to set up?
Title: Re: Newbie question
Post by: Nibbler on September 19, 2004, 01:50:11 am
Changing the ratings would be fairly easy, and I seem to remember seeing a post somewhere about using a third party ecard script.
Title: Re: Newbie question
Post by: wickedmoon on September 19, 2004, 02:09:18 am
Changing the ratings would be fairly easy, and I seem to remember seeing a post somewhere about using a third party ecard script.

I found the post about ecards, thanks.

Has anyone tried changing the ranking system yet? If not, how might it be done?
Title: Re: Newbie question
Post by: Nibbler on September 19, 2004, 02:20:24 am
I think this (http://forum.coppermine-gallery.net/index.php?topic=7519.0) thread could get you close.
Title: Re: Newbie question
Post by: wickedmoon on September 19, 2004, 02:42:00 am
Looks straight forward. On the first piece of code that needs replacing, I notice they don't add an extra table cell, but rename existing attributes instead. For 10 rating buttons, will it be as simple as to add more table cells, eg:

Code: [Select]
      <td class="tableb_compact" width="17%" align="center"><a href="{RATE1}" title="{RUBBISH}"><img src="images/rating0.gif" alt="{RUBBISH}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE2}" title="{POOR}"><img src="images/rating1.gif" alt="{POOR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE3}" title="{FAIR}"><img src="images/rating2.gif" alt="{FAIR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE4}" title="{GOOD}"><img src="images/rating3.gif" alt="{GOOD}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE5}" title="{EXCELLENT}"><img src="images/rating4.gif" alt="{EXCELLENT}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE6}" title="{GREAT}"><img src="images/rating5.gif" alt="{GREAT}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE7}" title="{...}"><img src="images/rating6.gif" alt="{...}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE8}" title="{...}"><img src="images/rating7.gif" alt="{...}" border="0" /><br /></a></td>
etc etc..

When editing ratepic.php, would the following suffice, or so I need to change "$rate, 1" to something else too?

Code: [Select]
$rate = min($rate, 10);
$rate = max($rate, 1);
Title: Re: Newbie question
Post by: wickedmoon on September 19, 2004, 02:43:44 am
I didn't see it on the demo, but once I've got this ranking system set up, can it be made to appear beneath every image, for guests and members alike?
Title: Re: Newbie question
Post by: Nibbler on September 19, 2004, 02:47:17 am
The min statement sets the maximum rating that is accepted, and the max sets the minimum that is accepted. So it depends if you want people to be able to rate 0 then use $rate = max($rate, 0); else $rate = max($rate, 1);.

You can set rating permissions on the groups page.