vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   .. I need help about Non VB Pages.. lol (https://vborg.vbsupport.ru/showthread.php?t=92778)

ffevo 07-24-2005 06:15 AM

.. I need help about Non VB Pages.. lol
 
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 01: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:
PHP Code:

    require_once('./includes/functions_forumlist.php');
    
cache_ordered_forums(100);
    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:
PHP Code:

    $userstats unserialize($datastore['userstats']);
    
$totalmembers vb_number_format($userstats['numbermembers']);
    
$newusername $userstats['newusername'];
    
$newuserid $userstats['newuserid']; 


ffevo 07-30-2005 07: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 Code:

 <?php  require_once('./forums/includes/functions_forumlist.php');
    
cache_ordered_forums(100);
    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 Code:

 <?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 01: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 02:53 AM

You should always first change to the directory containing your forum (in 3.0.x):
PHP Code:

chdir('./forums');
require_once(
'./global.php'); 

That will take out most of your problems.

ffevo 08-02-2005 04:04 AM

Quote:

Originally Posted by MarcoH64
You should always first change to the directory containing your forum (in 3.0.x):
PHP Code:

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 05:13 AM

Difficult to answer, without seeing all your script.

ffevo 08-02-2005 05:17 AM

Code:

<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 Code:

<?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 05:31 AM

Include global.php prior to any output.

ffevo 08-02-2005 05: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 Code:

 <?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..

Code:

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


All times are GMT. The time now is 09:20 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.02794 seconds
  • Memory Usage 1,774KB
  • 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
  • (2)bbcode_code_printable
  • (8)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete