forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: osdog on June 18, 2006, 03:57:44 pm

Title: 'x' files in 'x' albums and 'x' categories etc.
Post by: osdog on June 18, 2006, 03:57:44 pm
I think this has been asked before and I apologise in advance.  I'm sure I've seen it - but have searched the site today and can't find it anywhere.

Please can you tell me how to remove this line from the site. Or point me to the thread where it has been answered before. 

I could not use the search option, because I don't know what the text line on the site is called.

Thank you very much.

Osdog
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: Gizmo on June 18, 2006, 04:18:07 pm
This is generated by the {STATISTICS} tag. Copy this from the Sample theme.php and paste it into your theme.php.
Code: [Select]
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
                <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

Remove this line from the above code and the stats will be gone.
Code: [Select]
                <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>

Gizmo
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: Sami on June 18, 2006, 04:20:35 pm
you should find "$template_cat_list" under your theme.php and remove the code between <!-- BEGIN footer --> and <!-- END footer -->
search for this on your theme:
Code: [Select]
<!-- BEGIN footer -->
        <tr>
                <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END footer -->

if you can't find it then you should copy this :

Code: [Select]
//Moded for removing statistics
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
 <!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

to your theme.php and it will take care of it ;)


Update: Sorry I don't see the answer of Gizmo
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: osdog on June 18, 2006, 05:10:44 pm
Many thanks guys..

Di
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: zac on December 31, 2006, 09:30:20 am
hmmm... sorry to dredge up this dusty topic.. i feel kind of dense (nothing new there  ???) but this is not working for me.  The curious thing is I commented out the header and that worked no problem.  I also tried just deleting it like you said but the footer will not disappear.  Here is the code if anyone can see something that i am missing:
Code: [Select]
// HTML template for the category list

$template_cat_list = <<<EOT

<!-- BEGIN header -->

       <!--  <tr>

                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
               <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>

        </tr>-->

<!-- END header -->

<!-- BEGIN catrow_noalb -->

        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->

<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
               <!-- <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>-->
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
    <!--    <tr>
                <td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
        </tr> -->
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: Gizmo on December 31, 2006, 02:30:08 pm
When I view your gallery at http://www.folkphotography.com/gallery/index.php (http://www.folkphotography.com/gallery/index.php), I don't see the category statistics but I do see the album info such as "6 files, last one added on Dec 04, 2006". If this is what you're referring to then you need to edit $template_album_list and $template_album_list_cat. If these variables aren't in your theme.php then copy them from the sample theme.php and paste them into yours. Find the line <p class="album_stat">{ALB_INFOS}</p> and comment it out or remove it in both variables.

If this isn't your issue then mark up a screenshot and attach it.
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: zac on January 01, 2007, 08:24:59 pm
ok.. i got it now .. thanks Gizmo!  It is weird, I had done that.. however I had not realized that it appears in the sample theme twice.  There is an // HTML template for the album list at line 257 (which I had in my theme) and then another //HTML template for the album list at line 376 (that one I had missed).  Never noticed a repeat like that in the sample theme before.  Anyways... works now.. and thanks again for all of the great support in these forums ! !
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: Gizmo on January 01, 2007, 09:03:36 pm
One is for displaying albums under categories ($template_album_list_cat) and the other is for displaying albums that aren't assigned to a category or when viewing on an album list page ($template_album_list).
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: beerguzzler on February 19, 2007, 03:50:53 pm
HI,

I'm currently using the igames theme that I've managed to tweak thanks to reading the articles on here. I've so far managed to get all the edits done without having to post on here, but I'm having extreme difficulty in removing both the Category stats (Number of albums and Files) and also the stats that say x number of files last uploaded on x date.

I've copied and pasted and then edited as per this thread, but it has made no difference.

Is there a specific part of the the theme.php you have to paste into for it to work?

Many thanks for any help you can give me.
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: beerguzzler on February 19, 2007, 10:09:50 pm
Sorted it.

I hadn't removed the <p class="album_stat">{ALB_INFOS}</p> from both $template_album_list and $template_album_list_cat  :-[

Certainly pays to read the whole post properly again!  ;D
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: Len Backus on December 14, 2008, 03:36:26 pm
Quote
If this is what you're referring to then you need to edit $template_album_list and $template_album_list_cat. If these variables aren't in your theme.php then copy them from the sample theme.php and paste them into yours. Find the line <p class="album_stat">{ALB_INFOS}</p> and comment it out or remove it in both variables.

I am new at editing stuff. Where do I find "$template_album_list" to do the edit.
=========================
Quote
copy them from the sample theme.php and paste them into yours
Where in my theme would I place this code...or doesn't it matter?

www.LenBackus.com (http://www.LenBackus.com)
Title: Re: 'x' files in 'x' albums and 'x' categories etc.
Post by: Fabricio Ferrero on December 14, 2008, 04:30:04 pm
Quote
I am new at editing stuff. Where do I find "$template_album_list" to do the edit.
In your 'theme.php'

Quote
Where in my theme would I place this code...or doesn't it matter?
Check your theme, if you don't have that peace of code, do as suggested. Go to sample theme and copy from there.

Don't post in ancient topics. Start your own instead.

Locking.