View Full Version : Dumb question?
imported_CyberMaxx
12-28-2002, 10:10 PM
I tried several mods with success but when I need to add something to phpinclude the mod does not work!
This is the content of my phpinclude:
// This code is PHP4 only:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
No matter what I add it does not work!
Someone please help me?
I'm using version 2.2.9 (original template)
Maxx :rolleyes:
filburt1
12-28-2002, 11:15 PM
That's just the default phpinclude. You'll have to be a lot more specific as to what mods you're trying to install and what the problems are.
imported_CyberMaxx
12-29-2002, 07:06 AM
OK let's try this one:
This looked like an easy one to me (a beginner)
Your PM storage warning!
phpinclude:
if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
$pmwarning = '';
$result = mysql_query("SELECT COUNT(*) FROM privatemessage WHERE userid=$bbuserinfo[userid]");
if ($result)
{
$s = mysql_fetch_row($result);
if (intval($s[0]) / $pmquota > 0.8)
{
$pmwarning = '<br><font color="#FF0000">You are running out of space in your private message storage.</font>';
}
}
}
forumhome_pmloggedin:
$pmwarning
Now it's set at 80% but I changed the settings to 10% to test the script (0.1)...
Without result!
No matter what I do nothing shows up
This is just one example, like I said it's just like my phpinclude does not work :confused:
Please help?
Maxx
imported_CyberMaxx
12-29-2002, 07:39 AM
Just to be sure I installed this one also:
Total Thread Views
phpinclude:
if (strpos($_SERVER['PHP_SELF'], "index.php") != false)
{
$result = $DB_site->query("SELECT SUM(views) AS totalviews FROM thread");
$totalviews = $DB_site->fetch_array($result);
$totalviews = number_format($totalviews['totalviews']);
}
forumhome
Members: $numbermembers, Threads: $totalthreads ($totalviews views), Posts: $totalposts
I attached a screenshot that shows the result
ThanX again, Maxx (I'm sorry for my bad English)
filburt1
12-29-2002, 02:49 PM
Are you using at least PHP 4.2.0? I think that the $_SERVER superglobal was only introduced then.
imported_CyberMaxx
12-29-2002, 03:03 PM
PHP Version 4.0.6 :(
You sould upgrade. Yell at your server admin ;)
imported_CyberMaxx
12-29-2002, 03:06 PM
ThanX for your help anyway! ;)
Maxx
filburt1
12-29-2002, 03:26 PM
Most definitely yell because PHP 4.3.0 is out and they're way behind and clearly don't care about security and such.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.