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: How to remove category table from frontpage only.  (Read 2114 times)

0 Members and 1 Guest are viewing this topic.

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
How to remove category table from frontpage only.
« on: February 06, 2007, 08:53:54 pm »

Hi guys,

i need a helping hand in removing the category table only from the frontpage.
I did find this old thread, http://forum.coppermine-gallery.net/index.php?topic=30308.0 , but what was in there did not help me. I run the classic theme on my cpg.

Thanks in advance for any help.

Regards,
Hein
« Last Edit: February 07, 2007, 03:01:15 pm by Hein »
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: How to remove category table from frontpage only.
« Reply #1 on: February 07, 2007, 02:59:12 pm »

Got it. I should try to trust my own coding somemore  ;D

I only wanted the single table where it says how many files in how many album and the number of total views.

I got that by pasting this code block before the ?> tag of my 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;

And then adding <!-- and --> on this block of code.
Code: [Select]
      <!--  <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>-->

Problem solved.

Hein
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: How to remove category table from frontpage only.
« Reply #2 on: February 07, 2007, 03:59:16 pm »

One small adjustment. If you do not want catlist on the frontpage do as i did. But i noticed that when i clicked on 1 of the 3 main categories on the frontpage (which i link to in the welcoming txt) i got to that main category page where it displays it's sub categories. With still a album and pic count on the right of the category name.

If you want to add Album and Picture to indicate which numbers means what then edit this block of code in your theme.php // HTML template for the category list part.

Code: [Select]
<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">Albums: {ALB_COUNT}</td>
                <td class="catrow" align="center">Pictures: {PIC_COUNT}</td>
        </tr>

Instead of Albums and Pictures you can type anything you want. For example Files in case you also host pdf or mpg file's

Hein
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 15 queries.