PDA

View Full Version : How to imbed counter and not output



LeeGoldsmith
06-16-2005, 03:54 PM
Hi Patiek

I have a question about the counter. I have it working just fine on my site but would also like to embed it into my forum and photo gallery because some users direct link to them and are sometimes missed as visitors. Can a parameter be setup when the script is run to not print the stats?? Is there any work around that I could use until that is added??

Thanks for the help and the counter. :rolleyes:

Lee

P.S. I promiss to get a link up for your site this weekend.

Patrick
06-16-2005, 11:57 PM
This can be done I suppose.

If you are not using the GET 'p' variable (and you are if you are accessing your pages via somepage.php?p=xxx), then you can include it like:


<? $_GET['p'] = "stats";
include("/path/to/counter.php"); ?>

If you are using the 'p' variable then say so and I can give you an alternative.

[iG]
07-23-2005, 07:06 PM
Hey Patiek, maybe you can help me out here..

I've installed your script, and it seems to run great. However, in my installation I would like to include the stats on the main index page, but nowhere else. Right now there is only a global flag to either print out the stats or not, is there any way I can get the ouput on a single page and keep the counter hidden on all others?

Cheers,
iG

ScriptKeeper
12-11-2008, 09:28 AM
I know that this is an old topic but I only downloaded this script a few days ago and have the answer that you are looking for.

I wanted the display to show on some pages but not others (i.e. the forum pages as it already has an embedded Who's Online island.).

What I did was this:

Make a copy of counter.php and rename it counter2.php and on line 101, set:

$OPTION['Hide_Counter'] = 1;

Upload it to your counter directory and call it on the page you want it to count but not be displayed with:


<?php
include ("/path/to/mydirectory/counter/counter2.php")
?>

It does exactly the same job as the original counter.php but is hidden.

Good luck.