Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2009, 07:34 AM
Ronny Ronny is offline
 
Join Date: Jan 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default News integration and HTML on for the 1st post

I'm about to write a news script integration for vBulletin 3.8. All the external part is so far done and tested with my 3.7 testinstallation, the only remaining question for me is now how to manage to display the news in vBulletin with full HTML. Well, i could turn on HTML for the "News" forums but then all the users could use HTML and i guess you all know that this could be verry bad. So i'm looking for the right hook in the forums display to show only the 1st post - the news post - in full HTML. All the vBulletin usergroup integration is done but this last tricky part is very hard for me to find out by myself. I'm also not so sure if that is even possible the way i want it to, i guess there is a reason why HTML can only be turnd on for a forum and not for users / groups.

If anyone can direct me in the right way or even better tell me the right hook i have to use, that would be perfect Maybe some one allready did that before?

Thanks allot!
Reply With Quote
  #2  
Old 01-09-2009, 08:02 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This might be difficult - HTML is weeded out right at the start of processing, and there aren't many useful hooks before it. (At least I don't recall any.) What you could do is add your own BB code with external callback (see hook bbcode_fetch_tags) and use that tag with an ID or something as the parameter. Then in your callback function, use this ID to return the actual content.
Reply With Quote
  #3  
Old 01-10-2009, 03:16 PM
Ronny Ronny is offline
 
Join Date: Jan 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the quick reply!

Not sure where vBulletin is actually checking the HTML premissions, i guess somewhere (showthread.php) starting from line 984 ... Maybe done by the vB_BbCodeParser class, i can only guess So far i've no clue even where i could overwrite the HTML check directly in the vBulletin file.

Should there be this "#" in showthread.php line 1073 (3.8.0 US)?

I'm not giving up so fast but right now i just "convert" the HTML with the vBulletin HTML to BBCode function and don't care about the post format. Not a solution i really like and adding or changing the vBulletin BBCode to manage some basic picture positions works but i don't like it either.

Dose anyone has some deeper knowlage where the HTML check is "hidden"?
Reply With Quote
  #4  
Old 01-11-2009, 04:52 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ronny View Post
Dose anyone has some deeper knowlage where the HTML check is "hidden"?
It is done in the BB code parser class, and it uses a direct check using a forum ID (the post information is not in focus, however, on second thought, you may be able to bring it into focus).
Reply With Quote
  #5  
Old 01-11-2009, 06:16 AM
Ronny Ronny is offline
 
Join Date: Jan 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.

Any idea if there will be soon a solution in vBulletin 3 or maybe 4 to set HTML rights for usergroups? I really would like such a feature!
Reply With Quote
  #6  
Old 01-11-2009, 07:37 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are referring to a default feature, I do not know the answer to that question. However, it is unlikely any significant new features will be included in vBulletin 3.
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 01:10 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.03827 seconds
  • Memory Usage 2,206KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete