Post by hopeowl on Feb 20, 2015 5:32:39 GMT -8
I found this code here that is supposedly able to enable HTML in posts for membergroups. Sadly it is outdated but jrryan suggested that it might be possible to update it so it works for v5.
If that's not possible, it would be nice if someone could try to create a code that lets members post HTML. I know one plugin that does the same but it's only available to admins and you need to post [html] in each thread for it to work.
Thanks in advance if anybody is able to help me out (And I'm sure it would help others too!)
If that's not possible, it would be nice if someone could try to create a code that lets members post HTML. I know one plugin that does the same but it's only available to admins and you need to post [html] in each thread for it to work.
Thanks in advance if anybody is able to help me out (And I'm sure it would help others too!)
<script type="text/javascript">
<!--
/ Allow HTML in Staff Posts
WARNING: Use with great caution!
The code creator will NOT be held responsible for any damage done by this code/
var allowedGroups = /(1|2)$/;
var disabledBoards = '(board ID|board ID|board ID)';
if(!location.href.match(new RegExp('board='+disabledBoards))) {
var td = document.getElementsByTagName('td');
for(i=0; i<td.length; i++) {
if(td[i].colSpan == '3' && td[i].innerHTML.match(/google_ad/i)
&& td[i].parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('a')[1].className.match(allowedGroups) && td[i].innerHTML.match(/([html](.+?)[\/html])/i)) {
var code = RegExp.$2.replace(new RegExp('&l'+'t;','g'),'<').replace(new RegExp('&g'+'t;','g'),'>').replace(/<(img src|(a|embed) href).+?<a.+?>(.+?)("|'|")?<\/a>(.+?>)/gi, '<$1=$3$5');
td[i].innerHTML = td[i].innerHTML.replace(/([html](.+?)[\/html])/i, code);
i--;
}
}
}
//-->
</script>
EDIT: Chris I was told that you might know how to help^^