PDA

View Full Version : User posts and Registry Date on Forumhome?


deSPIse
07-26-2004, 05:38 AM
I am currently making a skin for my board and i've created a box that i've placed designated fields for the following:

Username they are logged in as
The total amount of posts they have
And the date which they registered

Seeing as how this info is all contained in the postbit i was wondering how you could incorporate that information into the forumhome? because simply copying the variables from the postbit doesnt work because it calls from the showthread.php file im assuming...

so from my guess it would be a bit of coding you would need to add to the index.php...

if anybody could help me with this i'd greatly appreciate it :nervous:



to view what i am talking about goto:
http://micbooth.com/forums/index.php?&styleid=0

its the box on the right hand side under the topsite sponsor box

CarCdr
07-26-2004, 10:07 AM
Seeing as how this info is all contained in the postbit

The information is available to the postbit template because the values are setup by showthread.php and the functions it calls, primarily the longish 'construct_postbit' function.

You should be able to reference $bbuserinfo in index.php to get what you need for the currently logged-in user. You might try this...

In index.php, find:if ($bbuserinfo['userid'])
{ // registered user
$showmemberwelcome = true;

then add the following code directly under it:$myUserInfo['posts'] = vb_number_format($bbuserinfo['posts']);
$myUserInfo['datejoined'] = vbdate($vboptions['dateformat'], $bbuserinfo['joindate']);

then reference in the template (either 'navbar' or 'FORUMHOME'), the two new values being set, but only if they are set:<if condition="$showmemberwelcome">
... $bbuserinfo[username] ...
... $myUserInfo[datejoined] ...
... $myUserinfo[posts] ...
</if>


I hope this points you in the right direction.

deSPIse
07-26-2004, 04:41 PM
is that coding from vb3? because i cant seem to locate the first bit of coding in the index.php... im workin in 2.3.5, ive tried to insert that code in the similar spot in the index file but it doesnt work..

hmmm.. i see that is the right way to go tho... ill keep trying, thx

deSPIse
07-26-2004, 04:45 PM
this is the only bit of coding in my index.php i can find similar to that of which u posted... ive tried insertin the code you gave somewhere in it or after it and it doesnt work...


// if user is know, then welcome
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
eval("\$newposts = \"".gettemplate('forumhome_newposts')."\";");

} else {
$welcometext = "";
eval("\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}