SimplePortal

Customization => Custom Coding => Topic started by: Nabil on January 08, 2009, 07:38:00 AM

Title: Top Posters Block with Show Case
Post by: Nabil on January 08, 2009, 07:38:00 AM
here is a Code to show the Top Posters with Show Case , it would show more information with a Mouse pointing at the Name or at the resized Avatar image in the block.

just Copy and paste the Code inside a php Block

Some Setting Information about the Code
* to Specify how many Posters should be Displayed see the $p11=10; at the Top of the Code , the Number 10 means displaying 10 , you can change the Number as you like

* the Code below is thought of to be left side Block , if you want to show the block at the right Side of the Template change in the style area of the Code :
margin-left:0px;  to margin-left:-250px;

The Code is tested with IE6 , IE7 , Mozilla and Opera

Code: [Select]
<?php
$p11
=10;
?>

<style>
#navi {

}

#navi a{
display:inline;
text-decoration: none;
}

#navi a {
text-decoration:none;
}


#navi a:hover{
background:none;

}

#navi a .showcase {
display: none;
border:1px solid #342343;
}

#navi a:hover .showcase {
position:absolute;
display:inline;
margin-top:0px;
margin-left:0px;
width:150px;
padding:5px;
background:#ffffff;
}

div#navi a .showcase {
display: none;

}


</style>
<?php
global $settings;
$ask=mysql_query("SELECT * FROM smf_members ORDER BY posts DESC"); $x11=0
while (
$row mysql_fetch_array($askMYSQL_ASSOC) ){
$x11+=1;
$post1=$row[posts]; 

if (
$post2==$post1){ continue; };
$group1=$row[ID_GROUP]; // Member Group ID
$postgroup1=$row[ID_POST_GROUP]; // Post Group
$gender1=$row[gender];
$lastlogin1=$row[lastLogin]; 
$idmember1=$row[ID_MEMBER]; // Member ID
$avatarin=$row[avatar]; // Avatar
$memberName1=$row[memberName]; // Member Name

/////////////////// THE BLOCK ////////////////////////
if ($lastlogin1!=0){ $datelog1=date("d.M.Y H:i",$lastlogin1); } 
else {
$datelog1=''
};
$dateReg1=$row[dateRegistered]; $dateform =date("d.M.Y H:i",$dateReg1);
$birthdate1=$row[birthdate]; if ($birthdate1=='0001-01-01'){$birthdate1=''; };
$location1=$row[location];


if (
$group1!='0'){
$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$group1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$groupName1=$row3[groupName]; // Group Name
$star1=$row3[stars]; // How many Stars
};

$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$postgroup1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$postgroup2=$row3[groupName];
if (
$star1==''){$star1=$row3[stars]; };

// is the Member Online //////////////
$query mysql_query("SELECT * FROM smf_log_online"); 
$numberOfRows=mysql_num_rows($query); 
$imagepath1=$settings['images_url'];
if (
$numberOfRows>0){
$ask4=mysql_query("SELECT ip FROM smf_log_online WHERE ID_MEMBER='$idmember1'");
$row4 mysql_fetch_array($ask4MYSQL_ASSOC);
$conline1=$row4[ip]; 
};
/////////// how many Stars ////////////////////
$imagepath1=$settings['images_url'];
list(
$ngif,$gifn)=explode("#",$star1);
//////////////////////////////////////////////

///////////// Get The Avatar /////////////
if ($avatarin==''){
$ask5=mysql_query("SELECT filename, ID_ATTACH FROM smf_attachments WHERE ID_MEMBER='$idmember1'");
$row5 mysql_fetch_array($ask5MYSQL_ASSOC);
$avatar1=$row5[filename]; $idattach1=$row5[ID_ATTACH];
};


///////////// displaying the infos //////////////// 

if ($avatarin!=''){
$checkavatar1=preg_match('/http:\/\//',$avatarin);
if (
$checkavatar1){ 
$avatarVar="<img src='$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='$avatarin' border='0' style='width:40px; margin-right:5px; float:left' align='top'>";
$display11=1;
} else {
$avatarVar="<img src='avatars/$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='avatars/$avatarin' border='0' style='width:40px; margin-right:5px; float:left' align='top'>";
$display11=1;
}
};

if (
$avatar1!=''){
$avatarVar="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='width:40px; height:40px; margin-right:5px; float:left' align='top'>";
$display11=1;
};

if (
$display11!=1){$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; margin-right:5px; float:left' align='top'>"; };
echo 
"
<table align='center' cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center'>"
;
if (
$x11!=1){
echo 
"
<hr width='90%' style='border-style: dotted' align='center'>"

};
echo 
"
<div id='navi' style='width:100%' align='center'>
<table border='0' align='center' style='width:90%'><tr><td align='left'>
<a href='index.php?action=profile;u=
$idmember1'>$avatarVarsmall<span align='top' style='display:inline; float:left' valign='top'>$memberName1<br>$post1 Posts</span><span class='showcase'>";

echo
"<div align='center' >";

echo 
$avatarVar;
echo 
"<b>$memberName1</b>"."<br>";
if (
$groupName1!='') { echo "<b>$groupName1</b><br>"; };
echo 
"<b>$postgroup2</b><br>";
echo 
"<div style='margin:5px'>";
for (
$i11=0$i11<$ngif$i11+=1){
echo 
"<img src='$imagepath1/$gifn' border='0'>";
};
echo 
"</div>";
if (
$conline1!=''){
echo 
"<img src='$imagepath1/useron.gif' border='0' style='margin:5px'><br>"; } else {
echo 
"<img src='$imagepath1/useroff.gif' border='0' style='margin:5px'><br>";
}


if (
$gender!=''){ echo "<b>Gender:</b> ".$gender1."<br>"; };
if (
$datelog1==''){ $datelog1='Never'; };
echo 
"<b>Last Active:</b><br>".$datelog1."<br>"
echo 
"<b>Date Registered:</b><br>".$dateform."<br>";
if (
$birthdate1!='') { echo "<b>Date of Birth:</b><br>".$birthdate1."<br>"; };
if (
$location1!='') { echo "<b>Location:</b><br>".$location1."<br>"; };
echo 
"<b>Posts:</b> ".$post1."<br>";


echo 
"</div>";
////////////////////////////////// END BLOCK ///////////////////
echo "
</td></tr></table>
</span>
</a></div></td></tr></table>"
;
$star1=''$post2=$post1$groupName1=''$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; height:40px; margin-right:5px; float:left' align='top'>"$avatarVar='';
if (
$x11==$p11){ break; };

// end while*/
?>



Title: Re: Top Posters Block with Show Case
Post by: bmac on January 08, 2009, 11:59:26 AM
Excellent! I love this block.

The only problem I see is this if I click on the avatar to go to the users profile, it goes to this url:  www.hjhjhg.de

I changed the url to my forum,and that works now, but I need to know what to change so the it goes to the proper users profile. Right now they all go to (action=profile;u=12) I'm sure this is simple fix, I just haven't figured it out yet..

How do I change this?

Brian
Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 08, 2009, 12:12:56 PM
Sorry , I forget that part , wait , I make an update , oh no forgot that
Title: Re: Top Posters Block with Show Case
Post by: bmac on January 08, 2009, 12:16:04 PM
Nabil,

Quote
Sorry , I forget that part , wait , I make an update , oh no forgot that

thanks for the excellent quick work on these blocks. They are exactley what I've been wanting. ;D

Bmac
Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 08, 2009, 12:27:57 PM
Ok , Lets Go , Code is Updated
Title: Re: Top Posters Block with Show Case
Post by: bmac on January 08, 2009, 12:43:53 PM
Perfect! Everything works great!

Thanks Nabil! ;D
Title: Re: Top Posters Block with Show Case
Post by: bmac on January 08, 2009, 07:55:31 PM
Nabil,

One more request.

Is there a way to modify this Block to allow clicking on the useron icon (http://simpleportal.net/Themes/novelty11/images/useron.gif)  next to the username to send them a PM as you can do on within the SMF forum threads? This would be in the showcase box that pops up. I would like to see this option added if possible.

thanks again..bmac
Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 09, 2009, 02:56:17 AM
Quote
Nabil,

One more request.

Is there a way to modify this Block to allow clicking on the useron icon   next to the username to send them a PM as you can do on within the SMF forum threads? This would be in the showcase box that pops up. I would like to see this option added if possible.

yes it is possible , I 'll deal with that when I have time but now you can update the Code , in this Update I have added the Gender Symbol
Code: [Select]
<?php
$p11
=10;
?>

<style>
#navi {

}

#navi a{
display:inline;
text-decoration: none;
}

#navi a {
text-decoration:none;
}


