The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using VB Stats on a custom main page
Hi guys,
Im not sure how to do this so im going to ask, i have just made a custom main page as i got sick of Vbadvanced portal but im stuck on how to get the forum statistics on the custom page, my link is http://www.digitalised-data.com if anyone can help or give me an idea id be very greatfull. Regards Rick. --------------- Added [DATE]1211659775[/DATE] at [TIME]1211659775[/TIME] --------------- And i have already searched the forum for several hours the only promising things are in the graveyard --------------- Added [DATE]1211678497[/DATE] at [TIME]1211678497[/TIME] --------------- Well guys im all out of ideas any help on this matter would be great lol im going nuts here lol |
#2
|
|||
|
|||
If you have PHP & MySQL experience you could pull data directly from the datastore table in vBulletin. I think the "forumcache" variable is there too, so you can use that to calculate the posts & threads.
Check the vBulletin index.php file and see how it works it out and then just emulate it yourself. |
#3
|
|||
|
|||
yeah i was trying yesterday for a while but the custom page is out side the forum directory so its proving to be a pain int he hind, thanks for the reply also its appretiated
Rick, |
#4
|
||||
|
||||
What issues are you having?
|
#5
|
|||
|
|||
Basicly what i want to do dismounted is have the forum stats display on a page outside of the Vbulletin forum root, by stats i mean Topics, Posts, and Users, thanks for the reply mate any ideas ?
Rick, |
#6
|
||||
|
||||
I'm asking what HAVE you been trying, what have you done?
Just include global.php and do whatever. |
#7
|
|||
|
|||
Ok the main problem im having is this
I include this :> require_once('./global.php'); and i include this :> $navbits = array(); $navbits[$parent] = 'Test Page'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('TEST') . '");'); here is the test page link as you can see it isnt working i cant quite work out why either im no PHP pro so im gettng stuck here --------------- Added [DATE]1211798061[/DATE] at [TIME]1211798061[/TIME] --------------- Ok so here is what i need to display on the none vbulletin page but it wont as i said im no expert <!-- logged-in users --> <tbody> <tr> <td class="thead" colspan="2"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a> <a href="online.php$session[sessionurl_q]" rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>) </td> </tr> </tbody> <tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]"> <tr> <td class="alt2"><a href="online.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td> <td class="alt1" width="100%"> <div class="smallfont"> <div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div> <div>$activeusers</div> </div> </td> </tr> </tbody> <!-- end logged-in users --> </if> <tbody> <tr> <td class="thead" colspan="2"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a> <phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase> </td> </tr> </tbody> <tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]"> <tr> <td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></td> <td class="alt1" width="100%"> <div class="smallfont"> <div> $vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers<if condition="$show['activemembers']">, <span title="<phrase 1="$vboptions[activememberdays]">$vbphrase[within_the_last_x_days]</phrase>">$vbphrase[active_members]: $activemembers</span> </if> </div> <div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div> </div> </td> </tr> </tbody> <!-- end what's going on box --> Ive also tried making the actual page inside of vbulletin and using the call function index.php to call the actual page that works but it wont show stats The test url is the same still www.digitalised-data.com/test.php --------------- Added [DATE]1211799004[/DATE] at [TIME]1211799004[/TIME] --------------- as far as i can tell it wont display the information because the test.php is outside of the forum folder and this is were im stuck because if i make the same text.php inside the forum folder what im doing works so all i need help with really is getting it to work outsite of /forum/ --------------- Added [DATE]1211807651[/DATE] at [TIME]1211807651[/TIME] --------------- ok here is a example of how it should look if it was successfull it isnt inline as its just for testing purposes but you get the idea http://digitalised-data.com/forum/test1.php Thanks again Rick. --------------- Added [DATE]1211828276[/DATE] at [TIME]1211828276[/TIME] --------------- Alright guys after much searching on the forums i have had an idea, do i need to call some sort of function or include something to allow the code to work out side of the Forum root DIR ? because that is all i can think of now what i have got so far works perfectly but it will only work within the forum DIR any ideas guys ? Rick, |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|