Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Ultimate Forum Stats Integration for Non-VB Page Details »»
Ultimate Forum Stats Integration for Non-VB Page
Version: 1.00, by BlackxRam BlackxRam is offline
Developer Last Online: Feb 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-30-2004 Last Update: Never Installs: 33
 
No support by the author.

This Hack was a port over from my vb2.x script that pulled information from teh forum to a seperate script which you then could break apart and include into your standard website via PHP includes or SSI.

This version is about the same but it now works with VB3.00 Gold


Features for Logged in Members:

*Users Avatar
*Default Avatar For Members Without a Set Avatar
*Number of Registered Members
*Number of Threads
*Number of Posts
*How Many Posts since last visit
*How Many New PM's
*How Many PM's in your Inbox
*Latest Registered User
*Member with the Most Posts
*Member with the Most Threads

Features for Guests:

*Welcome Text
*VB3 Gold Login Box with option to Remember.
*Newest Member
*Member with the most Posts
*Member with the most Threads


All that is needed to do is download the attached Zip File. Then open the boardstat.php file in any Text Editor. Follow the Commented Portions that have been outlined in there. You will need to change all the PATHS and URLS in that file to match YOUR server. It might take some tweaking on your part but it works just fine as I have tested it with several other websites. When You are Done Editing it, just upload it to your forums directory and call it to your main website using php includes, ssi or iframes.

IF YOUR FORUMS AND SITE ARE ON DIFFERENT SERVERS THEN YOU HAVE TO USE AN IFRAME TO CALL THE FILE OVER. ANYTHING ELSE COULD YIELD HEADER ERRORS.

------------------------------------
Please Remember. Follow the in-file instructions
and edit all the URLS and PATHS. I can't stress this enough.
I just know someone will pop on and say "Why does my links point to http://www.yourdomain.com/forums..... This is a warning lol
------------------------------------

My Next Few Posts Will include Some Images of How the HTML is Built Inside the File.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 04-05-2004, 08:58 PM
Agent Richard Agent Richard is offline
 
Join Date: Jul 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I personally wouldn't mind it - I removed a lot of the stuff also.
Reply With Quote
  #23  
Old 04-05-2004, 09:10 PM
msimonds msimonds is offline
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I have on my index.php in my root folder

PHP Code:
<?php
error_reporting
(7);
//////////////////////////////////////
// You need to EDIT your PATHS or this will not WORK properly
//////////////////////////////////////
//  STEP #1
chdir('/home/yourpath/to/forums');
//chdir('..');
//////////////////////////////////////////////////////////////////
//You WILL Need to Enter your full path to global.php, below is just a Generic Version
//////////////////////////////////////////////////////////////////
//require_once("/home/rantman/public_html/forums/global.php");
require_once('./global.php');
//////////////////////////////////////////////////////////////////
//
// NO NEED TO EDIT ANYTHING IN THIS AREA!  PLEASE SCROLL DOWN!!
//
//////////////////////////////////////////////////////////////////
//
?>
and where I wanted to place the login form, I have this


