Version: 1.00, by BlackxRam
Developer Last Online: Feb 2020
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.
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 "
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
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.
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!!
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.
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