coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Spike05 on March 07, 2004, 08:57:08 AM

Title: How do I add a custom footer?
Post by: Spike05 on March 07, 2004, 08:57:08 AM
I would add a custom footer. It's a php-based counter.

How do I add this. The FAQ don't work for me. I'm don't know anything about PHP so can you explain exactly please

The Counter uses include to add
Title: How do I add a custom footer?
Post by: Joachim Müller on March 07, 2004, 09:02:08 PM
if you don't understand http://coppermine.sourceforge.net/faq.php?q=customHeader#customHeader then maybe the php include simply isn't meant for you...
What do you want? Do you want someone to operate your webpage for you?
I'm sorry if this sounds rude to you, but with your only statement being
QuoteThe FAQ don't work for me
, what do you expect us to do to help? If you really want help, give us a code snippet of what you tried to do and a link to your page (that might have an error or something).

GauGau
Title: How do I add a custom footer?
Post by: Spike05 on March 07, 2004, 09:36:39 PM
I would include a simple Online-Counter (User Online) The Counter works but the User-Online Counter doesn't work.

You can look at http://www.megahirn.de

The User-Online-Counter and Counter is from http://www.planetc.de

There is always only 1 User on the Side. I have to include the counter but that doesn't work for me.

At the moment I use this:        

endtable();
    }

    echo file_get_contents("http://www.megahirn.de/planetuser/planetuser.php") ;
    echo file_get_contents("http://www.megahirn.de/planetcounter/planetcounter.php") . $template_footer;
}
// Function to start a 'standard' table
function starttable($width = '-1', $title = '', $title_colspan = '1')


but I know that file_get_contents it's wrong.
Title: How do I add a custom footer?
Post by: Joachim Müller on March 07, 2004, 09:59:27 PM
file_get_content (http://www.php.net/file_get_contents) is used to read a file to a string. Why don't you simply use include_once (http://www.php.net/include_once)?
If the file you're going to include tries to mess with the php headers (typical behaviour for counters), you can't do it this way. I suggest you use another counter. For a proof of concept, generate a file named "just_a_test.php" with this content<?php
print 'Hello world';
?>
and include it as stated in the faq.
Notice: You can not insert an echo or print command anywhere at will. This is not the way coppermine works!

GauGau