Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Per Usergroup HTML Posting Permission Details »»
Per Usergroup HTML Posting Permission
Version: 4.001, by kall kall is offline
Developer Last Online: Aug 2021 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.0.x Rating:
Released: 11-27-2009 Last Update: Never Installs: 300
DB Changes Uses Plugins
Additional Files  
No support by the author.

Just like the name says, this ultra-simple little Product will allow you to specify Usergroups that may make forum posts in HTML and have that HTML be parsed.

Default vBulletin - You can only choose whether an entire forum has the HTML permission, for all Usergroups. With this modification, you can give the permission to a specific Usergroup.

The code in this version is 100% identical to that in the 3.5 version (except for the lack of parseing in the Preview), which worked all the way through 3.6,7 and 8.

Blog HTML permissions are, for some reason, actually there in Usergroup Manager, they control HTML in Blog entries and posts, and override the settings in this Product.

***BE AWARE THAT INDISCRIMINATE USE OF THIS PRODUCT IS RISKY - RESTRICT IT TO ONLY THOSE USERGROUPS YOU TRUST ABSOLUTELY***

The scary message above is to make sure you are aware that enabling HTML for any group opens you up to security issues. This is why it is not a feature of Stock vB, probably.

Controlled by a Setting in Usergroup Manager, it's phrased and works in editpost.php in WYSIWYG and normal modes, AND the Forum Rules shows HTML is ON to allowed Usergroups.

In the current vB 4.0, this WILL apply retroactively.
That is, if a User posted something in HTML in the past, before they were given the ability, that post will be parsed. This could prove dangerous/troublesome for anything not wrapped in PHP tags.


Many thanks to Andreas for prodding me to figure it out by myself and not just telling me what to do.

A "demo" is here..html is OFF in that Forum, but those posts are made by an Admin with the setting to Yes, so the HTML is parsed.

Known Issues: It is not currently possible to choose whether the HTML in a post is parsed or not - it will be.. unless (weirdly) you wrap it in PHP /PHP tags.
I'll look into adding a toggle switch.

Download Now

File Type: zip UsergroupAllowHTML4.0.zip (2.4 KB, 1775 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
Razor87, RichieBoy67

Comments
  #72  
Old 06-11-2010, 09:15 PM
powerful_rogue powerful_rogue is offline
 
Join Date: Jan 2007
Location: Kent
Posts: 603
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Kall,

Ive got a quick question and wondered if you may be able to help.

Ive installed the mod and posted some HTML, however I get what is shown in the attachment.


This was the HTML I tried to post

PHP Code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_99c32d91-e170-4d50-a216-a0756991f6c2"  WIDTH="336px" HEIGHT="280px"> <PARAM NAME="movie" VALUE="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fthefrefin-21%2F8014%2F99c32d91-e170-4d50-a216-a0756991f6c2&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fthefrefin-21%2F8014%2F99c32d91-e170-4d50-a216-a0756991f6c2&Operation=GetDisplayTemplate" id="Player_99c32d91-e170-4d50-a216-a0756991f6c2" quality="high" bgcolor="#ffffff" name="Player_99c32d91-e170-4d50-a216-a0756991f6c2" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="280px" width="336px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fthefrefin-21%2F8014%2F99c32d91-e170-4d50-a216-a0756991f6c2&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT
Just wondered if you had any ideas at all.

Also, im using 3.8.5 :erm:
Attached Images
File Type: png code.png (104.3 KB, 0 views)
Reply With Quote
  #73  
Old 06-11-2010, 09:30 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

From a quick glance, I see a in the very first line. I bet that's getting parsed before the HTML bit does.

Maybe try changing the execution order of the plugin to 1, but that probably wont help. Removing the smiley would, but would screw with your everywhere, probably. Sorry.
Reply With Quote
  #74  
Old 06-12-2010, 02:15 PM
share4vn.com share4vn.com is offline
 
Join Date: Feb 2008
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ex: Set Allow HTML for AdminGroup, in a post by an admin, a SuperMod or Moderator edit that post follow his style... It's really bad, very dangerous, right?

Could you prevent that? By protect that posts, may add keyword to filter them and restrict any action from other Usergroups or something...

Some my opinions
Reply With Quote
  #75  
Old 06-20-2010, 07:48 PM
a7lameza.com a7lameza.com is offline
 
Join Date: May 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you
Reply With Quote
  #76  
Old 06-21-2010, 06:42 AM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just for admin use this works great.. thx
Reply With Quote
  #77  
Old 06-21-2010, 06:56 AM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by powerful_rogue View Post
Hi Kall,

Ive got a quick question and wondered if you may be able to help.

Ive installed the mod and posted some HTML, however I get what is shown in the attachment.


This was the HTML I tried to post

PHP Code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_99c32d91-e170-4d50-a216-a0756991f6c2"  WIDTH="336px" HEIGHT="280px"> <PARAM NAME="movie" VALUE="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fthefrefin-21%2F8014%2F99c32d91-e170-4d50-a216-a0756991f6c2&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fthefrefin-21%2F8014%2F99c32d91-e170-4d50-a216-a0756991f6c2&Operation=GetDisplayTemplate" id="Player_99c32d91-e170-4d50-a216-a0756991f6c2" quality="high" bgcolor="#ffffff" name="Player_99c32d91-e170-4d50-a216-a0756991f6c2" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="280px" width="336px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fthefrefin-21%2F8014%2F99c32d91-e170-4d50-a216-a0756991f6c2&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT
Just wondered if you had any ideas at all.

Also, im using 3.8.5 :erm:

you need to just use
Code:
<embed src="file.swf" height="280px" width="336px"></embed>
not all that code you've posted
Reply With Quote
  #78  
Old 07-15-2010, 06:29 PM
Rebecca217 Rebecca217 is offline
 
Join Date: May 2002
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great, thank you so much!
Reply With Quote
  #79  
Old 07-22-2010, 01:38 AM
tyvgreen tyvgreen is offline
 
Join Date: Oct 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kall,
I have made a modification to allow HTML input from the WYSIWYG editor as well and it works, though I have noticed a bug.

Code:
HOOK LOCATION:wysiwyg_parse_start
// Was this post made by an allowed Usergroup member? 
global $vbulletin, $permissions; 
if ($permissions['allowhtmlpermissions'] & $vbulletin->bf_ugp_allowhtmlpermissions['canposthtml']) 
//if ($this->registry->userinfo['allowhtmlpermissions'] & $this->registry->bf_ugp_allowhtmlpermissions['canposthtml']) 

                { 
                    // This is an allowed post so parse HTML. 
                    $allowhtml = '1'; 
                } 
             
         
            else 
            { 
                // usergroup HTML disabled so use default forum permission. 
                $allowhtml = '0'; 
            }
When a post is placed and one without rights to parse HTML is the first to view it directly (as in refresh the page and not just AJAXed in after editing), it places the code as typed, not parsed. Same the other way around. If one not allowed to post HTML posts HTML and an Admin is the first to view it, it is parsed. Is this a bug from the code I placed in there or a 'caching issue' from the previous posts (I couldn't follow the exact issue)?

If I can't get this to work, the owner of this forum wants to go back to allowing HTML from all, which I am highly against. Any help would be great.
Reply With Quote
  #80  
Old 07-25-2010, 08:40 AM
tyvgreen tyvgreen is offline
 
Join Date: Oct 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tyvgreen View Post
Kall,
I have made a modification to allow HTML input from the WYSIWYG editor as well and it works, though I have noticed a bug.

When a post is placed and one without rights to parse HTML is the first to view it directly (as in refresh the page and not just AJAXed in after editing), it places the code as typed, not parsed. Same the other way around. If one not allowed to post HTML posts HTML and an Admin is the first to view it, it is parsed. Is this a bug from the code I placed in there or a 'caching issue' from the previous posts (I couldn't follow the exact issue)?

If I can't get this to work, the owner of this forum wants to go back to allowing HTML from all, which I am highly against. Any help would be great.
Kall,
It seems the plug-in that is turned off by default is what I needed, and just alone. I am getting expected results now. Thank you for this mod. It was an excellent starting block and I will be an immediate recommendation and solution to any mods or admins wanting to post HTML. Thank you again.
~Tyson
Reply With Quote
  #81  
Old 07-28-2010, 11:53 AM
Terrona Terrona is offline
 
Join Date: Oct 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works perfect in v 4.0.5

thanks
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 10:39 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.05188 seconds
  • Memory Usage 2,363KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete