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 Users/Groups (https://vborg.vbsupport.ru/showthread.php?t=60715)

Dark Jim 01-26-2004 06:35 PM

Quote:

Originally Posted by wrongful
with this hack on ny board it works, but only admins can view the html. when a non admin is viewing the post it only shows the html code

That is correct. If you would like it so only admins can use html but everyone views it the way you want and not just the html code do this:

--------------------------------------------------------------------------
(Assuming you didn't install Ee-Ore's version)

Open /includes/functions_bbcodeparse.php

Find:
PHP Code:

global $vboptions$parsed_postcache

Replace with:
PHP Code:

global $vboptions$parsed_postcache$post

Find:
PHP Code:

// parse forum item 
default: 
$forum fetch_foruminfo($forumid); 
$dohtml $forum['allowhtml']; 
$dobbimagecode $forum['allowimages']; 
$dosmilies $forum['allowsmilies']; 
if (
$allowsmilie != 1

$dosmilies $allowsmilie

$dobbcode $forum['allowbbcode']; 
break; 

Replace with:
PHP Code:

// parse forum item 
default: 
$forum fetch_foruminfo($forumid); 
if (
$post['usergroupid'] == 6) { 
$dohtml 1
} else { 
$dohtml $forum['allowhtml']; 

$dobbimagecode $forum['allowimages']; 
$dosmilies $forum['allowsmilies']; 
if (
$allowsmilie != 1

$dosmilies $allowsmilie

$dobbcode $forum['allowbbcode']; 
break; 

Find:
PHP Code:

// parse non-forum item 
case 'nonforum'
$dohtml $vboptions['allowhtml']; 
$dobbcode $vboptions['allowbbcode']; 
$dobbimagecode $vboptions['allowbbimagecode']; 
$dosmilies $vboptions['allowsmilies']; 
if (
$allowsmilie != 1

$dosmilies $allowsmilie

break; 

Replace with:
PHP Code:

// parse non-forum item 
case 'nonforum'
if (
$post['usergroupid'] == 6) { 
$dohtml 1
} else { 
$dohtml $vboptions['allowhtml']; 

$dobbcode $vboptions['allowbbcode']; 
$dobbimagecode $vboptions['allowbbimagecode']; 
$dosmilies $vboptions['allowsmilies']; 
if (
$allowsmilie != 1

$dosmilies $allowsmilie

break; 


Ee-Ore 01-26-2004 06:39 PM

Ah, thanks for that - I was almost there :D

Sorry to those of you who took mine :(

At least now we have the real answer :D

Wasser 01-26-2004 09:37 PM

ee-ore, you edited out where this goes and jim didn't mention it! :(

*arie 01-26-2004 11:26 PM

um, what php file should we edit?

Dark Jim 01-26-2004 11:30 PM

Oops. It's in /includes/functions_bbcodeparse.php. Updated my first post.

Wasser 01-27-2004 02:45 AM

thank you! =)

admiralapril 02-02-2004 04:55 PM

Thanks for the code hacks!

Had a couple of questions..

I am assuming when I try to preview it, it's supposed to not parse that code, but when I post it, it works? Is there any way to get the preview to work?

Also, I want to post Javascript code but it still isn't allowed. Is there anyway to post Javascript code? I want to embed a Javascript puzzle into a post.

Thanks for the help!

himerus 03-11-2004 01:57 PM

Sorry if this question is "dumb" :)

When using this hack, or posting with HTML, do you use the HTML /HTML vbcode tags?

The reason I ask, is that I have the HTML bbcode enabled for posting of some HTML on my board.

I (as admin) have made several posts with HTML bbcode, and I would want those posts to remain bbcode, and I would still want to be able to use the HTML bbcode as well as posting with HTML to enhance some admin posts.

msimplay 03-29-2004 10:53 AM

Quote:

Originally Posted by himerus
Sorry if this question is "dumb" :)

When using this hack, or posting with HTML, do you use the HTML /HTML vbcode tags?

The reason I ask, is that I have the HTML bbcode enabled for posting of some HTML on my board.

I (as admin) have made several posts with HTML bbcode, and I would want those posts to remain bbcode, and I would still want to be able to use the HTML bbcode as well as posting with HTML to enhance some admin posts.

you can use bbcode and html together with this hack however it doesn't seem to work with preview posting

Boofo 03-29-2004 11:28 AM

Youi will also have a problem with the HTML and PHP tags. When HTML is turned on, things like the break tag will be parsed in the code boxes. ;)


All times are GMT. The time now is 06:51 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.01187 seconds
  • Memory Usage 1,757KB
  • 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
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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