collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 557
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Top Posters Block with Show Case  (Read 15485 times)

0 Members and 1 Guest are viewing this topic.

Offline yaosurfer

  • Semi Newbie
  • *
  • Posts: 15
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Top Posters Block with Show Case
« Reply #20 on: September 30, 2011, 06:12:02 AM »
This code is sweet !
Made it work. Thanks!
« Last Edit: September 30, 2011, 02:46:23 PM by yaosurfer »

Offline dhayzon

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
  • http://dhayzon.com/
    • wWw.club-dhayzone.net
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Top Posters Block with Show Case
« Reply #21 on: December 20, 2012, 10:06:04 AM »
 :'( :'( :'( :'(

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*/
?>