View Full Version : .. I need help about Non VB Pages.. lol
ffevo
07-24-2005, 07:15 AM
Ookay..So I know thier is a lot of posts about this..but noone seems to be helping.
I need to be able to post : Number of People REGISTERED on the Forums and then the Number of Threads and the number of posts..
Not TOP ten Posts..or anything offered in VB External.. any help?
AN-net
07-24-2005, 02:19 PM
well first u'll need to include global.php. if you are not going to include global.php because u want it completely separate from vb then u make this 100x then it could be. anyways once in u include/require global.php just put this code in:
require_once('./includes/functions_forumlist.php');
cache_ordered_forums(1, 0, 0);
if (is_array($forumcache))
{
foreach ($forumcache AS $forum)
{
$nthreads += $forum['threadcount'];
$nposts += $forum['replycount'];
$totalthreads = vb_number_format($nthreads);
$totalposts = vb_number_format($nposts);
}
}
that will total posts and threads
for member number and newest members use this code:
$userstats = unserialize($datastore['userstats']);
$totalmembers = vb_number_format($userstats['numbermembers']);
$newusername = $userstats['newusername'];
$newuserid = $userstats['newuserid'];
ffevo
07-30-2005, 08:38 AM
Omg Thanks Dude..Like times ten :) and I apprecite your time
arg.. okay IM getting this error..
Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home/.navy/loathor/squaresyndicate.com/forums/global.php on line 18
Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/local/lib/php') in /home/.navy/loathor/squaresyndicate.com/forums/global.php on line 18
what is up?
<?php require_once('./forums/includes/functions_forumlist.php');
cache_ordered_forums(1, 0, 0);
if (is_array($forumcache))
{
foreach ($forumcache AS $forum)
{
$nthreads += $forum['threadcount'];
$nposts += $forum['replycount'];
$totalthreads = vb_number_format($nthreads);
$totalposts = vb_number_format($nposts);
}
}
?>
This is the COde I have down and then this is what I have for including the globals..
<?php
include('./forums/global.php'); ?>
lol Im trying tons of stuff.. and it seems thatwhen I put this in a documnet then put it in my forums folder..like you had it, it get a blank screen.. -.- whats up?
ffevo
08-02-2005, 02:29 AM
Um anyone want to help me in why I get this error? I didnt know this was going to be soo ++++ing difficult!
Marco van Herwaarden
08-02-2005, 03:53 AM
You should always first change to the directory containing your forum (in 3.0.x):
chdir('./forums');
require_once('./global.php');
That will take out most of your problems.
ffevo
08-02-2005, 05:04 AM
You should always first change to the directory containing your forum (in 3.0.x):
chdir('./forums');
require_once('./global.php');
That will take out most of your problems.
Thank you soo much.. Now this might sound really dumb.. but know I get a completely Blank Spot.. Wtf?
Marco van Herwaarden
08-02-2005, 06:13 AM
Difficult to answer, without seeing all your script.
ffevo
08-02-2005, 06:17 AM
<table width="145" cellpadding="0" cellspacing="0" border="0">
<tr>
<td background="images/forum_tip.gif" height="18">
<img src="images/savepoint.gif">
</td>
</tr>
<tr>
<td background="images/link_middle.gif">
<?php chdir('./forums');
require_once('./global.php'); ?>
<?php require_once('./includes/functions_forumlist.php');
cache_ordered_forums(1, 0, 0);
if (is_array($forumcache))
{
foreach ($forumcache AS $forum)
{
$nthreads += $forum['threadcount'];
$nposts += $forum['replycount'];
$totalthreads = vb_number_format($nthreads);
$totalposts = vb_number_format($nposts);
}
}
?>
<font face="tahoma" color="FFFFFF" size="1">
<center>
</center>
</td>
</tr>
<td>
<img src="images/link_bottom_tip.gif" height="18">
</td>
</tr>
</table>
This is were I put it in.. and its just a blank box..
http://www.squaresyndicate.com <-- look thier if you want the hole code..but you cant see the PHP obviously..
woah woah woah woah woah...
Know Im getting:
Unable to add cookies, header already sent.
File: /home/.navy/loathor/squaresyndicate.com/index.php
Line: 1
wtf?????W?WW??W??
<?php
if(!isset($_GET['page'])) {
$page = 'news';
} else {
$page = $_GET['page'];
}
?>
this is what I have on Line Number one.. its for my Inlcudes..
Adrian Schneider
08-02-2005, 06:31 AM
Include global.php prior to any output.
ffevo
08-02-2005, 06:33 AM
Alrighty.. Ive Included <-- Global..not just Rquired it..and Im still getting a blank table.. with the code Above.. this is the code on top:
<?php chdir('./forums');
include('./global.php'); ?>
<?php
if(!isset($_GET['page'])) {
$page = 'news';
} else {
$page = $_GET['page'];
}
?>
and this is the code in the table..
<table width="145" cellpadding="0" cellspacing="0" border="0">
<tr>
<td background="images/forum_tip.gif" height="18">
<img src="images/savepoint.gif">
</td>
</tr>
<tr>
<td background="images/link_middle.gif">
<?php require_once('./includes/functions_forumlist.php');
cache_ordered_forums(1, 0, 0);
if (is_array($forumcache))
{
foreach ($forumcache AS $forum)
{
$nthreads += $forum['threadcount'];
$nposts += $forum['replycount'];
$totalthreads = vb_number_format($nthreads);
$totalposts = vb_number_format($nposts);
}
}
?>
<font face="tahoma" color="FFFFFF" size="1">
<center>
</center>
</td>
</tr>
<td>
<img src="images/link_bottom_tip.gif" height="18">
</td>
</tr>
</table>
why am I getting a blank table..: www.squaresyndicate.com <-- on the right bottom table says forum Stats
MY GOD white screen same error.. " Header Already Sent.."
anyone help?
bumpbump
can anyone else help!? why em I getting this error?
ffevo
08-05-2005, 06:02 AM
*bump bump*
mybeshoo
03-22-2007, 10:24 PM
Dear flok , and Marco .
if i have non vb page and it is outside of vb directory.
ok .
and it hase some includes in it root .
if i use chdir('./forums'); all includes in my page will be lost !!
what have i do ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.