#navi a:hover{
background:none;

}

#navi a .showcase {
display: none;
border:1px solid #342343;
}

#navi a:hover .showcase {
position:absolute;
display:inline;
margin-top:0px;
margin-left:0px;
width:150px;
padding:5px;
background:#ffffff;
}

div#navi a .showcase {
display: none;

}


</style>
<?php
global $settings;

$ask=mysql_query("SELECT * FROM smf_members ORDER BY posts DESC"); $x11=0
while (
$row mysql_fetch_array($askMYSQL_ASSOC) ){
$x11+=1;
$post1=$row[posts]; 

if (
$post2==$post1){ continue; };
$group1=$row[ID_GROUP]; // Member Group ID
$postgroup1=$row[ID_POST_GROUP]; // Post Group
$gender1=$row[gender];  
$lastlogin1=$row[lastLogin]; 
$idmember1=$row[ID_MEMBER]; // Member ID
$avatarin=$row[avatar]; // Avatar
$memberName1=$row[memberName]; // Member Name

/////////////////// THE BLOCK ////////////////////////
if ($lastlogin1!=0){ $datelog1=date("d.M.Y H:i",$lastlogin1); } 
else {
$datelog1=''
};
$dateReg1=$row[dateRegistered]; $dateform =date("d.M.Y H:i",$dateReg1);
$birthdate1=$row[birthdate]; if ($birthdate1=='0001-01-01'){$birthdate1=''; };
$location1=$row[location];


if (
$group1!='0'){
$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$group1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$groupName1=$row3[groupName]; // Group Name
$star1=$row3[stars]; // How many Stars
};

$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$postgroup1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$postgroup2=$row3[groupName];
if (
$star1==''){$star1=$row3[stars]; };

// is the Member Online //////////////
$query mysql_query("SELECT * FROM smf_log_online"); 
$numberOfRows=mysql_num_rows($query); 
$imagepath1=$settings['images_url'];
if (
$numberOfRows>0){
$ask4=mysql_query("SELECT ip FROM smf_log_online WHERE ID_MEMBER='$idmember1'");
$row4 mysql_fetch_array($ask4MYSQL_ASSOC);
$conline1=$row4[ip]; 
};
/////////// how many Stars ////////////////////
$imagepath1=$settings['images_url'];
list(
$ngif,$gifn)=explode("#",$star1);
//////////////////////////////////////////////

///////////// Get The Avatar /////////////
if ($avatarin==''){
$ask5=mysql_query("SELECT filename, ID_ATTACH FROM smf_attachments WHERE ID_MEMBER='$idmember1'");
$row5 mysql_fetch_array($ask5MYSQL_ASSOC);
$avatar1=$row5[filename]; $idattach1=$row5[ID_ATTACH];
};


///////////// displaying the infos //////////////// 

if ($avatarin!=''){
$checkavatar1=preg_match('/http:\/\//',$avatarin);
if (
$checkavatar1){ 
$avatarVar="<img src='$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='$avatarin' border='0' style='width:40px; margin-right:5px; float:left' align='top'>";
$display11=1;
} else {
$avatarVar="<img src='avatars/$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='avatars/$avatarin' border='0' style='width:40px; margin-right:5px; float:left' align='top'>";
$display11=1;
}
};

if (
$avatar1!=''){
$avatarVar="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='width:40px; height:40px; margin-right:5px; float:left' align='top'>";
$display11=1;
};

if (
$display11!=1){$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; margin-right:5px; float:left' align='top'>"; };
echo 
"
<table align='center' cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center'>"
;
if (
$x11!=1){
echo 
"
<hr width='90%' style='border-style: dotted' align='center'>"

};
echo 
"
<div id='navi' style='width:100%' align='center'>
<table border='0' align='center' style='width:90%'><tr><td align='left'>
<a href='index.php?action=profile;u=
$idmember1'>$avatarVarsmall<span align='top' style='display:inline; float:left' valign='top'>$memberName1<br>$post1 Posts</span><span class='showcase'>";

echo
"<div align='center' >";

echo 
$avatarVar;
echo 
"<b>$memberName1</b>"."<br>";
if (
$groupName1!='') { echo "<b>$groupName1</b><br>"; };
echo 
"<b>$postgroup2</b><br>";
echo 
"<div style='margin:5px'>";
for (
$i11=0$i11<$ngif$i11+=1){
echo 
"<img src='$imagepath1/$gifn' border='0'>";
};
echo 
"</div>";
if (
$conline1!=''){
echo 
"<img src='$imagepath1/useron.gif' border='0' style='margin:5px'><br>"; } else {
echo 
"<img src='$imagepath1/useroff.gif' border='0' style='margin:5px'><br>";
}


if (
$gender1!=0){ 
if (
$gender1==1){$gender1="<img src='$imagepath1/Male.gif' border='0'>"; } 
else { 
$gender1="<img src='$imagepath1/Female.gif' border='0'>"; }
echo 
"<b>Gender:</b> ".$gender1."<br>"
                 }; 
/// End gender1
if ($datelog1==''){ $datelog1='Never'; };
echo 
"<b>Last Active:</b><br>".$datelog1."<br>"
echo 
"<b>Date Registered:</b><br>".$dateform."<br>";
if (
$birthdate1!='') { echo "<b>Date of Birth:</b><br>".$birthdate1."<br>"; };
if (
$location1!='') { echo "<b>Location:</b><br>".$location1."<br>"; };
echo 
"<b>Posts:</b> ".$post1."<br>";


echo 
"</div>";
////////////////////////////////// END BLOCK ///////////////////
echo "
</td></tr></table>
</span>
</a></div></td></tr></table>"
;
$star1=''$post2=$post1$gender1=''$groupName1=''$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; height:40px; margin-right:5px; float:left' align='top'>"$avatarVar='';
if (
$x11==$p11){ break; };

// end while*/
?>

Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 09, 2009, 05:37:43 PM
I have made an Update to the Code , now it is possible to click on the online image to write a PM to the Members that are shown in the Block
here is the Updated code :
Code: [Select]
<?php
$p11
=10;
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>

<title>
</title>
</head>
<body>
<style>
#navi {
float: left;

}

#navi a {
text-decoration:none;

}

#navi a:hover {
background:none;
}

div#navi a  .showcase {
display:none;
}

div#navi:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}

div#navi a:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}


</style>
</style>
<?php
global $settings;

$ask=mysql_query("SELECT * FROM smf_members ORDER BY posts DESC"); $x11=0
while (
$row mysql_fetch_array($askMYSQL_ASSOC) ){
$x11+=1;
$post1=$row[posts]; 

if (
$post2==$post1){ continue; };
$group1=$row[ID_GROUP]; // Member Group ID
$postgroup1=$row[ID_POST_GROUP]; // Post Group
$gender1=$row[gender];  
$lastlogin1=$row[lastLogin]; 
$idmember1=$row[ID_MEMBER]; // Member ID
$avatarin=$row[avatar]; // Avatar
$memberName1=$row[memberName]; // Member Name

/////////////////// THE BLOCK ////////////////////////
if ($lastlogin1!=0){ $datelog1=date("d.M.Y H:i",$lastlogin1); } 
else {
$datelog1=''
};
$dateReg1=$row[dateRegistered]; $dateform =date("d.M.Y H:i",$dateReg1);
$birthdate1=$row[birthdate]; if ($birthdate1=='0001-01-01'){$birthdate1=''; };
$location1=$row[location];


if (
$group1!='0'){
$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$group1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$groupName1=$row3[groupName]; // Group Name
$star1=$row3[stars]; // How many Stars
};

$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$postgroup1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$postgroup2=$row3[groupName];
if (
$star1==''){$star1=$row3[stars]; };

// is the Member Online //////////////
$query mysql_query("SELECT * FROM smf_log_online"); 
$numberOfRows=mysql_num_rows($query); 
$imagepath1=$settings['images_url'];
if (
$numberOfRows>0){
$ask4=mysql_query("SELECT ip FROM smf_log_online WHERE ID_MEMBER='$idmember1'");
$row4 mysql_fetch_array($ask4MYSQL_ASSOC);
$conline1=$row4[ip]; 
};
/////////// how many Stars ////////////////////
$imagepath1=$settings['images_url'];
list(
$ngif,$gifn)=explode("#",$star1);
//////////////////////////////////////////////

///////////// Get The Avatar /////////////
if ($avatarin==''){
$ask5=mysql_query("SELECT filename, ID_ATTACH FROM smf_attachments WHERE ID_MEMBER='$idmember1'");
$row5 mysql_fetch_array($ask5MYSQL_ASSOC);
$avatar1=$row5[filename]; $idattach1=$row5[ID_ATTACH];
};


///////////// displaying the infos //////////////// 

if ($avatarin!=''){
$checkavatar1=preg_match('/http:\/\//',$avatarin);
if (
$checkavatar1){ 
$avatarVar="<img src='$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='$avatarin' border='0' style='width:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
} else {
$avatarVar="<img src='avatars/$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='avatars/$avatarin' border='0' style='width:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
}
};

if (
$avatar1!=''){
$avatarVar="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
};

if (
$display11!=1){$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; margin-right:5px; float:left' align='top'>"; };
echo 
"
<table align='center' cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center'>"
;
if (
$x11!=1){
echo 
"
<hr width='90%' style='border-style: dotted' align='center'>"

};
echo 
"
<div id='navi' style='width:100%' align='center'>
<table border='0' style='width:90%' align='center'><tr><td align='left'>
<a href='index.php?action=profile;u=
$idmember1'>$avatarVarsmall<span align='top' style='display:inline; float:left' valign='top'>$memberName1<br>$post1 Posts</span><span class='showcase'>";


echo
"<table cellpadding='5' cellspacing='5' style='border:1px solid #000000' align='left'><tr><td align='center' style='border:1px dashed gray; padding:5px'>";
echo 
$avatarVar;
echo 
"<b>$memberName1</b>"."<br>";
if (
$groupName1!='') { echo "<b>$groupName1</b><br>"; };
echo 
"<b>$postgroup2</b><br>";
echo 
"<div style='margin:5px'>";
for (
$i11=0$i11<$ngif$i11+=1){
echo 
"<img src='$imagepath1/$gifn' border='0'>";
};
echo 
"</div>";
if (
$conline1!=''){

echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline'><img src='$imagepath1/useron.gif' border='0' style='margin:5px'></a><br>"; } else {
echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline'><img src='$imagepath1/useroff.gif' border='0' style='margin:5px'></a><br>";
}


if (
$gender1!=0){ 
if (
$gender1==1){$gender1="<img src='$imagepath1/Male.gif' border='0'>"; } 
else { 
$gender1="<img src='$imagepath1/Female.gif' border='0'>"; }
echo 
"<b>Gender:</b> ".$gender1."<br>"
                 }; 
/// End gender1
if ($datelog1==''){ $datelog1='Never'; };
echo 
"<b>Last Active:</b><br>".$datelog1."<br>"
echo 
"<b>Date Registered:</b><br>".$dateform."<br>";
if (
$birthdate1!='') { echo "<b>Date of Birth:</b><br>".$birthdate1."<br>"; };
if (
$location1!='') { echo "<b>Location:</b><br>".$location1."<br>"; };
echo 
"<b>Posts:</b> ".$post1."<br>";
echo
"</tr></td></table>";



////////////////////////////////// END BLOCK ///////////////////
echo "
</td></tr></table>
</span>
</a></div></td></tr></table>"
;
$star1=''$post2=$post1$gender1=''$groupName1=''$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>"$avatarVar='';
if (
$x11==$p11){ break; };

// end while*/
?>


Title: Re: Top Posters Block with Show Case
Post by: bmac on January 09, 2009, 09:43:54 PM
Nabil,

I tried this latest update, but it seems to still take me to the users profile instead of to the PM dialog box. I'll play around it it for a bit to see if I can figure out why. If you have any ideas let me know.

Thanks....Bmac
Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 10, 2009, 03:17:38 AM
in my Case it goes directly to 'New Message' , and as a Guest
it Goes first to login box

Quote
Nabil,

I tried this latest update, but it seems to still take me to the users profile instead of to the PM dialog box. I'll play around it it for a bit to see if I can figure out why. If you have any ideas let me know.

Thanks....Bmac

did you click on the small online/offline square image or did you click on the Avatar?
Title: Re: Top Posters Block with Show Case
Post by: bmac on January 10, 2009, 01:49:27 PM
Quote
did you click on the small online/offline square image or did you click on the Avatar?

Both, and they both take me to the profile page. Interstingly, when hovering over the online image it does indicate that it is pointing to this:

"http://steelheadnotebook.net/forum/index.php?action=pm;sa=send;u=5"

Yet when clicked on it goes to the profile page.

I recently added the SMF Ultimate Profile mod which is working great. I wonder if that has something to do with it. I'll keep playing around.

Bmac
Title: Re: Top Posters Block with Show Case
Post by: bmac on January 10, 2009, 03:12:11 PM
Nabil,

OK, I tried it on Internet Explorer and it works fine. It is only on Firefox where I have the problem with this going to the profile page. Any ideas on how to fix for Firefox?

Bmac
Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 10, 2009, 03:20:42 PM
I have also made a test , yes it happens Only in Mozilla not in IE6 , IE7 and Opera everything is ok, it goes to the PM area , I'll try to fix that and tell you the result
Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 10, 2009, 05:32:12 PM
I have Solved that problem , just use this Code:

Code: [Select]
<?php
$p11
=10;
if (
ereg("Firefox" $_SERVER["HTTP_USER_AGENT"])){ $user12="</a><a href='#'>";} else { $user12=""; };
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>

<title>
</title>
</head>
<body>
<style>
#navi {
float: left;

}

#navi a {
text-decoration:none;

}

