vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Dumb question? (https://vborg.vbsupport.ru/showthread.php?t=85827)

imported_CyberMaxx 12-28-2002 10:10 PM

Dumb question?
 
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

1 Attachment(s)
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 :(

Brad 12-29-2002 03:05 PM

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.


All times are GMT. The time now is 07:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01136 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete