Mod/Admin botton?
3 posters
Page 1 of 1
Mod/Admin botton?
I added this to my Java scripts
I just dont get how to make the button mod/ Admin ONLY!
Someone plz help!
- Code:
$(document).ready(function(){
$('input[value="Others"]').after('<img src="http://2img.net/i/fa/wysiwyg/separator.png"><button type="button" onclick="input(\'[img]http://img576.imageshack.us/img576/5444/76766987.png[/img]\');" class="button2">solved</button>');
});
function input(text) {
document.getElementById('text_editor_textarea').value+=text;
}
I just dont get how to make the button mod/ Admin ONLY!
Someone plz help!
neb is krazy- New Member
- Posts : 22
Reputation : 1
Language : english
Re: Mod/Admin botton?
Put the code inside <script> tags, inside a widget. Then set the widgets permissions accordingly (i.e for only admin and mods).
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Mod/Admin botton?
How do i enter in scripts and what widget do i enter it in?
neb is krazy- New Member
- Posts : 22
Reputation : 1
Language : english
Re: Mod/Admin botton?
Ya, but i cant get rid of this ?
neb is krazy- New Member
- Posts : 22
Reputation : 1
Language : english
Re: Mod/Admin botton?
Well you have the image with bbcode, so thats one thing thats mesing it up.
You either want that to be in html format.
or it may be you just have to add the direct image link here like this.
- Code:
[img]http://img576.imageshack.us/img576/5444/76766987.png[/img]
You either want that to be in html format.
- Code:
<img src="http://img576.imageshack.us/img576/5444/76766987.png" border="0" alt="" />
or it may be you just have to add the direct image link here like this.
- Code:
(\'http://img576.imageshack.us/img576/5444/76766987.png\')
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Re: Mod/Admin botton?
Rideem3 wrote:
Try this code:
- Code:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('input[value="Others"]').after('<img src="http://2img.net/i/fa/wysiwyg/separator.png"><button type="button" onclick="input(\'http://img576.imageshack.us/img576/5444/76766987.png\')" class="button2">solved</button>');
});
function input(text) {
document.getElementById('text_editor_textarea').value+="[img]"+text+"[/img]";
}
</script>
that looks like it should work, i was not sure about the slashes thats why i dint put the code up.That should most likely should do the trick
thanx man
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Re: Mod/Admin botton?
RD, you've put the img tags in the function now though meaning it isn't re-usable. Which is the main point of functions
The img tags should stay in the parameter, so the user has the option to add more buttons and input different text.
The img tags should stay in the parameter, so the user has the option to add more buttons and input different text.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Similar topics
» RESET THE PASSWORD
» The security 'Disallow admin to send new password' is active in Admin Panel > General Admin > Security
» password reseting problem The security 'Disallow admin to send new password' is active in Admin Panel > General Admin > Security
» I am locked out of admin by my admin user name and under admin.
» can't get into my admin account, forgot passwrd after haveing to reinstal my OS, and i have admin retrival off.
» The security 'Disallow admin to send new password' is active in Admin Panel > General Admin > Security
» password reseting problem The security 'Disallow admin to send new password' is active in Admin Panel > General Admin > Security
» I am locked out of admin by my admin user name and under admin.
» can't get into my admin account, forgot passwrd after haveing to reinstal my OS, and i have admin retrival off.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum