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.
I use it in the forum to allow certain smilies to usergroups by using Replacement variables. Only admins, mods and super-mods can use HTML to display the smilies, other usergroups cannot.
It's just a little workaround in order to create a permission-based Smilie Managment System, for example for mod smilies which can be only used by super-users. :squareeyed:
Quick update: I found the preview section in ->Style Manger->Editor Template->editpost. The part that displays the preview text is $postpreview. I see that $postpreview is defined in the editpost.php, but I can't figure out how to turn html on or off.
If I'm not mistaken kall's add-on provides the same functionality for 3.5+.
Kall's mod doesn't work after the post cache expires. And Kall isn't responding to questions about how to fix it. I would like to offer HTML to admins in 3.5.4 but want a way where the post cache issue is fixed. Anyone know of a mod that will allow HTML for 3.5.4 that isn't crippled with the post cache issue?