Newbie question Newbie question
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Newbie question

Started by wickedmoon, September 19, 2004, 01:42:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wickedmoon

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?

Nibbler

Changing the ratings would be fairly easy, and I seem to remember seeing a post somewhere about using a third party ecard script.

wickedmoon

Quote from: 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.

I found the post about ecards, thanks.

Has anyone tried changing the ranking system yet? If not, how might it be done?

Nibbler

I think this thread could get you close.

wickedmoon

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:


      <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?


$rate = min($rate, 10);
$rate = max($rate, 1);

wickedmoon

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?

Nibbler

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($rate0); else $rate max($rate1);.

You can set rating permissions on the groups page.