Simple Machines Community Forum
Customizing SMF => SMF Coding Discussion => Topic started 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?
-
How do you get the SSI to do its banning stuff also?
-
You have to call obExit(); for the statistics to actually get committed.
Before you include SSI.php, just do this:
$ssi_ban = true;
-[Unknown]
-
Thanks.
-
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!"
-
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]
-
What causes the copyright failure?
-
Just the way obExit works. Are you still getting it without obExit()?
-[Unknown]
-
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.
-
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.
-
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]
-
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.
-
Is the copyright not being displayed in that theme?
The banning is done before the theme is loaded... no wait, it isn't...
-[Unknown]
-
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?
-
Can you give me a link to the page and test account?
-[Unknown]
-
http://www.battleclinic.com
un: cue_test
pw: test
-
It's using the default theme, for some reason...
-[Unknown]
-
So how can i get it to use the ban then?
-
After you include SSI.php, what does this display?
echo (int) $ssi_theme;
-[Unknown]
-
11
-
So it's loading the right theme. Very strange....
-[Unknown]
-
Its loading the right theme, but it doesnt look like the right theme.
-
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]