Staff " modding" editer problem
2 posters
Page 1 of 1
Staff " modding" editer problem
Hi all i have been trying to get this staff only button made from this thread
https://help.forumotion.com/t128220-easy-write-for-staff-on-editor
the problem i have is i want to make a set of buttons with this code in them
but when i add the code the buttons don't work they come up but then they don't post the code
This in the HTML page
and this is in the Widgets
any help with this will be really good
Thanks
Ape
https://help.forumotion.com/t128220-easy-write-for-staff-on-editor
the problem i have is i want to make a set of buttons with this code in them
but when i add the code the buttons don't work they come up but then they don't post the code
This in the HTML page
- Code:
jQuery('#modBouton').click(function(){
jQuery('#text_editor_textarea').sceditor("instance").insertText("[table style="background: url('http://cdn3.iconfinder.com/data/icons/fatcow/32x32_0020/accept.png') no-repeat 6px #effeb9; border: 1px solid #9ac601; color: #4F8A10; padding: 6px 6px 6px 40px; width: 99%; text-shadow: 0 1px 0 #FFFAF1; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset; font-weight: bold; border-radius: 3px 3px 3px 3px;"][tr][td]Content goes here...Content goes here...Content goes here...Content goes here...Content goes here...Content goes here... [/td]
[/tr]
[/table]");
});
and this is in the Widgets
- Code:
<script type="text/javascript">jQuery(function(){
jQuery(function(){
jQuery('<a id="modBouton" class="sceditor-button" unselectable="on" title="BBCode ( Έτοιμος Κώδικας)"><div unselectable="on" style="background-image:url(https://cdn1.iconfinder.com/data/icons/fatcow/16/text_letter_omega.png)"></div></a>').insertBefore('.sceditor-button-size');
});
});
jQuery.getScript('/h1-staffbutton1');
</script>
- Spoiler:
Content goes here...Content goes here...Content goes here...Content goes here...Content goes here...Content goes here...
any help with this will be really good
Thanks
Ape
Last edited by APE on March 10th 2014, 4:31 am; edited 1 time in total
Re: Staff " modding" editer problem
Hello APE,
Have you see this topic ?
https://help.forumotion.com/t131256-#880019
A little down further I have an exemple of a list.
Have you see this topic ?
https://help.forumotion.com/t131256-#880019
A little down further I have an exemple of a list.
Re: Staff " modding" editer problem
Yes but i wanted the way it is in the link :(with 3 buttons in the new editorAnge Tuteur wrote:Hello APE,
Have you see this topic ?
https://help.forumotion.com/t131256-#880019
A little down further I have an exemple of a list.
each with
on of them items in it
- Spoiler:
Content goes here...Content goes here...Content goes here...Content goes here...Content goes here...Content goes here... Content goes here...Content goes here...Content goes here...Content goes here...Content goes here...Content goes here... Content goes here...Content goes here...Content goes here...Content goes here...Content goes here...Content goes here...
Re: Staff " modding" editer problem
Try this :
Admin panel > modules > javascript codes management > create a new script
Title : what you wish
Placement : in all the pages
Paste the code below and save :
In the settings, there's some stuff you can modify.
img : is the background image of the button. It can be an url, of about 16*16
title : is the title of the button
tagStart : is the starting tags
tagEnd : is the ending tags
Admin panel > modules > javascript codes management > create a new script
Title : what you wish
Placement : in all the pages
Paste the code below and save :
- Code:
$(window).load(function() {
var settings = {
// button 1
img1 : 'backgroud img for button',
title1 : 'title of button',
tagStart1 : '[table style="background: url(\'http://cdn1.iconfinder.com/data/icons/musthave/24/Information.png\') no-repeat 6px #d1e4f3; border: 1px solid #4d8fcb; color: #00529B; padding: 6px 6px 6px 40px; width: 99%; text-shadow: 0 1px 0 #FFFAF1; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset; font-weight: bold; border-radius: 3px 3px 3px 3px;"][tr][td]',
tagEnd1 : '[/td][/tr][/table]',
// button 2
img2 : 'backgroud img for button',
title2 : 'title of button',
tagStart2 : '[table style="background: url(\'http://cdn3.iconfinder.com/data/icons/fatcow/32x32_0020/accept.png\') no-repeat 6px #effeb9; border: 1px solid #9ac601; color: #4F8A10; padding: 6px 6px 6px 40px; width: 99%; text-shadow: 0 1px 0 #FFFAF1; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset; font-weight: bold; border-radius: 3px 3px 3px 3px;"][tr][td]',
tagEnd2 : '[/td][/tr][/table]',
// button 3
img3 : 'backgroud img for button',
title3 : 'title of button',
tagStart3 : '[table style="background: url(\'http://cdn1.iconfinder.com/data/icons/CrystalClear/32x32/actions/messagebox_critical.png\') no-repeat 6px #fccac3; border: 1px solid #db3f23; color: #D8000C; padding: 6px 6px 6px 40px; width: 99%; text-shadow: 0 1px 0 #FFFAF1; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset; font-weight: bold; border-radius: 3px 3px 3px 3px;"][tr][td]',
tagEnd3 : '[/td][/tr][/table]'
};
if (_userdata["user_level"] == '1' || _userdata["user_level"] == "2") {
$('.sceditor-button-fahide').after('<a class="sceditor-button sceditor-button-message1" title="'+settings["title1"]+'"><div style="background:url('+settings["img1"]+') no-repeat;"></div></a><a class="sceditor-button sceditor-button-message2" title="'+settings["title2"]+'"><div style="background:url('+settings["img2"]+') no-repeat;"></div></a><a class="sceditor-button sceditor-button-message3" title="'+settings["title3"]+'"><div style="background:url('+settings["img3"]+') no-repeat;"></div></a>');
$('.sceditor-button-message1').click(function() { $('#text_editor_textarea').sceditor('instance').insertText(settings["tagStart1"],settings["tagEnd1"]) });
$('.sceditor-button-message2').click(function() { $('#text_editor_textarea').sceditor('instance').insertText(settings["tagStart2"],settings["tagEnd2"]) });
$('.sceditor-button-message3').click(function() { $('#text_editor_textarea').sceditor('instance').insertText(settings["tagStart3"],settings["tagEnd3"]) });
}
});
In the settings, there's some stuff you can modify.
img : is the background image of the button. It can be an url, of about 16*16
title : is the title of the button
tagStart : is the starting tags
tagEnd : is the ending tags
Re: Staff " modding" editer problem
You're welcome
Topic solved and archived
Have a good day and see you.
Topic solved and archived
Have a good day and see you.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum