coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: kiig on September 22, 2004, 09:16:30 AM

Title: more than one 'anycontent' in Coppermine ? (2 different contents)
Post by: kiig on September 22, 2004, 09:16:30 AM
Hi all.

I'd like to have 2 anycontent files on my page (well... I just do :-)  ), - and I can add 'anycontent' more than one place in the config section related to that, - which obviously works, - and I get the same content in two places..

like.. anycontent, followed by category list, followed by anycontent, followed by lastup

If I want the content do differ, - like having a anycontent1 and a anycontent2, - would anyone have any suggestions ?

I could either hardcode it in the theme templates, - or try to allow for a second keyword in the config 'list', - or try to use php variables  in the anycontent file, - doing something like
if ($first_instance==0) { blabla first text; $first_instance=1} else {blabla, second text }
which I have tried with little success

Kim Igel.
Title: Re: more than one 'anycontent' in Coppermine ? (2 different contents)
Post by: yoshikiwei on September 22, 2004, 09:22:17 AM
suppose you want your second anycontent to be called anycontent2

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

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


then insert anycontent2 into the config, like what you did with anycontent
Title: Re: more than one 'anycontent' in Coppermine ? (2 different contents)
Post by: kiig on September 22, 2004, 10:17:51 AM
Wauw.... thanx a lot.. hadn't looked in the code, - but this is by far the cleanest approach. Thanx again.