Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
PolarFox

Page: visitors - people-s who visited today

by PolarFox, Last updated on 5 years ago in Code Snippet and functions - 8
What is it?
The custom page with avatars + nicknames + userlevels(as hint) + lastvisits, with a bit pf CSS 2.0

for v7.02.xx

Installation:
Open admin panel -> custom pages
paste the code, save, done!

An example?
At my site http://unlogic.info/page/visited_toda...today.html

The code:

<style type="text/css">
/*<![CDATA[*/
.user-cell {
   float:left;
   text-align:center;
   width:128px;
   height:128px;
   margin:0 0.5em 2em 0;
   padding:0 0.5em;
   text-indent:-9999px;
}
.user-cell img {
   max-width:100px;
   max-height:100px;
   display:block;
   margin:0 auto;
   padding:0.2em 0;
}
.user-cell a {   
   visibility:hidden;
}
.user-cell:hover, .user-cell:hover a{
   text-indent:0;
   visibility:visible;
}
.clear {
   clear:both;
}   
/*]]>*/
</style>

<!-- CSS end here -->

<?php
$max = '200';//max users displayed
$timer = 86400;//time limit - 86400 s. == 24h == 1 day
$noavatar = 'noavatar100.png';//picture if no avatar selected
$locale['this_notfound'] = 'No users today.';//locales
$locale['this_avatar'] = 'Avatar';
$locale['this_nodata'] = 'no data';
//config end

$result = dbquery("SELECT user_id, user_name, user_status, user_lastvisit, user_avatar, user_level FROM ".DB_USERS." WHERE user_status='0' AND user_lastvisit>'".(time() - $timer)."'
   ORDER BY user_lastvisit DESC LIMIT 0,".$max);
if ($rows = dbrows($result)) {

   while ($data = dbarray($result)) {
      echo '<div class="user-cell" title="'.getuserlevel($data['user_level']).'">'.
         ($data['user_lastvisit']?showdate('shortdate', $data['user_lastvisit']):$locale['this_nodata']).
         '<img src="'.IMAGES.'avatars/'.($data['user_avatar']?$data['user_avatar']:$noavatar).'" alt="'.$locale['this_avatar'].'" />'.
         profile_link($data['user_id'], $data['user_name'], $data['user_status']).
         '</div>';
   }
   echo '<div class="clear"></div>';
}
else {
   echo '<p>'.$locale['this_notfound'].'</p>';}

?>


center-panel code:
opentable('Teh panelles');
?>
<style type="text/css">
/*<![CDATA[*/
.user-cell {
   float:left;
   text-align:center;
   width:128px;
   height:128px;
   margin:0 0.5em 2em 0;
   padding:0 0.5em;
   text-indent:-9999px;
}
.user-cell img {
   max-width:100px;
   max-height:100px;
   display:block;
   margin:0 auto;
   padding:0.2em 0;
}
.user-cell a {   
   visibility:hidden;
}
.user-cell:hover, .user-cell:hover a{
   text-indent:0;
   visibility:visible;
}
.clear {
   clear:both;
}   
/*]]>*/
</style>

<!-- CSS end here -->

<?php
$max = '200';//max users displayed
$timer = 86400;//time limit - 86400 s. == 24h == 1 day
$noavatar = 'noavatar100.png';//picture if no avatar selected
$locale['this_notfound'] = 'No users today.';//locales
$locale['this_avatar'] = 'Avatar';
$locale['this_nodata'] = 'no data';
//config end

$result = dbquery("SELECT user_id, user_name, user_status, user_lastvisit, user_avatar, user_level FROM ".DB_USERS." WHERE user_status='0' AND user_lastvisit>'".(time() - $timer)."'
   ORDER BY user_lastvisit DESC LIMIT 0,".$max);
if ($rows = dbrows($result)) {

   while ($data = dbarray($result)) {
      echo '<div class="user-cell" title="'.getuserlevel($data['user_level']).'">'.
         ($data['user_lastvisit']?showdate('shortdate', $data['user_lastvisit']):$locale['this_nodata']).
         '<img src="'.IMAGES.'avatars/'.($data['user_avatar']?$data['user_avatar']:$noavatar).'" alt="'.$locale['this_avatar'].'" />'.
         profile_link($data['user_id'], $data['user_name'], $data['user_status']).
         '</div>';
   }
   echo '<div class="clear"></div>';
}
else {
   echo '<p>'.$locale['this_notfound'].'</p>';}

closetable();


PS
you can save this css in a separated file!
Hello,

a great snippet

where is the button I like :G

greeting Septron
hi
for use in the panel how does it work?
yes I mean for the middle panel how her work?
nice ide
cool.,
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: PolarFox, behrooz, Septron, bonnis, rafi