Like the webmasters have done here, I want to put a table cell on my site which contains the user's info about his vB account, as well as the last 5 posts. I know how to get the last five posts, but how do i get the user's info?
Easy.
As long as you have called global.php, all that info is available to you.
$bbuserinfo[musername]
$bbuserinfo[usergroupid] etc etc.
Probably better to make a template then serve the page as a VB page.
------------------------------------
First, create a PHP page
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'your_page_name'); // 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(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'your_template_name',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
Be sure to keep your names matching (template name in your PHP file refers to the new template you just made - so keep the name the same)
And then, furthermore, you can easily add the 'Who's Online' data to you includes/functions_online.php file so you dont get the 'Unknown Location' in the WOL.
BTW - this is based on a VB 3.0.8 installation (just realised the initial post date - oops)
or you could always just use vbadvanced, that pretty much has all the tables you'll need.