Moving position of anycontent.php Moving position of anycontent.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Moving position of anycontent.php

Started by Damonik, November 17, 2004, 12:26:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Damonik

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

Casper

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.

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Damonik

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

donnoman

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.

            case 'anycontent':
                if ($cat == 0) {
                    include('anycontent.php');
                }
                flush();
                break;

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

blambert

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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.lambertandassoc.com%2Fphotos%2Fimages%2Fscreenshot_1.jpg&hash=612c277e9615b7712f802edcedb51e53029f064b) this is now  
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.lambertandassoc.com%2Fphotos%2Fimages%2Fscreenshot_2.jpg&hash=9fd60b7dd8d13d531450b0e12d87b1b7d74a47f1) this is what I want

blambert

Please explain this "if/else switch" more

donnoman

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.

blambert

Thank you donnoman, I will look into how to do that.