Version: 1.01, by Tekton
Developer Last Online: Jun 2009
Version: 3.0.6
Rating:
Released: 02-01-2005
Last Update: Never
Installs: 52
No support by the author.
___________
NOTE: While the primary purpose of this hack is to allow the usergroup to use html in their sig, they may also use it in threads/posts as well. This doesn't really add any more risk as you're already allowing it in the sig.
???????????
Requested Here
Estimated Time: ~2 minutes [ Any questions? This thread only please ]
// ###### INSTALLATION ######
IN INCLUDES/FUNCTIONS_BBCODEPARSE.PHP
Find:
PHP Code:
// ###################### Start bbcodeparse2 #######################
function parse_bbcode2($bbcode, $dohtml, $dobbimagecode, $dosmilies, $dobbcode, $iswysiwyg = 0, $donl2br = 1)
{
// parses text for vB code, smilies and censoring
global $DB_site, $vboptions, $bbuserinfo, $templatecache, $smiliecache;
Change to:
PHP Code:
// ###################### Start bbcodeparse2 #######################
function parse_bbcode2($bbcode, $dohtml, $dobbimagecode, $dosmilies, $dobbcode, $iswysiwyg = 0, $donl2br = 1)
{
// parses text for vB code, smilies and censoring
global $DB_site, $vboptions, $bbuserinfo, $templatecache, $smiliecache, $userinfo, $post;
----
Find:
PHP Code:
// ********************* REMOVE HTML CODES ***************************
if(!$dohtml)
Change to:
PHP Code:
$html_allowed=array(6); // add more by seperating each by commas in the ()'s: (6,8,19)
// ********************* REMOVE HTML CODES ***************************
if(!$dohtml && !in_array($userinfo[usergroupid],$html_allowed)&& !in_array($post[usergroupid],$html_allowed))
Note: Edit the values in the "$html_allowed" array to change or add usergroups.
// ==========
DONE! This hack has been tested and does work~ Use at your own risk! (I'm not responsible, etc etc)
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
It took me about four hours to figure out that this will only work for primary usergroup memberships, and another four hours to not figure out how to make it check secondary usergroup memberships too.
It took me about four hours to figure out that this will only work for primary usergroup memberships, and another four hours to not figure out how to make it check secondary usergroup memberships too.
$html_allowed=array(6); // add more by seperating each by commas in the ()'s: (6,8,19)
// ********************* REMOVE HTML CODES ***************************
if(!$dohtml && !in_array($userinfo[usergroupid],$html_allowed)&& !in_array($post[usergroupid],$html_allowed))
to:
PHP Code:
$html_allowed=array(6); // add more by seperating each by commas in the ()'s: (6,8,19)
// ********************* REMOVE HTML CODES ***************************
foreach ($html_allowed as $ug) {
if (is_member_of($userinfo, $ug)) {
$userinfo_sane = true;
}
if (is_member_of($post, $ug)) {
$post_sane = true;
}
}
if(!$dohtml && !$usergroup_sane && !$post_sane)
got the code working... after some tinkering around..
but its still not working in the previews. have tried a lot of things but can't make it work with preview posts.. any ideas?