We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Show/Hide Info Box
Topic Started: May 27 2012, 10:49 AM (2,791 Views)
Skyon Archer
Member Avatar
Member
[ *  *  *  * ]
Code Name: Show/Hide Info Box

What the code does: Places a box on the left bottom that can be hidden. This box will contain tons of information from the forum. It also removes items from the forum that are being displayed in the box to reduce redundancy.

How to use the code: copy/paste and it does it all itself

How to install the code:

Board Wrapper > Below The Board
Copy/Paste:

Code:
 
<script type="text/javascript">
//<![CDATA[
// Add guest/member hide-able info panel
// by Skyon Archer
if (location.href.indexOf('/index/') !== -1) {

var linksSKY = $('td.c_foot span.right').html();
//var firstinfoSKY = '' + linksSKY + '';
var footlinksSKY = $('td#foot_links').html();

if($('#top_info strong a').length){
var firstinfoSKY = '' + linksSKY + '';
var firstinfoSKY = firstinfoSKY.replace(/·/gi, '<br />');
var footlinkSKY = '' + footlinksSKY + '';
var footlinkSKY = footlinkSKY.replace(/·/gi, '<br />');
var pmSKY = $('li#menu_pm').html();
var pmSKY = ''+pmSKY+'';
var prefSKY = $('li#menu_ucp').html();
var logstatSKY = $('#top_info small').html();
var searchSKY = '<form action="http://mysearchspot.com/templates/standard/search_results.php" id="cse-search-box" target="_blank"><input type="hidden" name="cx" value="006196438914939330343:_ru-h9vl5eq" /><input type="hidden" name="cof" value="FORID:11" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="30" value="Internet Search..." onblur="if(value==\'\') value=\'Internet Search...\'" onfocus="if(value==\'Internet Search...\') value=\'\'" /> <button type="submit" name="sa">Search</button></form>';

}else{
var logstatSKY = '';
var pmSKY = '';
var prefSKY = '';
var logstatSKY = '';
var footlinkSKY = '';
var searchSKY = '';

var firstinfoSKY = " <form action='"+main_url+"login/log_in/' method='post'><table class='forums'><tr><td colspan='4'><strong>Username:</strong> <input type='text' size='20' maxlength='250' name='uname' /> <strong>Password:</strong> <input type='password' size='20' name='pw' /> <a href='"+main_url+"login/lostpw/'><small><em>forgot password?</em></small></a> <button type='submit' class='btn_mod'>Log In</button> - <a href='"+main_url+"register/'>Not a member? Register</a></td></tr></table></form>";

}
$("#top_bar").prepend("<style type='text/css'>*html #boxSKY{position: absolute;bottom: 0px;}#boxSKY{position:fixed;bottom: 0px;left: 0px;background: #F6F6F6;border: 3px solid #691F01;padding: 4px 8px;}td.c_foot span.right, li#menu_pm, li#menu_ucp, td#foot_links{display:none;}#contentSKY a{background:url('http://i.imgur.com/W3SFm.gif') no-repeat;padding-left: 16px;}</style><div id='boxSKY'> <button type='submit' class='btn_mod' id='LoginButton'>Show/Hide</button><div id='contentSKY'><p>" + logstatSKY +"</p>" + firstinfoSKY + "<br />" + footlinkSKY +"<br /> "+pmSKY+" "+prefSKY+" "+searchSKY+"<div id='categoriesSKY'><br /></div><div id='onlineSKY'><br /><strong>Users Online</strong></div></div></div>");

$('#top_bar button').live('click', function() {
var thisIndex = $(this).index();
$('#top_bar div#contentSKY:eq(' + thisIndex + ')').slideToggle('slow');
$('#top_bar div#contentSKY').not(':eq(' + thisIndex + ')').slideDown('slow');
});
$('td#stats_members a').each(function () {
var html2SKY = $(this).html();
var href2SKY = $(this).attr('href');
var member2SKY = $('#onlineSKY').append('<br /> <a href="' + href2SKY + '" title="' + html2SKY + '" class="mem">' + html2SKY + '</a> ');
});
var oSKY = $('#onlineSKY a.mem').length;
if(oSKY > 1){
$('#onlineSKY a.mem').append(",");
}
if (!oSKY){
var member2SKY = $('#onlineSKY').append('<br />No Members Online');
}
if($('#top_info strong a').length){
$('#categoriesSKY').append('<strong>Categories</strong>');
$('table.cat_head h2 a').each(function () {
var htmlSKY = $(this).html();
var hrefSKY = $(this).attr('href');
var catsSKY = $('#categoriesSKY strong').append('<br /> <a href="' + hrefSKY + '" title="' + htmlSKY + '" class="mem">' + htmlSKY + '</a> ');
});
}
}
//]]>
</script>


Member View:

Posted Image

Guest View:

Posted Image
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Awesome code.

Slight error: http://img848.imageshack.us/img848/4433/3649673ce3fb49de8081d6a.png

Also, it would be better if the expand/collapse feature remembered your choice with cookies.
Online Profile Quote Post Goto Top
 
Skyon Archer
Member Avatar
Member
[ *  *  *  * ]
Thanks fot the encouraging feedback, Cory. I'll see about the state cookie and your name display issue.
Offline Profile Quote Post Goto Top
 
tobeme
Member Avatar
Member
[ *  * ]
Thanks Skyon Archer for the great codes!

One question, could I remove the Administration and Moderator list? How?

Thanks for your help.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Javascripts
Code:
 
<style type="text/css">
#contentSKY a[href*="/stats/staff"], #contentSKY a[href*="/stats/staff"] + br {
display: none;
}
</style>
Online Profile Quote Post Goto Top
 
tobeme
Member Avatar
Member
[ *  * ]
Thanks Cory
Edited by tobeme, Aug 23 2012, 08:38 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply