forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Damonik on November 17, 2004, 12:26:40 am

Title: Moving position of anycontent.php
Post by: Damonik on November 17, 2004, 12:26:40 am
Hi all,
I've had a pretty good search around but havent found a solution to this.

In my gallery http://www.damonik.com/gallery/, I wish to move the anycontent.php which contains the image header to be above the Album List :: Register :: Login :: section.

I cant find anywhere how to do this  - In the configuration section anycontent is listed before anything else, but still login etc is above it!

Hope someone can help,

Cheers,
Damo
Title: Re: Moving position of anycontent.php
Post by: Casper on November 17, 2004, 01:58:01 am
anycontent.php is not designed to contain a header, and will not display above the menus.

You can use a custom header to do this (please search) or just place your header in the template.html.

Title: Re: Moving position of anycontent.php
Post by: Damonik on November 17, 2004, 02:39:06 am
Hi Casper,
Thanks for that - I have tried that but I want to have a custom header that only displays on the main page and doesnt continue through the rest of the gallery pages.

Is this possible without using anycontent?  I'm fairly happy with the way it is at the moment - but in the never ending search for perfection... ;-)

D
Title: Re: Moving position of anycontent.php
Post by: donnoman on November 17, 2004, 05:39:46 am
if you can put your custom header in just make an IF in front of it and test for $cat == 0.

This is the code where the real include for anycontent is in index.php.

Code: [Select]
            case 'anycontent':
                if ($cat == 0) {
                    include('anycontent.php');
                }
                flush();
                break;
Title: Re: Moving position of anycontent.php
Post by: Casper on November 17, 2004, 09:15:21 am
You should use the if/else switch, as donnoman suggests, but not with anycontent if you want it for the header.  Just use the custom header method with the if/else switch.
Title: Re: Moving position of anycontent.php
Post by: blambert on July 09, 2005, 07:41:39 am
Custom Header or Footer makes you lose control...when you use them you create a permanent frame....this needs to be done in a lower php routine....like the index.php or anycontent....but I got the anycontent to call up CPMFETCH
<?php
include "include/config.inc.php";
include "coppermine.php";
$objCpm = new cpm('/photos');
cpm_viewRandomMediaFromAlbum(1,3,7);
$objCpm->cpm_close();
?>
Works great but can't move the content to the right of my ALBUM thumbnail....any Ideas?
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.lambertandassoc.com%2Fphotos%2Fimages%2Fscreenshot_1.jpg&hash=612c277e9615b7712f802edcedb51e53029f064b) this is now  
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.lambertandassoc.com%2Fphotos%2Fimages%2Fscreenshot_2.jpg&hash=9fd60b7dd8d13d531450b0e12d87b1b7d74a47f1) this is what I want
Title: Re: Moving position of anycontent.php
Post by: blambert on July 09, 2005, 02:03:31 pm
Please explain this "if/else switch" more
Title: Re: Moving position of anycontent.php
Post by: donnoman on July 09, 2005, 02:20:12 pm
The "switch" is what reads the config variable "content of the main page" and determines in what order, and what content is displayed by index.php.

The "if" that I posted guarantees that that content only runs when the current cat =  root (ie 0):  It will only display on the front page, as soon as you navigate to another cat or album, it won't display.
Title: Re: Moving position of anycontent.php
Post by: blambert on July 10, 2005, 05:32:54 pm
Thank you donnoman, I will look into how to do that.