Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 01-26-2004, 06:35 PM
Dark Jim's Avatar
Dark Jim Dark Jim is offline
 
Join Date: Apr 2002
Location: Netherlands
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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; 
Reply With Quote
  #12  
Old 01-26-2004, 06:39 PM
Ee-Ore Ee-Ore is offline
 
Join Date: Oct 2003
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, thanks for that - I was almost there

Sorry to those of you who took mine

At least now we have the real answer
Reply With Quote
  #13  
Old 01-26-2004, 09:37 PM
Wasser Wasser is offline
 
Join Date: Feb 2003
Location: yuba city, ca
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ee-ore, you edited out where this goes and jim didn't mention it!
Reply With Quote
  #14  
Old 01-26-2004, 11:26 PM
*arie's Avatar
*arie *arie is offline
 
Join Date: Jan 2004
Location: New Orleans {504}
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um, what php file should we edit?
Reply With Quote
  #15  
Old 01-26-2004, 11:30 PM
Dark Jim's Avatar
Dark Jim Dark Jim is offline
 
Join Date: Apr 2002
Location: Netherlands
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops. It's in /includes/functions_bbcodeparse.php. Updated my first post.
Reply With Quote
  #16  
Old 01-27-2004, 02:45 AM
Wasser Wasser is offline
 
Join Date: Feb 2003
Location: yuba city, ca
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you! =)
Reply With Quote
  #17  
Old 02-02-2004, 04:55 PM
admiralapril admiralapril is offline
 
Join Date: Nov 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #18  
Old 03-11-2004, 01:57 PM
himerus himerus is offline
 
Join Date: Nov 2003
Location: Denver, CO
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 03-29-2004, 10:53 AM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 03-29-2004, 11:28 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 05:31 PM.


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.04949 seconds
  • Memory Usage 2,278KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete