Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Javascript] Admin/Mod Comment



Go to page : Previous  1, 2

View previous topic View next topic Go down Message [Page 2 of 2]

1
Offline

  Random Troll

Random Troll
Punbb Rookie
Punbb Rookie
First topic message reminder :

[Javascript] Admin/Mod Comment - Page 2 Rang10
Tutorial: Adding Admin/Mod Comments

This tutorial makes an Accept/Reject/Information buttons that only admins and moderators can see.

Credits: Ange Tuteur

--> Tutorials, tips and tricks <--
Adding Admin/Mod Comments by RandomTroller 



- Javascript

Code:
[panda=js]jQuery(window).load(function() {
if (typeof _userdata === "undefined") return;
if ((_userdata['user_level'] == '1') || (_userdata["user_level"] == '2')) {
 jQuery('body').append('<div id="fa_modtable" class="select" style="visibility:hidden;width:auto;text-align:left;"><div class="rndmtablex" id="rndmtable1">Solved/Accept</div><div class="rndmtablex" id="rndmtable2">Warning</div><div class="rndmtablex" id="rndmtable3">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>');
 jQuery('#rndmtable1').click(function() { jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="alert-x solvedbox"][tr][td class="alert-y"]','[/td][/tr][/table]');});
jQuery('#rndmtable2').click(function() { jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="alert-x warningbox"][tr][td class="alert-y"]','[/td][/tr][/table]');});
 jQuery('#rndmtable3').click(function() { jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="alert-x informbox"][tr][td class="alert-y"]','[/td][/tr][/table]'); });
 jQuery('.rndmtablex').click(function() { jQuery('#fa_modtable').css('visibility','hidden'); });
 }
});

- CSS

Code:
[panda=css].alert-x {
padding: 14px 17px;
color: #fefefe;
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.4);
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.4);
-khtml-box-shadow: 0 1px 5px rgba(0,0,0,0.4);
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
-khtml-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
border-style: solid;
border-width: 0;
position: relative;
width: 100%;
font: 14px/20px Museo300Regular,Helvetica,Arial,sans-serif;
}
.alert-y {
padding: 0 20px 0 40px;
}
.informbox {
background: #2fa9f6 url(http://w3lessons.info/demo/metro-style-alert-box/images/info.png) no-repeat 14px 14px;
}

.solvedbox {
background: #7EB62E url(http://w3lessons.info/demo/metro-style-alert-box/images/success.png) no-repeat 14px 14px;
}
.warningbox {
background: #BE1B00 url(http://w3lessons.info/demo/metro-style-alert-box/images/error.png) no-repeat 14px 14px;
}

Visible to admins/moderators? How?:

- Screenshot
[Javascript] Admin/Mod Comment - Page 2 Asd11



© PunBB Design
made by Randomtroller
[Javascript] Admin/Mod Comment - Page 2 Act_bottom If you have any questions related to this topic create a topic with the following title:
Adding Admin/Mod Comments

Powered by PunBB
Currently 0 users have thanked Random Troll for this post:

21
Offline

  RoyalLand

RoyalLand
Punbb Rookie
Punbb Rookie
Random Troll wrote:
[Javascript] Admin/Mod Comment - Page 2 Rang10
Tutorial: Adding Admin/Mod Comments

This tutorial makes an Accept/Reject/Information buttons that only admins and moderators can see.

Credits: Ange Tuteur

--> Tutorials, tips and tricks <--
Adding Admin/Mod Comments by RandomTroller 



- Javascript

Code:
[panda=js]jQuery(window).load(function() {
if (typeof _userdata === "undefined") return;
if ((_userdata['user_level'] == '1') || (_userdata["user_level"] == '2')) {
 jQuery('body').append('<div id="fa_modtable" class="select" style="visibility:hidden;width:auto;text-align:left;"><div class="rndmtablex" id="rndmtable1">Solved/Accept</div><div class="rndmtablex" id="rndmtable2">Warning</div><div class="rndmtablex" id="rndmtable3">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>');
 jQuery('#rndmtable1').click(function() { jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="alert-x solvedbox"][tr][td class="alert-y"]','[/td][/tr][/table]');});
jQuery('#rndmtable2').click(function() { jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="alert-x warningbox"][tr][td class="alert-y"]','[/td][/tr][/table]');});
 jQuery('#rndmtable3').click(function() { jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="alert-x informbox"][tr][td class="alert-y"]','[/td][/tr][/table]'); });
 jQuery('.rndmtablex').click(function() { jQuery('#fa_modtable').css('visibility','hidden'); });
 }
});

- CSS

Code:
[panda=css].alert-x {
padding: 14px 17px;
color: #fefefe;
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.4);
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.4);
-khtml-box-shadow: 0 1px 5px rgba(0,0,0,0.4);
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
-khtml-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
border-style: solid;
border-width: 0;
position: relative;
width: 100%;
font: 14px/20px Museo300Regular,Helvetica,Arial,sans-serif;
}
.alert-y {
padding: 0 20px 0 40px;
}
.informbox {
background: #2fa9f6 url(http://w3lessons.info/demo/metro-style-alert-box/images/info.png) no-repeat 14px 14px;
}

.solvedbox {
background: #7EB62E url(http://w3lessons.info/demo/metro-style-alert-box/images/success.png) no-repeat 14px 14px;
}
.warningbox {
background: #BE1B00 url(http://w3lessons.info/demo/metro-style-alert-box/images/error.png) no-repeat 14px 14px;
}

Visible to admins/moderators? How?:

- Screenshot
[Javascript] Admin/Mod Comment - Page 2 Asd11



© PunBB Design
made by Randomtroller
[Javascript] Admin/Mod Comment - Page 2 Act_bottom If you have any questions related to this topic create a topic with the following title:
Adding Admin/Mod Comments

Thanks Dear Its Working I Use This

Powered by PunBB
Currently 0 users have thanked RoyalLand for this post:

View previous topic View next topic Back to top Message [Page 2 of 2]


Go to page : Previous  1, 2

Topic URL's

URL
BBcode
HTML

Permissions in this forum:
You cannot reply to topics in this forum