coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: ashleyXcore on November 04, 2006, 05:40:22 AM

Title: Extra commas in the album view?
Post by: ashleyXcore on November 04, 2006, 05:40:22 AM
If you go to this category: http://pink-pistol.net/scans/index.php?cat=4 (it's work safe), you'll see that I have extra commas in the statistics.

It looks like this:
Files: 251
Updated: Nov 03, 2006
, Linked: 40
, Total: 291

I need it to look like this:
Files: 251
Updated: Nov 03, 2006
Linked: 40
Total: 291

Here is what I have in my language file, I'm not sure where the extra commas are coming from.
$lang_list_albums = array(
  'n_pictures' => '<b>Files:</b> %s<br>',
  'last_added' => '<b>Updated:</b> %s',
  'n_link_pictures' => '<b>Linked:</b> %s<br>', //cpg1.4
  'total_pictures' => '<b>Total:</b> %s', //cpg1.4
);
Title: Re: Extra commas in the album view?
Post by: Sami on November 04, 2006, 05:58:05 AM
It need core hack (mod),
- Edit index.php and find this line (around line 538)


            $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : "") . (($CONFIG['link_pic_count'] && $link_pic_count > 0 ) ? sprintf(", {$lang_list_albums['n_link_pictures']},  {$lang_list_albums['total_pictures']}", $link_pic_count, $count + $link_pic_count) : "");


and change it with this:


// [BEGIN] Moded to remove extra commas
            $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : "") . (($CONFIG['link_pic_count'] && $link_pic_count > 0 ) ? sprintf(" {$lang_list_albums['n_link_pictures']}  {$lang_list_albums['total_pictures']}", $link_pic_count, $count + $link_pic_count) : "");
// [END]


As I said it's Core mod so be careful about that
Title: Re: Extra commas in the album view?
Post by: ashleyXcore on November 04, 2006, 08:58:06 AM
Ahh I see, thank you very much :)