PHP Code:
<?
                            $getnewestusers=$DB_site->query_first("SELECT userid,username FROM user ORDER BY joindate DESC LIMIT 1");
                            $newusername=$getnewestusers['username'];
                            $newuserid=$getnewestusers['userid'];
                            $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
                            $numbermembers=number_format($numbersmembers['users']);
                            if ($enablepms==1 and $permissions['canusepm'] and $bbuserinfo['receivepm']) {
                              $ignoreusers="";
                              if (trim($bbuserinfo['ignorelist'])!="") {
                                $ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
                              }
                              $allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
                              $newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers");
                              $unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers");
                              if ($newpm['messages']==0) {
                                echo "";
                              } else {
                                echo "";
                              }
                            } else {
                              $pminfo='';
                            }
                            require_once('/home/rantman/public_html/forums/includes/functions_user.php');
                            $indexpage = true;
                            $bbuserinfo['avatarurl'] =
                            fetch_avatar_url($bbuserinfo['userid']);
                            $newposts = $DB_site->query_first("
                                SELECT COUNT(*) AS count
                                FROM ".TABLE_PREFIX."post
                                WHERE dateline > '".$bbuserinfo['lastvisit']."'
                            ");
                            $activethreads = $DB_site->query_first("
                                SELECT COUNT(*) AS count
                                FROM ".TABLE_PREFIX."thread
                                WHERE lastpost > '".$bbuserinfo['lastvisit']."'
                            ");
                            fetch_options_overrides($bbuserinfo);
                            $newdate = vbdate($vboptions['timeformat'], $bbuserinfo['lastvisit'], 0);
                            $pmbox = array();
$pmbox['lastvisitdate'] = vbdate($vboptions['dateformat'], $bbuserinfo['lastvisit'], 1);
$pmbox['lastvisittime'] = vbdate($vboptions['timeformat'], $bbuserinfo['lastvisit']);
$pmunread_html = iif($bbuserinfo['pmunread'], "<strong>$bbuserinfo[pmunread]</strong>", $bbuserinfo['pmunread']);
$vbphrase['unread_x_nav_compiled'] = construct_phrase($vbphrase['unread_x_nav'], $pmunread_html);
$vbphrase['total_x_nav_compiled'] = construct_phrase($vbphrase['total_x_nav'], $bbuserinfo['pmtotal']);
                            // ########## \\__> Added from Hwulex's Welcome Hack THANKS!!!<__// ########## \\
                            $getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
                            $getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
                            if ($bbuserinfo['userid']!=0) {
                              $username=$bbuserinfo['username'];
                            ?>
                            <?                                   
                            echo "
                        
                            <td width="33%" class="RantMenuLight"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#EEEEEE">Welcome Back, <strong><b>$username!</b></strong><br><phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">Last visited: $pmbox[lastvisitdate] at $pmbox[lastvisittime]</phrase><br></font></td>
                            <td width="33%" align="center"><div align="center">
                            <a class="RantMenuLight" href="http://www.sportsrant.com/forums/login.php?do=logout" target="_parent"><b>Logout</b></a>&nbsp;|&nbsp;
                            <a class="RantMenuLight" href="http://www.sportsrant.com/forums/search.php?&do=getnew" target="_parent"><b>View New Posts</b></a>&nbsp;|&nbsp;
                            <a class="RantMenuLight" href="http://www.sportsrant.com/forums/usercp.php" target="_parent"><b>User CP</b></a>&nbsp;
                            </div></td>
                                                
                            <td width="33%"><div align="right">
                                  <font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#EEEEEE"><b>$bbuserinfo[pmunread] new message(s)<br>
                                  <a class="RantMenuLight" href="http://www.sportsrant.com/forums" target="_parent">Go To The Forums</a>
                            </div></td>
                                  <td width="1%">&nbsp;
                                                
                            
                            ";
                            
                            } else {
                            echo "
                            
                            
                            <td>
                            
                              <form action="http://www.sportsrant.com/forums/login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password)">
                                               <script type="text/javascript" src="http://www.sportsrant.com/forums/clientscript/vbulletin_md5.js"></script>
                            
                                                <td width="0%">&nbsp;</td>
                                                <td><table width="400" border="0" cellspacing="0" cellpadding="0">
                                                    <tr> 
                                                      <td width="150"><strong><font color="#EEEEEE" size="1" face="Verdana, Arial, Helvetica, sans-serif">Nickname: 
                                                        </font></strong>
                                                      <input type="text"  class="RantMenuTop" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
                                                      <td width="150"><strong><font color="#EEEEEE" size="1" face="Verdana, Arial, Helvetica, sans-serif">Password:</font></strong> 
                                                        <input type="password" class="RantMenuTop" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td>
                                                      <td><input type="image" src="images/srlogin.gif" value="Log in" tabindex="4" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" /></td>
                                                       <td class="RantMenuLight"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />Remember?</label></td>
                                                       </tr>
                                                  </table></td>
                                    <input type="hidden" name="s" value="" />
                                    <input type="hidden" name="do" value="login" />
                                    <input type="hidden" name="forceredirect" value="1" />            
                                    <input type="hidden" name="vb_login_md5password" />
                                    </form>
                                    </td>
                            <td width="60%" class="RantMenuLight"><div align="right">Welcome Guest!<br>
                            <a class="RantMenuLight" href="http://www.sportsrant.com/forums/register.php" target="_parent">Register</a>
                            </div></td>
                                                <td width="1%">&nbsp;
                                            
                            ";
                            }                            
                            echo "
                            </td>
                            ";
                            ?>


I can make modifications to work to try and help anyone out that wants to get this to work and I also attahed a modified login.php that can go into your root folder, NOT THE FORUMS FOLDER


Mike
Reply With Quote
  #24  
Old 04-07-2004, 03:54 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes one thing i forgot was the CHDIR thing. That was one of the things i added but my computer was overtaken by college freaks finishing up homeworks. Ill look over MSIMONDS stuff and finish it up in about an hour or so.
Reply With Quote
  #25  
Old 04-07-2004, 12:03 PM
msimonds msimonds is offline
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey if this works for anyone else then that is great. I fI Can help out in anyway just let me know. I have been trying to correct a different login for months becuase of a javescript error, but if it was not for your code, BlackxRam, then I would have never been able to get this to work. Great job man, really!!
Reply With Quote
  #26  
Old 04-08-2004, 02:30 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One problem I am upset about is the seemingly longer loading time. It was MUCH faster with VB2... Im not sure if its a VB3 issue but I would like to try to get it more streamlined.
Reply With Quote
  #27  
Old 04-08-2004, 05:18 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated the Zip File so everyone can understand it better.
Reply With Quote
  #28  
Old 04-08-2004, 01:49 PM
Bro_Joey_Gowdy's Avatar
Bro_Joey_Gowdy Bro_Joey_Gowdy is offline
 
Join Date: May 2002
Location: Hickory Flat MS 38633
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me clicks install
Reply With Quote
  #29  
Old 04-08-2004, 02:17 PM
msimonds msimonds is offline
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BlackxRam
One problem I am upset about is the seemingly longer loading time. It was MUCH faster with VB2... Im not sure if its a VB3 issue but I would like to try to get it more streamlined.

I actually have to agree with you there. It does seem to load slower, I will also look into this and see if I can somehow speed it up
Reply With Quote
  #30  
Old 04-10-2004, 12:58 PM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gave it a go.
All works fine except it wont display an avatar.
Just the little box with a red cross in it.

If I look at the html page produced I get

HTML Code:
 <a href="http://www.billspaintball.com/vb3/profile.php?&do=editavatar"><img src="image.php?u=1&amp;dateline=1036410394" border="0"></a>
However, If I use the image part of that and enter it straight into the browser like
HTML Code:
http://www.billspaintball.com/vb3/image.php?u=1&amp;dateline=1036410394" border="0"
The image will display.

What wrong???


EDIT:

Doh!!
Stupid mistake on my part.
FIxed

Great script, using on my site.
Reply With Quote
  #31  
Old 04-12-2004, 01:43 PM
egyptsons's Avatar
egyptsons egyptsons is offline
 
Join Date: Jan 2004
Location: Egypt
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

greatttttttttt
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.16725 seconds
  • Memory Usage 2,370KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete