vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Allow usergroups ( Admins ) to use HTML for posts , sigs (https://vborg.vbsupport.ru/showthread.php?t=75590)

Tekton 02-01-2005 10:00 PM

Allow usergroups ( Admins ) to use HTML for posts , sigs
 
___________
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)

Tekton 02-02-2005 05:55 AM

~~~~

Guy G 02-02-2005 11:07 AM

Great.
Installed.

yoyoyoyo 02-02-2005 11:52 AM

nice idea! thanks for sharing!

Spyke 02-02-2005 04:29 PM

Thanks alot for this Tekton :D

Though, does it allow javascript or anything? becuase i'm trying to add an alert but it's not working.

Code:

<script language = "javascript">

function test()
{
alert("test")
}

</script>

<a href = "#" onClick = "test()">Test</a>

Thanks again!

Dean C 02-02-2005 04:57 PM

HTML Code:

<a href = "#" onClick = "test()">Test</a>
Should be this for a start :)

HTML Code:

<a href="#" onClick="test()">Test</a>

Spyke 02-02-2005 05:09 PM

I didn't think spacing mattered...but it still works in a normal HTML page that way...

I tried your way but still no go :(

Phalynx 02-02-2005 08:45 PM

Thanks!

Tekton 02-02-2005 08:57 PM

I'm not sure how vB would handle javascript inside of posts/sigs, but I know that it works for plain html~ :D

N8 02-03-2005 04:27 AM

I've wanted something like this for a while, thanks!


All times are GMT. The time now is 10:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01095 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete