Announcement

Collapse
No announcement yet.

**Need an expierienced vbulletin coder both in html and php**

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HMBeaty
    replied
    Got it working, thanks to Paul M

    Leave a comment:


  • **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

Related Topics

Collapse

Working...
X