Anycontent on all pages? Anycontent on all pages?
 

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]

Main Menu

Anycontent on all pages?

Started by Valk, November 10, 2011, 05:09:36 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Valk

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.

altenae

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;
                    }

Valk

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.

altenae

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


altenae

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;
                   

Valk

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

[Link is not safe for work]

Valk

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

altenae

There are not that many lines in the index.php

Valk

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

altenae

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

Joe Carver

Quote from: Valk 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:

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

Quote from: Valk on November 11, 2011, 09:13:27 PM
....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.