NukeResources :: View topic - Top poster Block
Top poster Block
Posted: Sat May 20, 2006 4:42 pm
djdiper
Resource Seeker
Joined: Apr 07, 2006
Posts: 16
Hi there people
I downloaded the Top Poster block from this site.
The block shows top 5 posters in the forum.
There is one thing I would like to change in this block.
This block shows contents downwards with this code:
Code: }
$a = 1;
global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $admin, $module_name;
$result=sql_query("SELECT user_id, username, user_posts, user_avatar FROM ".$user_prefix."_users ORDER BY user_posts DESC LIMIT 0,5", $dbi);
while(list($user_id, $username, $user_posts, $user_avatar) = sql_fetch_row($result, $dbi)) {
$content .= "<div align=\"center\"><table class=\"outer\" cellpadding=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" cellspacing=\"1\" border=\"0\">";
$content .= "<tr class=\"even\" vAlign=\"middle\">";
$content .= "<td align=\"middle\">";
if ($user_avatar=="") {
$content .= " <a href=\"forum-userprofile-.html$user_id\"><img alt src=\"modules/Forums/images/avatars/noimage.gif\" border =\"0\" width=\"32\"></a></td>";
}
else
if (eregi("http://", $user_avatar)) {
$content .= " <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><img alt src=\"$user_avatar\" border =\"0\" width=\"32\"></a></td>";
}
else
$content .= " <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><img alt src=\"modules/Forums/images/avatars/$user_avatar\" border =\"0\" width=\"32\"></a></td>";
$content .= "<td align=\"middle\"> <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><b>$username</b></a> <br> <a href=\"modules.php?name=Forums&file=search&search_author=$username\">Posts:</a>";
$content .= " <a href=\"modules.php?name=Forums&file=search&search_author=$username\">$user_posts</a> </td>";
$content .= "</tr>";
$content .= "</table></div><hr>";
}
Do you know how I can get this shown on one row?
I've tried to change the code tr and td, but with no luck..
Can anybody help me?
Posted: Sat May 20, 2006 6:47 pm
darklord
Resourceful
Joined: Feb 25, 2006
Posts: 210
see those <br> tags..remove em
but that will show 5 post..in one long row...expand ur site badly
If u want something different post with a little more detail.
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
Posted: Sun May 21, 2006 1:00 am
djdiper
Resource Seeker
Joined: Apr 07, 2006
Posts: 16
darklord wrote: see those <br> tags..remove em
but that will show 5 post..in one long row...expand ur site badly
If u want something different post with a little more detail.
Thx for the reply m8.
I want this as a Center block. Thats why i need it all in one line.
There is only one <br> tag, and removing that doesn't help.
Take a look at Raven's Site and see his Forum Center block.
THAT is what I would like
Not the Expand thing, but take a look at Top Users part of it!
Posted: Sun May 21, 2006 3:11 am
darklord
Resourceful
Joined: Feb 25, 2006
Posts: 210
now thats a bit better of detail...thats not somethin i could help u with using the code u posted..that is a block in itself..
u need to search for the block.
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
Posted: Sun May 21, 2006 3:13 am
djdiper
Resource Seeker
Joined: Apr 07, 2006
Posts: 16
darklord wrote: now thats a bit better of detail...thats not somethin i could help u with using the code u posted..that is a block in itself..
u need to search for the block.
Got it to work.
The code will be like this then:
Code: $a = 1;
global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $admin, $module_name;
$result=sql_query("SELECT user_id, username, user_posts, user_avatar FROM ".$user_prefix."_users ORDER BY user_posts DESC LIMIT 0,5", $dbi);
$content .= "<div align=\"center\"><table class=\"outer\" cellpadding=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" cellspacing=\"1\" border=\"0\">";
$content .= "<tr class=\"even\" vAlign=\"middle\">";
while(list($user_id, $username, $user_posts, $user_avatar) = sql_fetch_row($result, $dbi)) {
$content .= "<td align=\"middle\">";
if ($user_avatar=="") {
$content .= " <a href=\"forum-userprofile-.html$user_id\"><img alt src=\"modules/Forums/images/avatars/noimage.gif\" border =\"0\" width=\"32\"></a></td>";
}
else
if (eregi("http://", $user_avatar)) {
$content .= " <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><img alt src=\"$user_avatar\" border =\"0\" width=\"32\"></a></td>";
}
else
$content .= " <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><img alt src=\"modules/Forums/images/avatars/$user_avatar\" border =\"0\" width=\"32\"></a></td>";
$content .= "<td align=\"middle\"> <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><b>$username</b></a> <br> <a href=\"modules.php?name=Forums&file=search&search_author=$username\">Posts:</a>";
$content .= " <a href=\"modules.php?name=Forums&file=search&search_author=$username\">$user_posts</a> </td>";
}
$content .= "</tr>";
$content .= "</table></div><br>";
Posted: Sun May 21, 2006 3:20 am
darklord
Resourceful
Joined: Feb 25, 2006
Posts: 210
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
Posted: Sun May 21, 2006 3:23 am
djdiper
Resource Seeker
Joined: Apr 07, 2006
Posts: 16
darklord wrote: link me to ur site plz
Check Out our forum block at nukenorway or hxnorway
both of them are my sites
Posted: Sun May 21, 2006 4:32 am
darklord
Resourceful
Joined: Feb 25, 2006
Posts: 210
id like to see the block i mean working.
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
Posted: Sun May 21, 2006 4:37 am
djdiper
Resource Seeker
Joined: Apr 07, 2006
Posts: 16
darklord wrote: id like to see the block i mean working.
I have added the above code to the forum block.
You will see it on the frontpage of the site
Posted: Sun May 21, 2006 4:49 am
darklord
Resourceful
Joined: Feb 25, 2006
Posts: 210
cant see it..time for bed though...ill look at it tomorrow
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
NukeResources Forum Index -> Random Thoughts
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All times are GMT - 4 Hours
Page 1 of 1