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)

h75 10-12-2004 12:20 AM

Awesome :beard: :lick: <installed>

TCB 10-23-2004 09:47 PM

But what happens when somebody (that isn't allowed to use html) quotes a post of an admin?

vBFreak 11-06-2004 01:00 AM

Yes, works fine. Can someone tell me what I have to change if I want the same thing for user signatures? So that only one usergroup (admins for example) can use HTML, but users not

bendigo-tech 11-06-2004 05:49 AM

I found a problem with this...

All the HTML is displayed properly in the actual thread itself however, when I user (administrator or not) goes to reply, all the HTML code is shown in the 'Topic Review' area.

Is there anyway to fix this???

vBFreak 11-06-2004 02:33 PM

Yes, that's right... I got the same thing if I try that...

the HTML-code isn't parsed in the thread review...

I think you have to change on both things for the review and for the signatures a place in the code that is similiar to this example... But where?

bendigo-tech 11-08-2004 08:30 AM

Quote:

Originally Posted by TCB
But what happens when somebody (that isn't allowed to use html) quotes a post of an admin?

They see the HTML code and if they were to post the message, the HTML wouldn't be parsed which in turn makes for a pretty ugly post/quote.

Please... does anyone have a fix for this???

Thanks :)

akoj 11-08-2004 06:55 PM

Thanks. Installed on my forum. The one thing that I noticed was that it posted the html wonderfully on my forum but when the post fed into my portal (vbadvanced) the html would not post correctly. For now, I just redirected the post to a forum that doesn't feed into the portal. Otherwise, all works great! Thanks for the help. I will check back for any updates.

Link14716 11-08-2004 07:03 PM

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.)

akoj 11-08-2004 10:51 PM

Link,
I tried using your code above but it isn't working on my forums. I took out the code I had originally placed from the original posts. Does that need to be in place as well?

Link14716 11-09-2004 12:53 AM

Quote:

Originally Posted by akoj
Link,
I tried using your code above but it isn't working on my forums. I took out the code I had originally placed from the original posts. Does that need to be in place as well?

No.

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


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,739KB
  • 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
  • (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