Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // zBB Functions
- // zBB is sceditor new functions, thanks Zeus, SSYT !
- // Beta version of code !
- (function($) {
- $(function() {$(function() {
- var zBB_config = {
- list: [
- "a.sceditor-button.sceditor-button-bold",
- "a.sceditor-button.sceditor-button-italic",
- "a.sceditor-button.sceditor-button-underline",
- "a.sceditor-button.sceditor-button-strike",
- "a.sceditor-button.sceditor-button-left",
- "a.sceditor-button.sceditor-button-center",
- "a.sceditor-button.sceditor-button-right",
- "a.sceditor-button.sceditor-button-justify",
- "a.sceditor-button.sceditor-button-quote",
- "a.sceditor-button.sceditor-button-code",
- "a.sceditor-button.sceditor-button-faspoiler",
- "a.sceditor-button.sceditor-button-fahide"
- ],
- type: {
- onStaff : {
- admin: false,
- moderator: false
- },
- byPosts:
- {
- active: true,
- postNumber: 15
- }
- },
- actived: true
- };
- if($('.sceditor-container').length && zBB_config.actived == true) {
- console.log('SCEditor has been detected !'); // For debugg
- if((_userdata.user_level == 1) && (zBB_config.type.onStaff.admin == true)) {
- var o = 0, sc = $('.sceditor-container');
- for(o; o<zBB_config.list.length; o++) $(zBB_config.list[o], sc).hide();
- }
- if((_userdata.user_level == 2) && (zBB_config.type.onStaff.moderator == true)) {
- var o = 0, sc = $('.sceditor-container');
- for(o; o<zBB_config.list.length; o++) $(zBB_config.list[o], sc).hide();
- }
- if((zBB_config.type.byPosts.active == true) && (_userdata.user_posts < zBB_config.type.byPosts.postNumber)) {
- var o = 0, sc = $('.sceditor-container');
- for(o; o<zBB_config.list.length; o++) $(zBB_config.list[o], sc).hide();
- }
- }
- })});
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement