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: Remove "content of main page" on subpages & category thumbnails  (Read 2918 times)

0 Members and 1 Guest are viewing this topic.

Passionate

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Remove "content of main page" on subpages & category thumbnails
« on: January 24, 2005, 07:09:33 pm »

I'm pretty new to Coppermine, so if I seem like an idiot, well, I probably am.. ;)

My question is, how do I remove the "Content of main page (breadcrumb/toprated,1/catlist/alblist/lastup,4/random)" from the category and album pages? I just want them on the main page. Thank you!

Also, is there a way to add a thumbnail to categories without any pictures in them? I noticed something like this in the theme.php file but never figured out how to do it. I know a site that has it, check out www.gobritney.com.

Code: [Select]
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%"><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="tableh2" colspan="3"><table border="0"><tr><td[b]>{CAT_THUMB}</[/b]td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="tableb"><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="tableb" align="center">{ALB_COUNT}</td>
                <td class="tableb" 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="17" alt="" /><br />
<!-- END spacer -->
EOT;

Thanks!  :-*
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Remove "content of main page" on subpages & category thumbnails
« Reply #1 on: January 25, 2005, 05:38:10 am »

you can prevent those items from displaying on anything but the main index.php by wrapping the contents with a conditional such as:

Code: [Select]
               if ($cat == 0) {
                    include('anycontent.php');
                }

ie if you want 'random' only to be shown on the first index.php page

index.php; under:

Code: [Select]
/**
 * Main code
 */

find:
Code: [Select]
           case 'random':
                display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                flush();
                break;

replace with:
Code: [Select]
           case 'random':
                if ($cat == 0) {
                    display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                    flush();
                }
                break;

Don't do this with catlist or alblist, as you will probably end up with albums/cats you can no longer navigate to.

I think that site may be using bbcodes in the category description to point to specific thumbnails rather than something intrinsic in coppermine.

check the docs on how to use bbcode.
Logged

Passionate

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Remove "content of main page" on subpages & category thumbnails
« Reply #2 on: January 25, 2005, 06:58:37 pm »

Thanks so much for the help on the removal, worked like a charm! :)

But that can't have been bbcode, cause the category desciption doesn't support img tags, I tried. Any other suggestions? I'd appreciate it, it makes the page a bit more lively with thumbnails! :)
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.