Hi,
Quote:
Originally posted by Matt
Is there anyway to encorporate this into a non-vb page?
|
include the follow global.php to your page...
PHP Code:
<?
// global.php
// Diese Datei ist f?r Webseiten die auf Funktionen eines vBulletin zugreifen
// wollen.
// Autor: westi (westi@ftpworld.org)
// Stand: v1.0 / 2001-12-02
$boardpath="/path/to/the/board";
unset($dbservertype);
//load config
require("$boardpath/admin/config.php");
require("$boardpath/admin/functions.php");
// init db **********************
// load db class
$dbservertype = strtolower($dbservertype);
$dbclassname="$boardpath/admin/db_$dbservertype.php";
require($dbclassname);
$DB_site=new DB_Sql_vb;
$DB_site->appname="vBulletin Control Panel";
$DB_site->appshortname="vBulletin (cp)";
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;
$DB_site->connect();
$dbpassword="";
$DB_site->password="";
// end init db
// load options
$optionstemp=$DB_site->query_first("SELECT template FROM template WHERE title='options'");
eval($optionstemp[template]);
// ################ END INIT #################
if ($bbuserid!="") {
$user=getuserinfo($bbuserid);
$username=$user[username];
$lastday=vbdate($dateformat,$user[lastvisit]+3600);
$lasttime=vbdate($timeformat,$user[lastvisit]+3600);
$templatesetid=$DB_site->query_first("SELECT templatesetid AS templatesetid FROM style WHERE styleid=$user[styleid]");
$templatesetid=$templatesetid[templatesetid];
$avatarurl=getavatarurl($user[userid]);
if ($avatarurl=='') {
$avatarurl='images/noavatar.gif';
}
$avatarimage='<a href="'.$bburl.'/member.php3?action=editavatar"><img src="'.$bburl.'/'.$avatarurl.'" border="0"></a>';
} else {
$avatarimage='<a href="'.$bburl.'/register.php?action=signup"><img src="'.$bburl.'/images/guestavatar.gif" border="0"></a>';
}
}
?>
greets,
westi