vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   **Need an expierienced vbulletin coder both in html and php** (https://vborg.vbsupport.ru/showthread.php?t=122690)

HMBeaty 08-01-2006 01:30 AM

**Need an expierienced vbulletin coder both in html and php**
 
Just as the title says. If you can catch me on AIM as "fasternu8", that'd be good too. Anyway, I've been working on a couple projects on my site, and ONE has me REALLY stuck!!!! I'm trying to pull the stats from the forum index page (Threads, Posts, Members, Active Members) and get them to work on another page. I've so far gotten the Members and Active Members to work, but am totally stumped on how to get the Threads and Posts to come up!!!!

What I've got so far....
PHP Code:

<?php 

// ####################### SET PHP ENVIRONMENT ########################### 
error_reporting(E_ALL & ~E_NOTICE); 

// #################### DEFINE IMPORTANT CONSTANTS ####################### 
define('NO_REGISTER_GLOBALS'1); 
define('THIS_SCRIPT''advertise'); // change this depending on your filename 

// ################### PRE-CACHE TEMPLATES AND DATA ###################### 
// get special phrase groups 
$phrasegroups = array( 

); 

// get special data templates from the datastore 
$specialtemplates = array( 
    
'userstats'
); 

// pre-cache templates used by all actions 
$globaltemplates = array( 
    
'advertise'
); 

// pre-cache templates used by specific actions 
$actiontemplates = array( 

); 

// ######################### REQUIRE BACK-END ############################ 
require_once('./global.php');
require_once(
DIR'/includes/functions.php');

// ####################################################################### 
// ######################## START MAIN SCRIPT ############################ 
// ####################################################################### 

// ### BOARD STATISTICS #################################################

// get total threads & posts from the forumcache
$totalthreads 0;
$totalposts 0;
if (
is_array($vbulletin->forumcache))
{
    foreach (
$vbulletin->forumcache AS $forum)
    {
        
$totalthreads += $forum['threadcount'];
        
$totalposts += $forum['replycount'];
    }
}
$totalthreads vb_number_format($totalthreads);
$totalposts vb_number_format($totalposts);

// get total members and newest member from template
$numbermembers vb_number_format($vbulletin->userstats['numbermembers']);
$newusername $vbulletin->userstats['newusername'];
$newuserid $vbulletin->userstats['newuserid'];
$activemembers vb_number_format($vbulletin->userstats['activemembers']);
$show['activemembers'] = ($vbulletin->options['activememberdays'] > AND ($vbulletin->options['activememberoptions'] & 2)) ? true false;

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTTA HERE... ###
($hook vBulletinHook::fetch_hook('forumhome_complete')) ? eval($hook) : false;

$navbits = array(); 
$navbits[$parent] = 'Advertising on Redline Motorsports'

$navbits construct_navbits($navbits); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 
eval(
'print_output("' fetch_template('advertise') . '");'); 

?>

I (along with Zachariah) though putting....
PHP Code:

require_once(DIR'/includes/functions.php'); 

would help, but of course not, so if you can tell me what I need to add where ever, I'd greatly appreciate it. This is starting to get VERY frustrating!!!

Sorry, I know, wrong forum

RS_Jelle 08-01-2006 12:36 PM

Maybe you can take a look at psiStats 2006 :)

It displays all those stats, so you can take a look at the code to see how this is done ;)

HMBeaty 08-01-2006 10:01 PM

Couldn't find anything? Am I looking over something? I was looking through it kind of quick too, that mod has alot of files, lol

Paul M 08-01-2006 10:32 PM

You don't actually load the forum cache anywhere in that script, add these lines to the backend section.

PHP Code:

require_once(DIR '/includes/functions_forumlist.php');
cache_ordered_forums(1); 


HMBeaty 08-01-2006 10:43 PM

AWESOME!!! That worked nicely. Thank you Paul M!!!!! Just saved me from going through about 15 more files, lol. Thank you very much sir!!


All times are GMT. The time now is 05:55 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.01564 seconds
  • Memory Usage 1,744KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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