|
|
Registered User Currently Offline
|
Posts: 20
Join Date: May 2005
|
yeh...
--this code is rrrrrrreallly bad. i would like it if someone cleaned it up :)--
hmm it would be nice if i made some auto inserting code but i cbf.
Members Page:
create file in your base forum dir (where index.php is located) 'members.php'
Code:
<?
if(!defined('SEO-BOARD'))
{
die($lang['fatal_error']);
}
require('forumheader.php');
require ('smilies/smilies.php');
$v = mysql_query("SELECT user_name, user_numposts, user_regdate, user_avatar, user_bio FROM `seo_board_users` ORDER BY `user_numposts` DESC");
$x=0;
while($x < 7){
/*user_name, user_timezone, user_numposts, user_regdate, user_allowviewonline, user_lasttimereadpost, user_lastsession, user_banned, user_avatar*/
$posts = sprintf("%s", mysql_result($v,$x,"user_numposts"));
$name = sprintf("%s", mysql_result($v,$x,"user_name"));
$date = date("M \\t\h\e d, Y", sprintf("%s", mysql_result($v,$x,"user_regdate")));
$bio = sprintf("%s", mysql_result($v,$x,"user_bio"));
$bio = str_replace(">","<li>",$bio);
$bio = format_bbcodes($bio);
$bio = fix_tabs_spaces($bio);
$bio = str_replace($sm_search, $sm_replace, $bio);
print eval(get_template('members'));
$x++;
}
?>
and den...
add file to your 'skin' directory 'members.htm'
REMEMBER it's .htm not .html . many potential tears over this mistake
Code:
<div style="width:100%; padding-bottom:40px;">
<div style="width:120px; float:left;padding-right:20px;">
<img src="upload/avatars/{$name}.jpg" alt="{$name}'s avatar"/></div>
<div style="float:left; width:300px;">
<h3>{$name}</h3>
<div style="float:right;color:#666666; font-family:Arial; font-size:12px;">Registered since {$date}. {$posts} posts</div><br/>
<hr/>
{$bio}
<hr/>
<a href="{$forumscript}?a=search&s=&postsby=&postauthor={$name}">[Click to find {$name}'s past posts]</a>
</div>
</div>
and then all we have to do is let index.php allow our little mod
Find:Code:
if (!isset($a) ||
!in_array($a, array
Insert into this arrayCode:
'members'
i.e. Code:
'register','vforum','members',
If that doesn't work get back to me. I've muddled the code up so much i just don't know these days... [confused]
|