Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: MrCue on March 28, 2004, 07:05:38 AM

Title: SSI Track Stats
Post by: MrCue on March 28, 2004, 07:05:38 AM
trackStats(array('hits' => '+'));

I added that to my SSI.php under ssi_logOnline but it doesnt work. Any ideas how to get it to track hits from the SSI?
Title: Re: SSI Track Stats & Banning
Post by: MrCue on March 28, 2004, 01:00:34 PM
How do you get the SSI to do its banning stuff also?
Title: Re: SSI Track Stats
Post by: [Unknown] on March 28, 2004, 05:16:04 PM
You have to call obExit(); for the statistics to actually get committed.

Before you include SSI.php, just do this:

$ssi_ban = true;

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 28, 2004, 06:53:13 PM
Thanks.
Title: Re: SSI Track Stats
Post by: MrCue on March 28, 2004, 07:10:37 PM
Cant call obExit, it tells me it cant load the main template. Yet im not using the templates.
And when i turn banning on for the site i get this.
"Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is using an ILLEGAL copy of SMF!"
Title: Re: SSI Track Stats
Post by: [Unknown] on March 28, 2004, 07:41:13 PM
Well, actually, I was just saying obExit() takes care of it.  If you want, you can do it yourself by just calling the function with no parameters, like so:

trackStats();

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 29, 2004, 10:52:39 AM
What causes the copyright failure?
Title: Re: SSI Track Stats
Post by: [Unknown] on March 29, 2004, 11:20:33 AM
Just the way obExit works.  Are you still getting it without obExit()?

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 29, 2004, 11:27:47 AM
i have this in SSI before writeLog() under ssi_logOnline

trackStats(array('hits' => '+'));
trackStats();

And in my main file, just before i include the ssi file i have
//$ssi_ban = true;

If i un-comment that line i get the error.
Title: Re: SSI Track Stats
Post by: MrCue on March 30, 2004, 08:39:42 AM
Any ideas why i see the invalid SMF?
It also appears to load the wrong template, even though i have also specified $ssi_theme = '11'; before the include.
Title: Re: SSI Track Stats
Post by: [Unknown] on March 30, 2004, 08:42:42 AM
You don't need the quotes for $ssi_theme, it can just be 11....

And, I assume it must be thinking you're banned.  Or something.  Can you link me to the code?

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 30, 2004, 08:59:47 AM
Yes, i have a test account which i have banned.
Note the theme in the image is not http://www.battleclinic.com/forum/index.php the one there.
Title: Re: SSI Track Stats
Post by: [Unknown] on March 30, 2004, 09:07:04 AM
Is the copyright not being displayed in that theme?

The banning is done before the theme is loaded... no wait, it isn't...

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 30, 2004, 09:11:56 AM
I checked all my themes in preview, and they all display correctly.
Come to think of it, i dont even have a theme that looks like the one in the picture. So where is it being generated from?
Title: Re: SSI Track Stats
Post by: [Unknown] on March 30, 2004, 09:15:53 AM
Can you give me a link to the page and test account?

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 30, 2004, 09:20:48 AM
http://www.battleclinic.com

un: cue_test
pw: test
Title: Re: SSI Track Stats
Post by: [Unknown] on March 30, 2004, 09:35:23 AM
It's using the default theme, for some reason...

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 30, 2004, 09:47:09 AM
So how can i get it to use the ban then?
Title: Re: SSI Track Stats
Post by: [Unknown] on March 30, 2004, 09:58:32 AM
After you include SSI.php, what does this display?

echo (int) $ssi_theme;

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 30, 2004, 10:06:10 AM
11
Title: Re: SSI Track Stats
Post by: [Unknown] on March 30, 2004, 03:10:38 PM
So it's loading the right theme.  Very strange....

-[Unknown]
Title: Re: SSI Track Stats
Post by: MrCue on March 30, 2004, 03:44:55 PM
Its loading the right theme, but it doesnt look like the right theme.
Title: Re: SSI Track Stats
Post by: [Unknown] on March 30, 2004, 06:50:42 PM
No, that's theme 1, it's using the default stuff.  It looks like the default theme, but it's using the correct theme's URL.  Very strange.

-[Unknown]