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: Anycontent on all pages?  (Read 4827 times)

0 Members and 1 Guest are viewing this topic.

Valk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Anycontent on all pages?
« on: November 10, 2011, 05:09:36 am »

I was wondering if there was to make anycontent.php show on all pages on my site:  http://http://www.pikplop.com
I see it mentioned in the docs as to how not to do it.
 
Here's the test user account data:
    Username: copper
    Password: help

Besides sharing my custom theme this is the last I'll be bothering you.  I'm done after this!  Thank you for all your help, you've been incredible.  I left you guys a nice review on hotscripts btw.
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: Anycontent on all pages?
« Reply #1 on: November 10, 2011, 02:37:21 pm »

I think if you remove the if statement from the index.php it should appear on all pages:

case 'anycontent':
                    if ($cat == 0) {
                        ob_start();
                        /**
                         * Any php code or HTML can be put in this file and will be displayed
                         */
                        include('anycontent.php');
                        $anycontent = CPGPluginAPI::filter('anycontent', ob_get_contents());
                        ob_end_clean();
                        echo $anycontent;
                    }
Logged

Valk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Anycontent on all pages?
« Reply #2 on: November 11, 2011, 04:13:23 am »

Whoa.....  Keep in mind I know like zero coding lol.  My anycontent looks nothing like that.  Heres mine:

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2011 Coppermine Dev Team
  v1.0 originally written by Gregory Demar

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
 
  ********************************************
  Coppermine version: 1.5.16
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/anycontent.php $
  $Revision: 8243 $
**********************************************/

/**
* This file gets included in index.php if you set the option on the configuration panel: "content of the main page".
* It can be used to display any content from any program, it is to be edited according to one's tastes.
*/



starttable("100%", $lang_index_php['welcome']);

echo <<< EOT
    <tr>
        <td class="tableb">
           <script src="http://h2.flashvortex.com/display.php?id=2_1320728637_29444_509_0_263_51_9_2_60" type="text/javascript"></script>
        </td>
    </tr>

EOT;

endtable();

?>


I got my lil script to work at leaast...  If I wanted to have it on all pages what would I change excactly?  Thank you for your patience I'm kinda learning as I go along.
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: Anycontent on all pages?
« Reply #3 on: November 11, 2011, 11:26:22 am »

If you want the anycontent.php on all pages then remove the if statement located in the index.php !

Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: Anycontent on all pages?
« Reply #4 on: November 11, 2011, 12:35:45 pm »

So find this in the index.php

case 'anycontent':
                    if ($cat == 0) {
                        ob_start();
                        /**
                         * Any php code or HTML can be put in this file and will be displayed
                         */
                        include('anycontent.php');
                        $anycontent = CPGPluginAPI::filter('anycontent', ob_get_contents());
                        ob_end_clean();
                        echo $anycontent;
                    }


and replace with this

case 'anycontent':
                        ob_start();
                        /**
                         * Any php code or HTML can be put in this file and will be displayed
                         */
                        include('anycontent.php');
                        $anycontent = CPGPluginAPI::filter('anycontent', ob_get_contents());
                        ob_end_clean();
                        echo $anycontent;
                   
Logged

Valk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Anycontent on all pages?
« Reply #5 on: November 11, 2011, 09:13:27 pm »

Perfect!!!  Thank you so much my friend!  My site if finally done: http://www.pikplop.com/

[Link is not safe for work]
« Last Edit: November 13, 2011, 12:18:49 pm by Joe Carver »
Logged

Valk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Anycontent on all pages?
« Reply #6 on: November 12, 2011, 12:12:08 am »

I thought it worked damn....  Actually if I make that change the site crashes.  Something about like line 1827 in index.php
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: Anycontent on all pages?
« Reply #7 on: November 12, 2011, 02:36:05 am »

There are not that many lines in the index.php
Logged

Valk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Anycontent on all pages?
« Reply #8 on: November 12, 2011, 03:30:44 am »

The exact code is:

Parse error: syntax error, unexpected T_DEFAULT in /hermes/xxxxxx/xxxx/pow.xxxxxxxx/htdocs/xxxxxxxxx/gallery/index.php on line 1187
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: Anycontent on all pages?
« Reply #9 on: November 12, 2011, 03:53:59 pm »

Please attach your index.php (zipped)
I will take a look
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Anycontent on all pages?
« Reply #10 on: November 13, 2011, 12:18:25 pm »

I was wondering if there was to make anycontent.php show on all pages on my site:

Where do you want it to reside? The top, middle or bottom? On index pages only or also on image and other pages?

....My site if finally done: http://www.pikplop.com/

Please always post the notification that this link is not safe for work as per the board rules. I have modified that post.
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.