Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Newbie question  (Read 3558 times)

0 Members and 1 Guest are viewing this topic.

wickedmoon

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Wicked Moon
Newbie question
« 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?
Logged

Nibbler

  • Guest
Re: Newbie question
« Reply #1 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.
Logged

wickedmoon

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Wicked Moon
Re: Newbie question
« Reply #2 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?
Logged

Nibbler

  • Guest
Re: Newbie question
« Reply #3 on: September 19, 2004, 02:20:24 am »

I think this thread could get you close.
Logged

wickedmoon

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Wicked Moon
Re: Newbie question
« Reply #4 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);
Logged

wickedmoon

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Wicked Moon
Re: Newbie question
« Reply #5 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?
Logged

Nibbler

  • Guest
Re: Newbie question
« Reply #6 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($rate0); else $rate max($rate1);.

You can set rating permissions on the groups page.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.