Widget button
Page 1 of 1
Widget button
Yes, i have a new button i made in the JS module but i don't know how to set permissions, as in regular members not being able to see/use this button ive added to the quick reply bar.
I know you can write a <script> in the widget and make a button but i haven't been able to do that sucsessfully.
but this code just breaks it, here(the one with the red text, the Award button to the left is the one correct one that i just can't set permissions to)
I know you can write a <script> in the widget and make a button but i haven't been able to do that sucsessfully.
- Code:
(function(){var f={add:function(c,d,b){$(function(){if(document.getElementById("text_edit")){void 0==b&&(b="");var a=document.createElement("span");a.innerHTML='<button class="button2" style="height: 22px; margin-right: 5px;" onClick="bbfontstyle(\''+d+"', '"+b+"'); return false;\">"+c+"</button>";document.getElementById("text_edit").appendChild(a)}})},list:function(c,d,b){$(function(){if(document.getElementById("text_edit")){var a=document.createElement("span");a.innerHTML='<input type="button" style="height: 22px; margin-right: 5px;" value="'+ c+'" onclick="selectWysiwyg(this, \''+b+'\');" class="button2">';document.getElementById("text_edit").appendChild(a);a=document.createElement("div");a.id=b;a.className="select";a.style.visibility="hidden";for(var e in d)a.innerHTML=/,/.test(d[e])?a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e].replace(/(.*),.*/,"$1")+"', '"+d[e].replace(/.*,(.*)/,"$1")+"');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>"): a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e]+"', '');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>");document.getElementById("text_editor_select_controls").appendChild(a)}})},init:function(){$(function(){if(document.getElementById("text_edit")){var c=document.createElement("div");c.id="html_edit";c.style.paddingTop="5px";document.getElementById("text_edit").parentNode.insertBefore(c,document.getElementById("text_edit").nextSibling)}})}}; window.buttons=f;f.init()})();
buttons.add('Award!', '[table class=award][tr][td][color=Gold][b]Awarded & Thread Locked![/b][/color]
[/td][/tr][/table]');
- Code:
<script type="text/javascript">
buttons.add('Award', '<table class=award><tr><td align="left"><font color="CHANGEME"><strong>Awarded & Thread Locked!</strong></font></td></tr></table>');
</script>
but this code just breaks it, here(the one with the red text, the Award button to the left is the one correct one that i just can't set permissions to)
Azi- Forumember
- Posts : 61
Reputation : 1
Language : English/Russian
Similar topics
» Poll Widget and Submit Vote button on widget
» Widget and thank you button help
» Refreshing Button for a widget
» Custom Widget Button
» How do I add an affiliate button to the widget and can someone make me one?
» Widget and thank you button help
» Refreshing Button for a widget
» Custom Widget Button
» How do I add an affiliate button to the widget and can someone make me one?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum