forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Passionate on January 24, 2005, 07:09:33 pm

Title: Remove "content of main page" on subpages & category thumbnails
Post by: Passionate 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!  :-*
Title: Re: Remove "content of main page" on subpages & category thumbnails
Post by: donnoman 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.
Title: Re: Remove "content of main page" on subpages & category thumbnails
Post by: Passionate 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! :)
Title: Re: Remove "content of main page" on subpages & category thumbnails
Post by: donnoman on January 26, 2005, 04:03:29 am
Check the following threads, they may be able to help you.
http://forum.coppermine-gallery.net/index.php?topic=12090.0

http://forum.coppermine-gallery.net/index.php?topic=11613.0