forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: NoBob on August 10, 2004, 09:50:44 pm

Title: [Solved]: how to remove albums number text
Post by: NoBob on August 10, 2004, 09:50:44 pm
Could you tell me how I hide the "(X number of) albums on X page(s)" text on the index and thumbnails pages? It can say something like "11 albums on 1 page(s)." I can't find the code in theme.php. Thanks.

NoBob.
Title: Re: how to remove albums number text
Post by: Nibbler on August 10, 2004, 10:10:17 pm
Try the language file - $lang_list_categories
Title: Re: how to remove albums number text
Post by: NoBob on August 10, 2004, 10:24:48 pm
I found this:

$lang_list_categories = array(
  'home' => 'Home',
  'stat1' => '<b>[pictures]</b> files in <b>[albums]</b> albums and <b>[cat]</b> categories with <b>[comments]</b> comments viewed <b>[views]</b> times', //cpg1.3.0
  'stat2' => '<b>[pictures]</b> files in <b>[albums]</b> albums viewed <b>[views]</b> times', //cpg1.3.0

How do I hide it? With <!-- code --> ?

NoBob
Title: Re: how to remove albums number text
Post by: Nibbler on August 10, 2004, 10:34:08 pm
Just change them to empty strings.

'stat1' => '';
Title: Re: how to remove albums number text
Post by: NoBob on August 10, 2004, 10:54:25 pm
I did that and then refreshed the index page. The language just changed to Polish and the info about album numbers was still there.

NoBob
Title: Re: how to remove albums number text
Post by: Casper on August 11, 2004, 12:01:03 am
If the language change to polish, and your usual language is not that, just go into config and change it back.

And obviously, as this fix uses the language file, any viewer using an unmodified language will still see the stats.

Title: Re: how to remove albums number text
Post by: Casper on August 11, 2004, 12:27:15 am
I suggest you use the following method.

Open themes/yourtheme/theme.php, and find;

Code: [Select]
<!-- BEGIN footer -->
        <tr>
            <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
      </tr>
<!-- END footer -->

and change it to;

Code: [Select]
<!-- BEGIN footer -->
        <tr>
           <!--     <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
     -->   </tr>
<!-- END footer -->

and then find;

Code: [Select]
<p class="album_stat">{ALB_INFOS}</p>
and remove that.
Title: Re: how to remove albums number text
Post by: NoBob on August 11, 2004, 01:13:27 am
I did that

Code: [Select]
<!-- BEGIN footer -->
        <tr>
                <!-- <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td> -->
        </tr>
<!-- END footer -->

and did this

Code: [Select]
{ADMIN_MENU}
                        <p>{ALB_DESC}</p>
                        <!-- <p class="album_stat">{ALB_INFOS}</p> -->
                </td>

but no change... www.rtwtravel.com/pictures

NoBob.
Title: Re: how to remove albums number text
Post by: NoBob on August 11, 2004, 03:05:23 pm
Anybody know why the fix doesn't work?

NoBob
Title: Re: how to remove albums number text
Post by: Joachim Müller on August 11, 2004, 03:07:02 pm
this is not a hotline, allow days for supporters to react and answer, not hours! >:(

GauGau
Title: Re: how to remove albums number text
Post by: NoBob on August 16, 2004, 07:43:15 pm
Well, a few days have passed...I still haven't been able to remove the "x number of files in album" text from the index page. Would someone mind helping me out please?

NoBob.
Title: Re: how to remove albums number text
Post by: skybax on August 16, 2004, 08:06:12 pm
in lang (english.php) find:

Code: [Select]
'stat1' => '<b>[pictures]</b> files in <b>[albums]</b> albums and <b>[cat]</b> categories with <b>[comments]</b> comments viewed <b>[views]</b> times',
and comment out the 'stat1' and 'stat2' lines. upload and you should be good to go.
Title: Re: how to remove albums number text
Post by: NoBob on August 16, 2004, 09:48:27 pm
Hi,

I put a couple of slashes in front of the stat lines. But the index page didn't change.

$lang_list_categories = array(
  'home' => 'Home',
  //'stat1' => '<b>[pictures]</b> files in <b>[albums]</b> albums and <b>[cat]</b> categories with <b>[comments]</b> comments viewed <b>[views]</b> times', //cpg1.3.0
  //'stat2' => '<b>[pictures]</b> files in <b>[albums]</b> albums viewed <b>[views]</b> times', //cpg1.3.0
  'xx_s_gallery' => '%s\'s Gallery',
  'stat3' => '<b>[pictures]</b> files in <b>[albums]</b> albums with <b>[comments]</b> comments viewed <b>[views]</b> times', //cpg1.3.0
);

I replaced the stat lines with 'stat1' => ''; and 'stat2' => '';

$lang_list_categories = array(
  'home' => 'Home',
  'stat1' => ''; //cpg1.3.0
  'stat2' => ''; //cpg1.3.0
  'xx_s_gallery' => '%s\'s Gallery',
  'stat3' => '<b>[pictures]</b> files in <b>[albums]</b> albums with <b>[comments]</b> comments viewed <b>[views]</b> times', //cpg1.3.0
);

but got the following error on the gallery index page:

Parse error: parse error, unexpected ';', expecting ')' in /home/httpd/vhosts/rtwtravel.com/httpdocs/pictures/lang/english.php on line 814

What did I do wrong?

NoBob.
Title: Re: how to remove albums number text
Post by: coolhead on August 17, 2004, 05:44:29 am
Could you tell me how I hide the "(X number of) albums on X page(s)" text on the index and thumbnails pages? It can say something like "11 albums on 1 page(s)." I can't find the code in theme.php. Thanks.

NoBob.

Open the file "english.php" find where say

Code: [Select]
$lang_album_list = array(
'album_on_page' => '%d albums on %d page(s)'
);

and try to change to

Code: [Select]
$lang_album_list = array(
'album_on_page' => ''
);

I don't have test this solution, good luck!!
Title: Re: how to remove albums number text
Post by: Joachim Müller on August 17, 2004, 08:41:31 am
you can only comment out lines in php using the double slash if you don't "destroy" the surounding structure. In your case, you messed inside an array definition that stretches over several lines. Do as coolhead  suggested, he is right.

GauGau
Title: Re: how to remove albums number text
Post by: NoBob on August 17, 2004, 03:12:11 pm
Perfect  :D Thanks very much.

NoBob.