vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   HTML allowed for certain groups (https://vborg.vbsupport.ru/showthread.php?t=63757)

bendigo-tech 11-09-2004 06:26 AM

Quote:

Originally Posted by Link14716
No.

Either way, it works for me. HTML is off in the forum and is still parsing on my dev board.

So if an Admin posts HTML and then a member quotes it, will it be parsed or will the member see the HTML??

vBFreak 11-12-2004 09:56 PM

At my board the version of Link14716 is working and better... HTML in signatures is now also only allowed for admins, yet that what I wanted first, thanks Link:)

But html code in quotes of normal users, in the signature editor preview (low priority, because only admins can't see their html-code in the preview, for users it's correcly not parsed as it should be if html is disabled and ok so) and in the Topic Review area isn't still parsed...

gurgi 11-29-2004 04:50 PM

For some reason Link's solution doesn't work unless I use if ($post['usergroupid'] == 0), but I am definately an admin.. no other value works.

charlesk 12-09-2004 12:10 AM

Link, thanks very much for that simple solution.

Question for anyone: is there any easy way to modify that code so it works using say, the number of posts the user has? I'm still kind of new to this. :) Thanks.

Charles

charlesk 12-21-2004 12:17 AM

Perhaps a simpler question.. is there a way to have this work based on a secondary usergroup rather than the primary?

Thanks...

Charles

Quarterbore 05-15-2005 01:00 PM

Quote:

Originally Posted by Link14716
Here's my version. It should work everywhere BBCode is parsed and the post array is $post (which should be everywhere you actually post).

In includes/functions_bbcodeparse.php, find this:
PHP Code:

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;
    global 
$html_allowed

Add under that:
PHP Code:

    global $post;
    if (
$post['usergroupid'] == 6) {
        
$dohtml 1;
        
$dobbimagecode 1;
        
$dosmilies 1;
        
$dobbcode 1;
    } 

Replacing $post['usergroupid'] == 6 (which means any administrator) with whatever you want (such as the in_array($post['userid'], array(X,Y) example.)

THANK YOU!!!

Foolish me was looking at doing this in a different way before I found this thread... This is an AWSOME hack and it is working great for me on two of my vBulletin installs!

paul41598 09-23-2005 11:45 AM

how come this affects other BB code tags? I have a [showtogroups] tag that now isnt displayed because of this

vBFreak 10-15-2005 12:48 AM

Anyone who modded this for vB 3.5.0?


All times are GMT. The time now is 01:42 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.00988 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_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
  • (8)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