How can I add Admin/Mod color button on sceditor?
2 posters
Page 1 of 1
How can I add Admin/Mod color button on sceditor?
Hello,
How can I add Admin/Mod color button on sceditor?
How can I add Admin/Mod color button on sceditor?
Re: How can I add Admin/Mod color button on sceditor?
Hi @Black-Shadow,
Go to Administration Panel > Modules > JavaScript codes management > New script
Title : SCEditor Mod color
Placement : In all the pages
At the top you'll see a "mods" object with id:color pairs. To the right of the colon is the ID of the member, and to the left is their color. Edit these so that they correspond to the user's ID and their color of choice.
As for the image of the button, add the following CSS to your stylesheet.
Display > Colors > CSS
Go to Administration Panel > Modules > JavaScript codes management > New script
Title : SCEditor Mod color
Placement : In all the pages
- Code:
$(function() {
if (!$.sceditor || !_userdata.user_level) return;
var mods = {
'u1' : '#FF6600',
'u2' : '#FF0000',
'u3' : '#FFFF00',
'u4' : '#00FF00'
},
c = '#000000', i, u = 'u' + _userdata.user_id;
for (i in mods) {
if (i == u) {
c = mods[i];
break;
}
}
$.sceditor.command.set('modcolor', {
exec : function() { this.insert('[color=' + c + '][b]','[/b][/color]') },
txtExec : function() { this.insert('[color=' + c + '][b]','[/b][/color]') },
tooltip : 'Insert mod color'
});
toolbar += '|modcolor';
});
At the top you'll see a "mods" object with id:color pairs. To the right of the colon is the ID of the member, and to the left is their color. Edit these so that they correspond to the user's ID and their color of choice.
As for the image of the button, add the following CSS to your stylesheet.
Display > Colors > CSS
- Code:
.sceditor-button-modcolor div {
background-image:url(http://i56.servimg.com/u/f56/18/45/41/65/mcolo10.png) !important;
}
Re: How can I add Admin/Mod color button on sceditor?
You're welcome ^^
Topic archived
Have a good day.
Topic archived
Have a good day.
Similar topics
» New button on sceditor
» How to add this in sceditor button
» SCEditor button icon change
» Expand SCEditor Color Selector
» i want to add more sizes in the size button in sceditor
» How to add this in sceditor button
» SCEditor button icon change
» Expand SCEditor Color Selector
» i want to add more sizes in the size button in sceditor
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum