PDA

View Full Version : header displaying stat like thingies...


Solice
02-04-2003, 08:06 PM
http://www.crystalterra.com/main
note these are test forums and are still under construction.

Ok, heres the dillio... as you can see I'm using a unique setup for my forums, every page is to show the welcome info at the top... well heres the problem... I know that admin/functions.php and global.php control the header, but I can't figure out where to add the following code or how to change it so that the header template is capable of displaying the users custom avatar, store points, rpg gil and new threads/posts...

any and all help is greatly appreciated ^^ thankies in advance

###
if ($bbuserinfo[userid]!=0) {
$avatarurl=getavatarurl($bbuserinfo[userid]);
if ($avatarurl=='') {
$avatarurl='images/avatars/noavatar.gif';
}
$avatarimage='<a href="member.php?s='.$session[sessionhash].'&action=editavatar"><img src="'.$avatarurl.'" border="0"></a>';
} else {
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/avatars/guestavatar.gif" border="0"></a>';
}
###
$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]'");
###
$storepoints=$bbuserinfo['storep'];
###

Davey
02-06-2003, 10:11 PM
Huh?
Um, :) not quite, lol.
You control the page headers in the templates.
Find the templates by clicking 'Modify' in the ACP (left frame menu right down the bottom) and click the 'expand all' button in the new page, and find the header template. Just put your code into there where you want it to appear and it will appear at the top of all pages.
Hope this helped.

Dave.

mr e
02-07-2003, 12:09 AM
global.php controls the header template, but i think you can do some of this in the php include template, but im not sure how to go about that

Solice
02-07-2003, 09:00 PM
@Davey: thats what I'm trying to avoid, because if I just edit the templates I've gotta edit a few dozen templates and then anytime I change something I gotta go through and edit them all again...

@Mr E: thanks... I'll check out the php include template... any other help is still very welcome