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: Rating pics - how to change the supported extension?  (Read 6038 times)

0 Members and 1 Guest are viewing this topic.

Roi Danton

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 33
    • Tahun
Rating pics - how to change the supported extension?
« on: October 27, 2005, 05:11:37 pm »

I've added the line define('THEME_HAS_RATING_GRAPHICS', 1); to my theme to use my own rating graphics. Unfortunately this function only supports the files ratingX.gif but the graphics I'm using are only available in PNG format (the pics have the format png-24, in gif format they have poor quality).

So where can I change the supported extensions?
« Last Edit: October 27, 2005, 09:24:07 pm by GauGau »
Logged
Style Tahun for cpg --> review

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Rating pics - how to change the supported extension?
« Reply #1 on: October 27, 2005, 06:11:20 pm »

function get_pic_data() in functions.inc.php , few lines below case 'toprated':
and in theme.php ... search for $template_image_rating

Roi Danton

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 33
    • Tahun
Re: Rating pics - how to change the supported extension?
« Reply #2 on: October 27, 2005, 06:26:35 pm »

Thanks.

If someone else is interested to change it, too ... additional to the things Stramm mentioned you also have to change the name/extension in the function html_picinfo() (file displayimage.php).

Solved.

(To devs: Maybe you can change this in further versions ... so that the path is defined within the theme).
Logged
Style Tahun for cpg --> review

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Rating pics - how to change the supported extension?
« Reply #3 on: October 27, 2005, 06:59:26 pm »

Already done for 1.4.x.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Roi Danton

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 33
    • Tahun
Re: Rating pics - how to change the supported extension?
« Reply #4 on: June 27, 2006, 11:26:48 am »

No, it isn't done ;) :

displayimage.php
in html_picinfo()
Code: [Select]
$info[sprintf($lang_picinfo['Rating'], $CURRENT_PIC_DATA['votes'])] = '<img src="' . $prefix . 'images/rating' . round($CURRENT_PIC_DATA['pic_rating'] / 2000) . '.gif" align="middle" alt="" />'.$detailsLink;

functions.inc.php
Some lines below function build_caption(&$rowset,$must_have=array())
Code: [Select]
$caption .= "<span class=\"thumb_caption\">".'<img src="'.$prefix.'images/rating'.round($row['pic_rating']/2000).'.gif" alt=""/>'.'<br />'.sprintf($lang_get_pic_data['n_votes'], $row['votes']).'</span>';
In both there is still only .gif as available extension and you have to replace it manually with png.

Btw, "Solved" status should be removed and the thread could be moved to cpg1.4 Support Forums b/c this issues is still present in v1.4.x (I'm using 1.4.8 ).
« Last Edit: June 28, 2006, 01:36:24 am by Roi Danton »
Logged
Style Tahun for cpg --> review
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.