<?php
echo "<div class='col-sm-12'>n";
echo "<table width='100%' border='0'><tr><td><span class='hdspan2'><b>".$locale['gb_809']."</b></span><p></td></tr></table>n";
$min = 4; // minimum visible bloggers in first level
$max = 12; // maximum number of bloggers in second level (hidden)
echo "
<!--
function toggle_bloggers() {
var smu = document.getElementById('show_more_bloggers');
var smutxt = document.getElementById('show_more_bloggers_text');
if (smu.style.display == 'none') {
smu.style.display = 'block';
smutxt.innerHTML = 'Show Less ...';
} else {
smu.style.display = 'none';
smutxt.innerHTML = 'Show More ...';
}
}
//-->
";
echo "<table align='center' width='70%' class=''>n";
$result = dbquery("SELECT * FROM ".DB_GRIMS_BLOG_ACCOUNTS." ORDER BY reg_time DESC LIMIT ".($min + $max)."");
if (dbrows($result)) {
$count = 0;
while($data = dbarray($result)) {
$user = $data['user_dude'];
$pic = $data['avatar'];
$timestamp = strtotime($data['reg_time']);
echo "<tr><td><img style='max-width:15px;height:auto; border-radius:50%' src='".BASEDIR."grims_blog/avatars/$pic' title='$user' /><a class='lnk-side' href='".BASEDIR."grims_blog/public_profiles.php?user_dude=".$user."'>$user</a> <span class='lnk-side-span'>Joined ".date("M Y", $timestamp)."</span></td></tr>n";
if ($count == $min) {
echo "</table>n";
echo "<div><a class='lnk-side' href="nojavascript...void(0)" >"toggle_bloggers();"><span id='show_more_bloggers_text'>Show More ...</span></a>n";
echo "<div id='show_more_bloggers' style='display: none;'><table align='center' width='70%' class=''>n";
echo "<tr><td><img style='max-width:15px;height:auto; border-radius:50%' src='".BASEDIR."grims_blog/avatars/$pic' title='$user' /><a class='lnk-side' href='".BASEDIR."grims_blog/public_profiles.php?user_dude=".$user."'>$user</a> <span class='lnk-side-span'>Joined ".date("M Y", $timestamp)."</span></td></tr>n";
}
$count++;
}
}
echo "</table>";
if ($count > $min) { echo "</div>n"; }
echo "<p></div>n";
?>
Category Forum
Code Snippet and functions - 9Labels
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions