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
Moderator of Drop Down Menu
Topic Started: Apr 1 2012, 06:56 PM (1,320 Views)
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code Name: Moderator of Drop Down Menu

What the code does: This turns the 'Moderator of' list-style for Forum Moderators on the Administration and Moderator List to a drop down menu. Preview

How to use the code: Install as instructed, no editing is required.

How to install the code:

Admin CP >> Themes>> Board Template >> Below the Board
Code:
 
<script type="text/javascript">
(function ($) {
$('#forum_leaders tr').each(function () {
$(this).find('td:eq(1) a').each(function () {
var href = $(this).attr('href');
var text = $(this).text();

$(this).replaceWith('<option value="' + href + '">' + text + '</option>');
});
$(this).find('td:eq(1)').wrapInner('<select class="moderator_of" />').css('color', 'transparent');
});

$('select.moderator_of').each(function () {
var n_options = $(this).find('option').length;
$(this).prepend('<option selected="selected" style="font-style: italic">' + n_options + ' Forums:</option>');
});

$('select.moderator_of option').click(function () {
window.location = $(this).val();
});
})(jQuery);
</script>
Edited by Cory, Oct 29 2016, 12:55 AM.
Online Profile Quote Post Goto Top
 
Geoffrey
Member Avatar
bury hatchets, keep maps
[ *  *  *  *  * ]
You're a saint. Thank youuu!
Offline Profile Quote Post Goto Top
 
Nicolas-ZNR
Member Avatar
Member
[ *  *  *  *  *  *  * ]
Thanks for taking the time to write this one, Cory. ;)
A minor suggestion, though: the first option that you prepend to the drop down should say how many forums they moderate instead of "select a forum". :)
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Great idea, Nicolas. I have updated the code to reflect this change. :)
Online Profile Quote Post Goto Top
 
2wise69
Member Avatar
Member
[ *  * ]
Awesome. Thank you Cory!
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