#navi a:hover {
background:none;
}

div#navi a  .showcase {
display:none;
}

div#navi:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}

div#navi a:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}

</style>
</style>
<?php
global $settings;

$ask=mysql_query("SELECT * FROM smf_members ORDER BY posts DESC"); $x11=0
while (
$row mysql_fetch_array($askMYSQL_ASSOC) ){
$x11+=1;
$post1=$row[posts]; 

if (
$post2==$post1){ continue; };
$group1=$row[ID_GROUP]; // Member Group ID
$postgroup1=$row[ID_POST_GROUP]; // Post Group
$gender1=$row[gender];  
$lastlogin1=$row[lastLogin]; 
$idmember1=$row[ID_MEMBER]; // Member ID
$avatarin=$row[avatar]; // Avatar
$memberName1=$row[memberName]; // Member Name

/////////////////// THE BLOCK ////////////////////////
if ($lastlogin1!=0){ $datelog1=date("d.M.Y H:i",$lastlogin1); } 
else {
$datelog1=''
};
$dateReg1=$row[dateRegistered]; $dateform =date("d.M.Y H:i",$dateReg1);
$birthdate1=$row[birthdate]; if ($birthdate1=='0001-01-01'){$birthdate1=''; };
$location1=$row[location];


if (
$group1!='0'){
$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$group1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$groupName1=$row3[groupName]; // Group Name
$star1=$row3[stars]; // How many Stars
};

$ask3=mysql_query("SELECT groupName, stars FROM smf_membergroups WHERE ID_GROUP='$postgroup1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$postgroup2=$row3[groupName];
if (
$star1==''){$star1=$row3[stars]; };

// is the Member Online //////////////
$query mysql_query("SELECT * FROM smf_log_online"); 
$numberOfRows=mysql_num_rows($query); 
$imagepath1=$settings['images_url'];
if (
$numberOfRows>0){
$ask4=mysql_query("SELECT ip FROM smf_log_online WHERE ID_MEMBER='$idmember1'");
$row4 mysql_fetch_array($ask4MYSQL_ASSOC);
$conline1=$row4[ip]; 
};
/////////// how many Stars ////////////////////
$imagepath1=$settings['images_url'];
list(
$ngif,$gifn)=explode("#",$star1);
//////////////////////////////////////////////

///////////// Get The Avatar /////////////
if ($avatarin==''){
$ask5=mysql_query("SELECT filename, ID_ATTACH FROM smf_attachments WHERE ID_MEMBER='$idmember1'");
$row5 mysql_fetch_array($ask5MYSQL_ASSOC);
$avatar1=$row5[filename]; $idattach1=$row5[ID_ATTACH];
};


///////////// displaying the infos //////////////// 

if ($avatarin!=''){
$checkavatar1=preg_match('/http:\/\//',$avatarin);
if (
$checkavatar1){ 
$avatarVar="<img src='$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='$avatarin' border='0' style='width:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
} else {
$avatarVar="<img src='avatars/$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='avatars/$avatarin' border='0' style='width:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
}
};

if (
$avatar1!=''){
$avatarVar="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
};

if (
$display11!=1){$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; margin-right:5px; float:left' align='top'>"; };
echo 
"
<table align='center' cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center'>"
;
if (
$x11!=1){
echo 
"
<hr width='90%' style='border-style: dotted' align='center'>"

};
echo 
"
<div id='navi' style='width:100%' align='center'>
<table border='0' style='width:90%' align='center'><tr><td align='left'>
<a href='index.php?action=profile;u=
$idmember1'>$avatarVarsmall<span align='top' style='display:inline; float:left' valign='top'>$memberName1<br>$post1 Posts</span>$user12<span class='showcase'>";


echo
"<table cellpadding='5' cellspacing='5' style='border:1px solid #000000' align='left'><tr><td align='center' style='border:1px dashed gray; padding:5px'>";
echo 
$avatarVar;
echo 
"<b>$memberName1</b>"."<br>";
if (
$groupName1!='') { echo "<b>$groupName1</b><br>"; };
echo 
"<b>$postgroup2</b><br>";
echo 
"<div style='margin:5px'>";
for (
$i11=0$i11<$ngif$i11+=1){
echo 
"<img src='$imagepath1/$gifn' border='0'>";
};
echo 
"</div>";
if (
$conline1!=''){

echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useron.gif' border='0' style='margin:5px'></a><br>"; } else {
echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useroff.gif' border='0' style='margin:5px'></a><br>";
}


if (
$gender1!=0){ 
if (
$gender1==1){$gender1="<img src='$imagepath1/Male.gif' border='0'>"; } 
else { 
$gender1="<img src='$imagepath1/Female.gif' border='0'>"; }
echo 
"<b>Gender:</b> ".$gender1."<br>"
                 }; 
/// End gender1
if ($datelog1==''){ $datelog1='Never'; };
echo 
"<b>Last Active:</b><br>".$datelog1."<br>"
echo 
"<b>Date Registered:</b><br>".$dateform."<br>";
if (
$birthdate1!='') { echo "<b>Date of Birth:</b><br>".$birthdate1."<br>"; };
if (
$location1!='') { echo "<b>Location:</b><br>".$location1."<br>"; };
echo 
"<b>Posts:</b> ".$post1."<br>";
echo
"</tr></td></table>";



////////////////////////////////// END BLOCK ///////////////////
echo "
</td></tr></table>
</span>
</a></div></td></tr></table>"
;
$star1=''$post2=$post1$gender1=''$groupName1=''$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>"$avatarVar='';
if (
$x11==$p11){ break; };

// end while*/
?>

</body>
</html>
Title: Re: Top Posters Block with Show Case
Post by: bmac on January 10, 2009, 06:15:55 PM
Yep,,it's working on Firefox now. For some reason I am getting a bunch of errors logged since using this. All error messages are coming from:

"Themes/default/SPortal1-1.template.php (main sub template - eval?)"

Any ideas what could be causing this.
Title: Re: Top Posters Block with Show Case
Post by: Nabil on January 11, 2009, 03:02:03 AM
Quote
since using this. All error messages are coming from:

"Themes/default/SPortal1-1.template.php (main sub template - eval?)"

Any ideas what could be causing this.
This usually happens when you install a new Mod or Theme , just disable error Logging in the Admin (featuers and Options)so you dont have to delete the Messages every time from the Database
Title: Re: Top Posters Block with Show Case
Post by: [SiNaN] on February 03, 2009, 07:00:48 AM
Good idea Nabil. I won't code this block all, but will give you some clues to improve it. As this is a block code, you should not put <html> <head> <body> tags. Also, I see you take the long way to fetch the data. See this:

Code: [Select]
global $boarddir, $memberContext;

require_once($boarddir . '/SSI.php');

$top_posters = ssi_topPoster(10, 'array');
$poster_info = array();

foreach($top_posters as $poster)
{
loadMemberData($poster['id']);
loadMemberContext($poster['id']);

$poster_info[$poster['id']] = $memberContext[$poster['id']];
}

It will put *all* profile info of top posters to the $poster_info array. Add this code after the one above and you will see what's inside that array:

Code: [Select]
echo '<pre>';
print_r($poster_info);
echo '</pre>';

Now you can loop the $poster_info and show what you want.

Note that the code I gave will work for both versions of SMF.
Title: Re: Top Posters Block with Show Case
Post by: Buta on July 09, 2011, 03:37:27 AM
Hello all

I'm modified this code for smf 2.0 RC4 and nice work, but I have one little problem with avatar.
Code is
Code: [Select]
<?php
$p11
=10;
if (
ereg("Firefox" $_SERVER["HTTP_USER_AGENT"])){ $user12="</a><a href='#'>";} else { $user12=""; };
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>

<title>
</title>
</head>
<body>
<style>
#navi {
float: left;

}

#navi a {
text-decoration:none;

}

#navi a:hover {
background:none;
}

div#navi a  .showcase {
display:none;
}

div#navi:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}

div#navi a:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}

</style>
</style>
<?php
global $settings;

$ask=mysql_query("SELECT * FROM smf_members ORDER BY posts DESC"); $x11=0
while (
$row mysql_fetch_array($askMYSQL_ASSOC) ){
$x11+=1;
$post1=$row[posts]; 

if (
$post2==$post1){ continue; };
$group1=$row[id_group]; // Member Group ID
$postgroup1=$row[id_post_group]; // Post Group
$gender1=$row[gender];  
$lastlogin1=$row[last_login]; 
$idmember1=$row[id_member]; // Member ID
$avatarin=$row[avatar]; // Avatar
$memberName1=$row[member_name]; // Member Name

/////////////////// THE BLOCK ////////////////////////
if ($lastlogin1!=0){ $datelog1=date("d.M.Y H:i",$lastlogin1); } 
else {
$datelog1=''
};
$dateReg1=$row[date_registered]; $dateform =date("d.M.Y H:i",$dateReg1);
$birthdate1=$row[birthdate]; if ($birthdate1=='0001-01-01'){$birthdate1=''; };
$location1=$row[location];


if (
$group1!='0'){
$ask3=mysql_query("SELECT group_name, stars FROM smf_membergroups WHERE id_group='$group1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$groupName1=$row3[group_name]; // Group Name
$star1=$row3[stars]; // How many Stars
};

$ask3=mysql_query("SELECT group_name, stars FROM smf_membergroups WHERE id_group='$postgroup1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$postgroup2=$row3[group_name];
if (
$star1==''){$star1=$row3[stars]; };

// is the Member Online //////////////
$query mysql_query("SELECT * FROM smf_log_online"); 
$numberOfRows=mysql_num_rows($query); 
$imagepath1=$settings['images_url'];
if (
$numberOfRows>0){
$ask4=mysql_query("SELECT ip FROM smf_log_online WHERE id_member='$idmember1'");
$row4 mysql_fetch_array($ask4MYSQL_ASSOC);
$conline1=$row4[ip]; 
};
/////////// how many Stars ////////////////////
$imagepath1=$settings['images_url'];
list(
$ngif,$gifn)=explode("#",$star1);
//////////////////////////////////////////////

///////////// Get The Avatar /////////////
if ($avatarin==''){
$ask5=mysql_query("SELECT filename, id_attach FROM smf_attachments WHERE id_member='$idmember1'");
$row5 mysql_fetch_array($ask5MYSQL_ASSOC);
$avatar1=$row5[filename]; $idattach1=$row5[id_attach];
};


///////////// displaying the infos //////////////// 

if ($avatarin!=''){
$checkavatar1=preg_match('/http:\/\//',$avatarin);
if (
$checkavatar1){ 
$avatarVar="<img src='$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='$avatarin' border='0' style='width:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
} else {
$avatarVar="<img src='avatars/$avatarin' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='avatars/$avatarin' border='0' style='width:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
}
};

if (
$avatar1!=''){
$avatarVar="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='margin:5px'><br>";
$avatarVarsmall="<img src='index.php?action=dlattach;attach=$idattach1;type=avatar' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>";
$display11=1;
};

if (
$display11!=1){$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; margin-right:5px; float:left' align='top'>"; };
echo 
"
<table align='center' cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center'>"
;
if (
$x11!=1){
echo 
"
<hr width='90%' style='border-style: dotted' align='center'>"

};
echo 
"
<div id='navi' style='width:100%' align='center'>
<table border='0' style='width:90%' align='center'><tr><td align='left'>
<a href='index.php?action=profile;u=
$idmember1'>$avatarVarsmall<span align='top' style='display:inline; float:left' valign='top'>$memberName1<br>$post1 Postova</span>$user12<span class='showcase'>";


echo
"<table cellpadding='5' cellspacing='5' style='border:1px solid #000000' align='left'><tr><td align='center' style='border:1px dashed gray; padding:5px'>";
echo 
$avatarVar;
echo 
"<b>$memberName1</b>"."<br>";
if (
$groupName1!='') { echo "<b>$groupName1</b><br>"; };
echo 
"<b>$postgroup2</b><br>";
echo 
"<div style='margin:5px'>";
for (
$i11=0$i11<$ngif$i11+=1){
echo 
"<img src='$imagepath1/$gifn' border='0'>";
};
echo 
"</div>";
if (
$conline1!=''){

echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useron.gif' border='0' style='margin:5px'></a><br>"; } else {
echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useroff.gif' border='0' style='margin:5px'></a><br>";
}


if (
$gender1!=0){ 
if (
$gender1==1){$gender1="<img src='$imagepath1/Male.gif' border='0'>"; } 
else { 
$gender1="<img src='$imagepath1/Female.gif' border='0'>"; }
echo 
"<b>Spol:</b> ".$gender1."<br>"
                 }; 
/// End gender1
if ($datelog1==''){ $datelog1='Nikad'; };
echo 
"<b>Zadnje viđen:</b><br>".$datelog1."<br>"
echo 
"<b>Pristupio:</b><br>".$dateform."<br>";
if (
$birthdate1!='') { echo "<b>Datum rođenja:</b><br>".$birthdate1."<br>"; };
if (
$location1!='') { echo "<b>Lokacija:</b><br>".$location1."<br>"; };
echo 
"<b>Postova:</b> ".$post1."<br>";
echo
"</tr></td></table>";



////////////////////////////////// END BLOCK ///////////////////
echo "
</td></tr></table>
</span>
</a></div></td></tr></table>"
;
$star1=''$post2=$post1$gender1=''$groupName1=''$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>"$avatarVar='';
if (
$x11==$p11){ break; };

// end while*/
?>

</body>
</html>

See image in attach

Please help me about this code.
Thank you all
Title: Re: Top Posters Block with Show Case
Post by: Blue on July 09, 2011, 09:38:41 AM
Here, try this:
Code: [Select]
<?php
$p11
=10;
if (
ereg("Firefox" $_SERVER["HTTP_USER_AGENT"])){ $user12="</a><a href='#'>";} else { $user12=""; };
?>

<style>
#navi {
float: left;

}

#navi a {
text-decoration:none;

}

#navi a:hover {
background:none;
}

div#navi a  .showcase {
display:none;
}

div#navi:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}

div#navi a:hover  .showcase {
position:absolute;
display:inline;
background-color:#ffffff;
margin-left:0px;
border:1 px solid #000000;
}

</style>
</style>
<?php
global $settings;

$ask=mysql_query("SELECT * FROM smf_members ORDER BY posts DESC"); $x11=0
while (
$row mysql_fetch_array($askMYSQL_ASSOC) ){
$x11+=1;
$post1=$row[posts]; 

if (
$post2==$post1){ continue; };
$group1=$row[id_group]; // Member Group ID
$postgroup1=$row[id_post_group]; // Post Group
$gender1=$row[gender];  
$lastlogin1=$row[last_login]; 
$idmember1=$row[id_member]; // Member ID
$avatarin=$row[avatar]; // Avatar
$memberName1=$row[member_name]; // Member Name

/////////////////// THE BLOCK ////////////////////////
if ($lastlogin1!=0){ $datelog1=date("d.M.Y H:i",$lastlogin1); } 
else {
$datelog1=''
};
$dateReg1=$row[date_registered]; $dateform =date("d.M.Y H:i",$dateReg1);
$birthdate1=$row[birthdate]; if ($birthdate1=='0001-01-01'){$birthdate1=''; };
$location1=$row[location];


if (
$group1!='0'){
$ask3=mysql_query("SELECT group_name, stars FROM smf_membergroups WHERE id_group='$group1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$groupName1=$row3[group_name]; // Group Name
$star1=$row3[stars]; // How many Stars
};

$ask3=mysql_query("SELECT group_name, stars FROM smf_membergroups WHERE id_group='$postgroup1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$postgroup2=$row3[group_name];
if (
$star1==''){$star1=$row3[stars]; };

// is the Member Online //////////////
$query mysql_query("SELECT * FROM smf_log_online"); 
$numberOfRows=mysql_num_rows($query); 
$imagepath1=$settings['images_url'];
if (
$numberOfRows>0){
$ask4=mysql_query("SELECT ip FROM smf_log_online WHERE id_member='$idmember1'");
$row4 mysql_fetch_array($ask4MYSQL_ASSOC);
$conline1=$row4[ip]; 
};
/////////// how many Stars ////////////////////
$imagepath1=$settings['images_url'];
list(
$ngif,$gifn)=explode("#",$star1);
//////////////////////////////////////////////

///////////// Get The Avatar /////////////
      
global $memberContext;
      
loadMemberData($idmember1);
      
loadMemberContext($idmember1);


///////////// displaying the infos //////////////// 
$avatarVar='<img src="' $memberContext[$idmember1]['avatar']['href'] . '" border="0" style="margin:5px"><br>';
$avatarVarsmall='<img src="' $memberContext[$idmember1]['avatar']['href'] . '" border="0" style="width:40px; height:40px; margin-right:10px; float:left" align="top">';
$display11=1;

if (
$display11!=1){$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; margin-right:5px; float:left' align='top'>"; };
echo 
"
<table align='center' cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center'>"
;
if (
$x11!=1){
echo 
"
<hr width='90%' style='border-style: dotted' align='center'>"

};
echo 
"
<div id='navi' style='width:100%' align='center'>
<table border='0' style='width:90%' align='center'><tr><td align='left'>
<a href='index.php?action=profile;u=
$idmember1'>$avatarVarsmall<span align='top' style='display:inline; float:left' valign='top'>$memberName1<br>$post1 Postova</span>$user12<span class='showcase'>";


echo
"<table cellpadding='5' cellspacing='5' style='border:1px solid #000000' align='left'><tr><td align='center' style='border:1px dashed gray; padding:5px'>";
echo 
$avatarVar;
echo 
"<b>$memberName1</b>"."<br>";
if (
$groupName1!='') { echo "<b>$groupName1</b><br>"; };
echo 
"<b>$postgroup2</b><br>";
echo 
"<div style='margin:5px'>";
for (
$i11=0$i11<$ngif$i11+=1){
echo 
"<img src='$imagepath1/$gifn' border='0'>";
};
echo 
"</div>";
if (
$conline1!=''){

echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useron.gif' border='0' style='margin:5px'></a><br>"; } else {
echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useroff.gif' border='0' style='margin:5px'></a><br>";
}


if (
$gender1!=0){ 
if (
$gender1==1){$gender1="<img src='$imagepath1/Male.gif' border='0'>"; } 
else { 
$gender1="<img src='$imagepath1/Female.gif' border='0'>"; }
echo 
"<b>Spol:</b> ".$gender1."<br>"
                 }; 
/// End gender1
if ($datelog1==''){ $datelog1='Nikad'; };
echo 
"<b>Zadnje viden:</b><br>".$datelog1."<br>"
echo 
"<b>Pristupio:</b><br>".$dateform."<br>";
if (
$birthdate1!='') { echo "<b>Datum rodenja:</b><br>".$birthdate1."<br>"; };
if (
$location1!='') { echo "<b>Lokacija:</b><br>".$location1."<br>"; };
echo 
"<b>Postova:</b> ".$post1."<br>";
echo
"</tr></td></table>";



////////////////////////////////// END BLOCK ///////////////////
echo "
</td></tr></table>
</span>
</a></div></td></tr></table>"
;
$star1=''$post2=$post1$gender1=''$groupName1=''$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>"$avatarVar='';
if (
$x11==$p11){ break; };

// end while*/
?>

Title: Re: Top Posters Block with Show Case
Post by: yaosurfer on September 30, 2011, 06:12:02 AM
This code is sweet !
Made it work. Thanks!
Title: Re: Top Posters Block with Show Case
Post by: dhayzon on December 20, 2012, 10:06:04 AM
 :'( :'( :'( :'(

(http://i.imgur.com/fPnlC.png)
Code: [Select]

<?php
$p11
=10;
if (
ereg("Firefox" $_SERVER["HTTP_USER_AGENT"])){ $user12="</a><a href='#'>";} else { $user12=""; };
?>

<style>
#navi {
padding: 8px;
background: #C33;
display: inline-block;
}
#navi a {
text-decoration: none;
color: white;
font-weight: 300;
font-size: 120%;
font-family: 'Open Sans', sans-serif;
}

#navi a:hover {
background:none;
}

div#navi a  .showcase {
display:none;
}

div#navi:hover  .showcase {
position:absolute;
display:inline;
background-color: rgba(0, 0, 0, 0.87);
margin-left:0px;
font-size: 11px;
}
.showcase img {
max-width: 90px;
}
.showcase b {
color: #1E9DE4;
font-size: 12px;
font-weight: 400;
}
.showcase {
z-index: 1;
}
div#navi a:hover  .showcase {
position:absolute;
display:inline;
background-color: rgba(0, 0, 0, 0.87);
margin-left:0px;
}
#aportes {
position: relative;
margin-left: 6px;
background-color: #fafafa;
vertical-align: middle;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
margin-top: 8px; }

 
#aportes {
height: 22px;
border: 1px solid #CCC;
color: #777;
font-size: 11px;
text-align: center;
line-height: 22px;
width: 30px; }

#aportes:before {
content: '';
position: absolute;
top: 3px;
left: -6px;
border-width: 6px 6px 6px 0;
border-style: solid }
 
#aportes:before { margin-top:2px;border-color: transparent #ccc }
 

 
 
 
#aportes:after{
content: '';
position: absolute;
top: 4px;
left: -5px;
border-width: 5px 5px 5px 0;
border-style: solid;
border-color: transparent #fafafa }
 

#aportes:after { margin-top: 2px }
</style>
<?php
global $settings;

$ask=mysql_query("SELECT * FROM smf_members ORDER BY posts DESC"); $x11=0
while (
$row mysql_fetch_array($askMYSQL_ASSOC) ){
$x11+=1;
$post1=$row[posts]; 

if (
$post2==$post1){ continue; };
$group1=$row[id_group]; // Member Group ID
$postgroup1=$row[id_post_group]; // Post Group
$gender1=$row[gender];  
$lastlogin1=$row[last_login]; 
$idmember1=$row[id_member]; // Member ID
$avatarin=$row[avatar]; // Avatar
$memberName1=$row[member_name]; // Member Name

/////////////////// THE BLOCK ////////////////////////
if ($lastlogin1!=0){ $datelog1=date("d.M.Y H:i",$lastlogin1); } 
else {
$datelog1=''
};
$dateReg1=$row[date_registered]; $dateform =date("d.M.Y H:i",$dateReg1);
$birthdate1=$row[birthdate]; if ($birthdate1=='0001-01-01'){$birthdate1=''; };
$location1=$row[location];


if (
$group1!='1'){
$ask3=mysql_query("SELECT group_name, stars FROM smf_membergroups WHERE id_group='$group1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$groupName1=$row3[group_name]; // Group Name
$star1=$row3[stars]; // How many Stars
};

$ask3=mysql_query("SELECT group_name, stars FROM smf_membergroups WHERE id_group='$postgroup1'");
$row3 mysql_fetch_array($ask3MYSQL_ASSOC);
$postgroup2=$row3[group_name];
if (
$star1==''){$star1=$row3[stars]; };

// is the Member Online //////////////
$query mysql_query("SELECT * FROM smf_log_online"); 
$numberOfRows=mysql_num_rows($query); 
$imagepath1=$settings['images_url'];
if (
$numberOfRows>0){
$ask4=mysql_query("SELECT ip FROM smf_log_online WHERE id_member='$idmember1'");
$row4 mysql_fetch_array($ask4MYSQL_ASSOC);
$conline1=$row4[ip]; 
};
/////////// how many Stars ////////////////////
$imagepath1=$settings['images_url'];
list(
$ngif,$gifn)=explode("#",$star1);
//////////////////////////////////////////////

///////////// Get The Avatar /////////////
      
global $memberContext;
      
loadMemberData($idmember1);
      
loadMemberContext($idmember1);


///////////// displaying the infos //////////////// 
$avatarVar='<img src="' $memberContext[$idmember1]['avatar']['href'] . '" border="0" style="margin:5px"><br>';
$avatarVarsmall='<img src="' $memberContext[$idmember1]['avatar']['href'] . '" border="0" style="width: 55px; height: auto; margin-right:10px; float:left" align="top">';
$display11=1;

if (
$display11!=1){$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; margin-right:5px; float:left' align='top'>"; };

if (
$x11!=1){

};
echo 
"
<div id='navi'>
<a href='index.php?action=profile;u=
$idmember1'>$avatarVarsmall<span align='top' style='display:inline; float:left' valign='top'>$memberName1<br>aportes<div id='aportes'> $post1</div></span>$user12<span class='showcase'>";


echo
"<table cellpadding='5' cellspacing='5'  align='left'><tr><td align='center' style='padding:5px; color: #FFFF18;'>";
echo 
$avatarVar;
echo 
"<b>$memberName1</b>"."<br>";
if (
$groupName1!='') { echo "<b>$groupName1</b><br>"; };
echo 
"<b>$postgroup2</b><br>";
echo 
"<div style='margin:5px'>";
for (
$i11=0$i11<$ngif$i11+=1){
echo 
"<img src='$imagepath1/$gifn' border='0'>";
};
echo 
"</div>";
if (
$conline1!=''){

echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useron.gif' border='0' style='margin:5px'></a><br>"; } else {
echo 
"<a href='index.php?action=pm;sa=send;u=$idmember1' style='display:inline; width:30px'><img src='$imagepath1/useroff.gif' border='0' style='margin:5px'></a><br>";
}


if (
$gender1!=0){ 
if (
$gender1==1){$gender1="<img src='$imagepath1/Male.gif' border='0'>"; } 
else { 
$gender1="<img src='$imagepath1/Female.gif' border='0'>"; }
echo 
"<b>Sexo:</b> ".$gender1."<br>"
                 }; 
/// End gender1
if ($datelog1==''){ $datelog1='nunca'; };
echo 
"<b>Ultima Visita:</b><br>".$datelog1."<br>"
echo 
"<b>Registrado:</b><br>".$dateform."<br>";
if (
$birthdate1!='') { echo "<b>Fecha de Nacimiento:</b><br>".$birthdate1."<br>"; };
if (
$location1!='') { echo "<b>Pais:</b><br>".$location1."<br>"; };
echo 
"<b>aportes:</b> ".$post1."<br>";
echo
"</tr></td></table>";



////////////////////////////////// END BLOCK ///////////////////
echo "

</span>
</a></div>"
;
$star1=''$post2=$post1$gender1=''$groupName1=''$avatarVarsmall="<img src='$imagepath1/blank.gif' border='0' style='width:40px; height:40px; margin-right:10px; float:left' align='top'>"$avatarVar='';
if (
$x11==$p11){ break; };

// end while*/
?>

SimplePortal 2.3.8 © 2008-2024, SimplePortal