Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: more than one 'anycontent' in Coppermine ? (2 different contents)  (Read 3945 times)

0 Members and 1 Guest are viewing this topic.

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
more than one 'anycontent' in Coppermine ? (2 different contents)
« 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
Code: [Select]
if ($first_instance==0) { blabla first text; $first_instance=1} else {blabla, second text }which I have tried with little success

Kim Igel.
« Last Edit: September 22, 2004, 05:02:42 pm by TranzNDance »
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

yoshikiwei

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 68
Re: more than one 'anycontent' in Coppermine ? (2 different contents)
« Reply #1 on: September 22, 2004, 09:22:17 am »

suppose you want your second anycontent to be called anycontent2

open index.php
find
Code: [Select]
            case 'anycontent':
                if ($cat == 0) {
                    include('anycontent.php');
                }
                flush();
                break;
add after
Code: [Select]
            case 'anycontent2':
                if ($cat == 0) {
                    include('anycontent2.php');
                }
                flush();
                break;

then insert anycontent2 into the config, like what you did with anycontent
Logged

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: more than one 'anycontent' in Coppermine ? (2 different contents)
« Reply #2 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.
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.