Mod Table for staff
2 posters
Page 1 of 1
Mod Table for staff
I want a mod table code to appear like in the sceditor-group for staff only, I want to add 2 table one for Accepted Forums and one for Rejected Forums.
Last edited by Mati on September 11th 2015, 4:19 pm; edited 1 time in total
Re: Mod Table for staff
Hi @Mati,
Something like this topic, right ?
https://help.forumotion.com/t141539-is-that-possible-simple-menu-with-quick-replys#965626
If so, change the condition in the script :
to this :
That way it will only show for moderators and admins. If any questions let me know.
Something like this topic, right ?
https://help.forumotion.com/t141539-is-that-possible-simple-menu-with-quick-replys#965626
If so, change the condition in the script :
- Code:
if (!$.sceditor) return;
to this :
- Code:
if (!$.sceditor || !_userdata.user_level) return;
That way it will only show for moderators and admins. If any questions let me know.
Re: Mod Table for staff
Hi, @Ange Tuteur
I found this code which has classes and is easy for me to understand but is this only for staff members or for everyone?
Can you help me making this for staff only.
I found this code which has classes and is easy for me to understand but is this only for staff members or for everyone?
Can you help me making this for staff only.
- Code:
jQuery(window).load(function() {
/* mod tables */
jQuery('body').append('<div id="fa_modtable" class="select" style="visibility:hidden;width:auto;text-align:left;"><div class="modOption" id="MTable1">Solved</div><div class="modOption" id="MTable2">Denied</div><div class="modOption" id="MTable3">Information</div>');
jQuery('.sceditor-group:last-child').after('<div class="sceditor-group" id="fa_modtools"><a class="sceditor-button" title="Mod Tables" onclick="selectWysiwyg(this, \'fa_modtable\');"><div style="background:url(http://i56.servimg.com/u/f56/18/45/41/65/modera10.png) no-repeat center;"></div></a></div>');
/* mtable functions */
jQuery('#MTable1').click(function() { /* Solved */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-solved"][tr][td]Text for solved here','[/td][/tr][/table]');
});
jQuery('#MTable2').click(function() { /* Denied */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-denied"][tr][td]Text for Denied here','[/td][/tr][/table]');
});
jQuery('#MTable3').click(function() { /* Information */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-info"][tr][td]Text for Information here','[/td][/tr][/table]');
});
/* hide list onclick */
jQuery('.modOption').click(function() { jQuery('#fa_modtable').css('visibility','hidden'); });
});
Re: Mod Table for staff
Sure, replace it with this script :
- Code:
jQuery(function(){
_userdata.user_level && jQuery(function() {
/* mod tables */
jQuery('body').append('<div id="fa_modtable" class="select" style="visibility:hidden;width:auto;text-align:left;"><div class="modOption" id="MTable1">Solved</div><div class="modOption" id="MTable2">Denied</div><div class="modOption" id="MTable3">Information</div>');
jQuery('.sceditor-group:last-child').after('<div class="sceditor-group" id="fa_modtools"><a class="sceditor-button" title="Mod Tables" onclick="selectWysiwyg(this, \'fa_modtable\');"><div style="background:url(http://i56.servimg.com/u/f56/18/45/41/65/modera10.png) no-repeat center;"></div></a></div>');
/* mtable functions */
jQuery('#MTable1').click(function() { /* Solved */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-solved"][tr][td]Text for solved here','[/td][/tr][/table]');
});
jQuery('#MTable2').click(function() { /* Denied */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-denied"][tr][td]Text for Denied here','[/td][/tr][/table]');
});
jQuery('#MTable3').click(function() { /* Information */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-info"][tr][td]Text for Information here','[/td][/tr][/table]');
});
/* hide list onclick */
jQuery('.modOption').click(function() { jQuery('#fa_modtable').css('visibility','hidden'); });
});
});
Similar topics
» how can i add a staff table
» Need Help With Table For Staff
» Need Help With Table For Staff
» Need Help With Table On My Site For Staff
» [PunBB] Staff Affiliate Table
» Need Help With Table For Staff
» Need Help With Table For Staff
» Need Help With Table On My Site For Staff
» [PunBB] Staff Affiliate Table
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum