MyBB Community Forums

Full Version: Script in Sig
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a way to put <script> </script> tags in signatures. I know it can cause security issues but can you like just make it for one member only say like if i was admin id only allow me to do it not anyone else?

Thanks ausnrl
It would have to be modified in, so someone will have to create a way to do it.

I, personally, wouldn't do it either way because of the risks involved.
You can try this:

Open inc/functions_post.php
Find:
		$post['signature'] = postify(stripslashes($post['signature']), $mybb->settings['sightml'], $mybb->settings['sigmycode'], $mybb->settings['sigsmilies'], $mybb->settings['sigimgcode']);
Replace with:
		$post['signature'] = postify(stripslashes($post['signature']), (($mybb->user['uid'] == 1) ? 'yes' : $mybb->settings['sightml']), $mybb->settings['sigmycode'], $mybb->settings['sigsmilies'], $mybb->settings['sigimgcode']);

I haven't tried it, so it's not guaranteed to work.
Oh and it also looks like its only for the first member of the board, so not all admins will be able to use this. Only the First Admin.
Well you can change whatever is in the
$mybb->user['uid'] == 1
to your user ID.

I'm not sure if <script> is stripped even with HTML enabled though. I haven't tried it.
Cheers for all the support. Just giving it to one user would that still give you risks of security attacks do you reckon?
Parse error: parse error, unexpected ';' in /home/ausnrl/public_html/Upload/inc/functions_post.php on line 795

DennisTT It doesnt work. Darn if you could see if it would work that would be great
Please check to see you have overwritten the entire line.

If you have " ;; " at the end, please remove one of them.
Yes i did all of that and it is all overwritten etc
Try the replacement code again. I just updated it.
Pages: 1 2