Advanced search  

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

Pages: [1]   Go Down

Author Topic: Moving position of anycontent.php  (Read 4979 times)

0 Members and 1 Guest are viewing this topic.

Damonik

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • Aussie
    • Damonik
Moving position of anycontent.php
« 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Moving position of anycontent.php
« Reply #1 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.

Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • Aussie
    • Damonik
Re: Moving position of anycontent.php
« Reply #2 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
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Moving position of anycontent.php
« Reply #3 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;
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Moving position of anycontent.php
« Reply #4 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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Moving position of anycontent.php
« Reply #5 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?
(http://www.lambertandassoc.com/photos/images/screenshot_1.jpg) this is now  
(http://www.lambertandassoc.com/photos/images/screenshot_2.jpg) this is what I want
Logged

blambert

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Moving position of anycontent.php
« Reply #6 on: July 09, 2005, 02:03:31 pm »

Please explain this "if/else switch" more
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Moving position of anycontent.php
« Reply #7 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.
Logged

blambert

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Moving position of anycontent.php
« Reply #8 on: July 10, 2005, 05:32:54 pm »

Thank you donnoman, I will look into how to do that.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.