Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow usergroups ( Admins ) to use HTML for posts , sigs Details »»
Allow usergroups ( Admins ) to use HTML for posts , sigs
Version: 1.01, by Tekton Tekton is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

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.

Comments
  #52  
Old 05-12-2005, 07:04 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
        // parse out nasty active scripting codes - MDP (added meta)
        static $global_find = array('/javascript:/si', '/about:/si', '/vbscript:/si', '/&(?![a-z0-9#]+;)/si', '/<meta/si');
        static $global_replace = array('javascript<b></b>:', 'about<b></b>:', 'vbscript<b></b>:', '&amp;', 'meta:');
I added something to strip out <meta tags to prevent refresh's.
Reply With Quote
  #53  
Old 06-02-2005, 06:42 PM
jesus likes pie jesus likes pie is offline
 
Join Date: Apr 2005
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is a class mod i love it, it came in sooo handy
Reply With Quote
  #54  
Old 06-08-2005, 05:03 PM
zetetic's Avatar
zetetic zetetic is offline
 
Join Date: Apr 2004
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Acers
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?
I tried, but I couldn't figure that out either.

Anyone?
Reply With Quote
  #55  
Old 11-18-2005, 03:52 PM
Alphawolf83's Avatar
Alphawolf83 Alphawolf83 is offline
 
Join Date: Mar 2005
Location: Germany
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*clicks install*

Nice Mini-Mod. Works on 3.0.7.

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:
Reply With Quote
  #56  
Old 07-04-2006, 05:26 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this going to work on 3.5.4?
Reply With Quote
  #57  
Old 07-05-2006, 01:29 AM
zetetic's Avatar
zetetic zetetic is offline
 
Join Date: Apr 2004
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dark Cloud
Is this going to work on 3.5.4?
If I'm not mistaken kall's add-on provides the same functionality for 3.5+.
Reply With Quote
  #58  
Old 07-18-2006, 06:44 PM
AlexSFBay AlexSFBay is offline
 
Join Date: Jan 2004
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vissa
This doesn't seem to work for previewing the message, but when I post it, it does work. Any suggestions for getting the preview to work?

-V
I'm looking for a hack for this as well. I'm going to try a few things and let you know if anything works.
Reply With Quote
  #59  
Old 07-19-2006, 06:13 AM
AlexSFBay AlexSFBay is offline
 
Join Date: Jan 2004
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #60  
Old 08-28-2007, 08:58 PM
ddmobley ddmobley is offline
 
Join Date: May 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zetetic View Post
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?
Reply With Quote
  #61  
Old 07-07-2008, 05:09 AM
bengali bengali is offline
 
Join Date: Jul 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey there,

Where in the system is that file? INCLUDES/FUNCTIONS_BBCODEPARSE.PHP
My includes directory doesn't include this file.

Ben
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07529 seconds
  • Memory Usage 2,318KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete