Advanced search  

News:

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

Pages: 1 [2]   Go Down

Author Topic: Add all pictures/files from a particular album to your favorites  (Read 36399 times)

0 Members and 1 Guest are viewing this topic.

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Add all pictures/files from a particular album to your favorites
« Reply #20 on: March 02, 2010, 09:09:06 am »

thanks a lot for your support! however, replacing the function didn't help :(  (I did so by changing a version of `codebase.php' on my harddisk and then transferring on the plugins folder via ftp, overwriting the existing file)

No seemingly change in what's going on, I still get a blank page when clicking on an album....
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Add all pictures/files from a particular album to your favorites
« Reply #21 on: March 02, 2010, 09:37:47 am »

Can you give me ftp access to your plugin directory? If yes, I'll give you my email address.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Add all pictures/files from a particular album to your favorites
« Reply #22 on: March 02, 2010, 09:40:42 am »

I will -- can you give me your mailaddress?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Add all pictures/files from a particular album to your favorites
« Reply #23 on: March 02, 2010, 11:18:41 am »

Problem solved. Your PHP version is too old for my plugin. The count parameter was added in PHP 5.1.0.

Everyone who is running PHP < 5.1.0 please replace the entire function album_addfav_html with the following code:
Code: [Select]
function album_addfav_html($html) {
    $html = preg_replace('/<td width="100%" class="statlink"><h2>(.*)<\/h2><\/td>/Usi', '<td width=\"100%\" class=\"statlink\"><h2>\\1 <a href="index.php?file=album_addfav/album_addfav&album='.$_GET['album'].'" title="Add album to favorites"><img src="plugins/album_addfav/favorites.png" border="0" style="display:inline" /></a></h2></td>', $html);
    $html = preg_replace('/<td width="100%" class="statlink">(.*)<\/td>/Usi', '<td width=\"100%\" class=\"statlink\">\\1 <a href="index.php?file=album_addfav/album_addfav&album='.$_GET['album'].'" title="Add album to favorites"><img src="plugins/album_addfav/favorites.png" border="0" style="display:inline" /></a></td>', $html);

    return $html;
}
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Add all pictures/files from a particular album to your favorites
« Reply #24 on: March 02, 2010, 03:37:52 pm »

Hint: version_compare can take care of such issues.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.015 seconds with 21 queries.