more than one 'anycontent' in Coppermine ? (2 different contents) more than one 'anycontent' in Coppermine ? (2 different contents)
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

more than one 'anycontent' in Coppermine ? (2 different contents)

Started by kiig, September 22, 2004, 09:16:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kiig

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.
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

yoshikiwei

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

kiig

Wauw.... thanx a lot.. hadn't looked in the code, - but this is by far the cleanest approach. Thanx again.
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)