Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow Usergroups to Post HTML Details »»
Allow Usergroups to Post HTML
Version: 1.00, by kall kall is offline
Developer Last Online: Aug 2021 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 09-25-2005 Last Update: 11-27-2005 Installs: 510
Uses Plugins
Is in Beta Stage  
No support by the author.

Just like the name says, this ultra-simple little Product will allow you to specify Usergroups that may post in HTML and have that HTML be parsed...SOME PEOPLE ARE HAVING TABLE PROBLEMS - THIS IS UNSUPPORTED USEAGE OF THE MODIFICATION AND I AM UNABLE TO ASSIST!

***BE AWARE THAT INDISCRIMINATE USE OF THIS HACK IS RISKY - RESTRICT IT TO ONLY THOSE USERGROUPS YOU TRUST ABSOLUTELY***

The scary message above is to make sure you are aware that enabling HTML for any group opens you up to security issues. This is why it is not a feature of Stock vB, probably.

I decided I needed to have the ability to post in HTML because I just installed ZT's RSS Feeds hack, and the ones I got from Google looked all horrible.

Now updated to be controlled by a Setting in Usergroup Manager, it's phrased and even works in editpost.php (preview) in WYSIWYG and normal modes, AND the Forum Rules shows HTML is ON.

This will not work retroactively. That is, if a User posted something in HTML before they were given the ability, that post has to be edited by that member (or someone else with HTML ability) in order to be parsed. I am assuming this is due to post caching.

Many thanks to Kirby for prodding me to figure it out by myself and not just telling me what to do.

A "demo" is here..html is OFF in that Forum, but the post is made by an Admin, so the HTML is parsed.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
HeyMe

Comments
  #352  
Old 08-16-2007, 03:09 PM
ddmobley ddmobley is offline
 
Join Date: May 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ArchangelX View Post
Yepz...same here...although I didn't know the exact cause of it. Anyone got a fix? Thanks!
What's disappointing about this situation is everywhere on this site that someone has requested a mod like this, everyone has been referred here to this mod, AND the author of the mod is on this forum often, so that means he knows about the problem and is simply ignoring people since I sent him both an email and a PM about the subject. When I made my original post, I checked his profile and his last visit was that same day. Why simply ignore one of the most widely desired mods because you can't find a solution? If you can't fix the problem, perhaps an open discussion of it could lead to a solution with help from other modders. But I simply do not understand ignoring people. Unsupported is one thing, abandoned on purpose is another.
Reply With Quote
  #353  
Old 08-27-2007, 09:10 AM
mik2007 mik2007 is offline
 
Join Date: Mar 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod but I'm having some probs and wondering if anyone knows how to fix it --

When I paste raw html adsense code in my post (basic editor) it turns out ok but then, when I save it, it adds <br /> to every line and thus breaks adsense.

No matter what I did it always inserts those <br /> tags! Any idea?

update: Looks like vb does it, not this mods fault.
Reply With Quote
  #354  
Old 08-27-2007, 04:45 PM
ddmobley ddmobley is offline
 
Join Date: May 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a simple fix to solve your problem: Make your line of HTML text all one line. Then it will display correctly.

On the other hand, it would be NICE if the author of the mod would simply admit that he doesn't know how to fix the problem with the HTML vanishing out of the post cache.
Reply With Quote
  #355  
Old 08-28-2007, 08:51 PM
ddmobley ddmobley is offline
 
Join Date: May 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is another mod for 3.0.6 at https://vborg.vbsupport.ru/showthread.php?t=75590 that modifies some files. Does 3.0.6 have the same post cache that 3.5.4 does? If so, I was wondering if using the other mod would work for 3.5.4 and eliminate the post cache expiring. I can't believe the author of this mod here refuses to at least comment on the post cache error.
Reply With Quote
  #356  
Old 08-28-2007, 10:34 PM
ddmobley ddmobley is offline
 
Join Date: May 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have been working with today and have found out that the display of parsed HTML with this mod is dependant on the Cached Posts Lifespan setting in the admin section. If you turn post caching OFF by entering a 0 in the field, the mod will not work at all, only rendering HTML to the user posting it. The next person who tries to read the post who is not in the user group that allows HTML, they will simply see a raw dump of the HTML code.
Reply With Quote
  #357  
Old 08-28-2007, 11:10 PM
ddmobley ddmobley is offline
 
Join Date: May 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In a search for an answer to the parsed posts disappearing, I have modified my system to preserve the parsed post cache for posts that are sticky. On my system, the only posts that would have HTML in them are sticky posts, so it was, to me, only a question of how to keep the software's maintenance from deleting posts from the parsed post cache that were stickly posts. Here's how I did it:

In includes/cron/cleanup2.php, there is a code segment that looks like:

Code:
// expired cached posts
$vbulletin->db->query_write("
	DELETE FROM " . TABLE_PREFIX . "post_parsed
	WHERE dateline < " . (TIMENOW - ($vbulletin->options['cachemaxage'] * 60 * 60 * 24)) 
);

I edited it to look like this:

Code:
// expired cached posts
$vbulletin->db->query_write("
	DELETE parsed FROM " . TABLE_PREFIX . "post_parsed AS parsed
	LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON thread.firstpostid = parsed.postid
	WHERE parsed.dateline < " . (TIMENOW - ($vbulletin->options['cachemaxage'] * 60 * 60 * 24)) . "
	AND thread.sticky = 0"
);

Edit: I found I was getting a SQL error in my previous modification, and found a new way of keeping the post_parsed_cache clean. This above works.

This simply checks the thread table for the existence of a sticky post ID that matches the post ID of a post in the parsed post cache. If there is a match, it doesn't delete that post's cache, it leaves it indefinitely, or until the post is manually deleted.
Reply With Quote
  #358  
Old 08-31-2007, 07:26 PM
roymogg roymogg is offline
 
Join Date: Jun 2007
Location: UK
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kall,

Will this hack work under 3.6.8 - this is a mod I would like to install for a restricted set of user groups (mainly Admin)

cheers

RoyMogg
Reply With Quote
  #359  
Old 08-31-2007, 07:40 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Roymogg,

Yes indeed, it appears to work fine with 3.6.8.
Reply With Quote
  #360  
Old 08-31-2007, 09:09 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ddmobley View Post
I have been working with today and have found out that the display of parsed HTML with this mod is dependant on the Cached Posts Lifespan setting in the admin section. If you turn post caching OFF by entering a 0 in the field, the mod will not work at all, only rendering HTML to the user posting it. The next person who tries to read the post who is not in the user group that allows HTML, they will simply see a raw dump of the HTML code.
I ran into this too. So, I set out looking for a solution. I put code in the misc_bbcode_start hook and ran the rebuild post cache. No html worked still.

So, I hacked the file and ran it again. This time posts parsed properly.

Since it's only me in one forum doing html, this is easy to maintain.

Is it normal that admin functions skip hooks? Anyway, I'm good to go.
Reply With Quote
  #361  
Old 09-15-2007, 01:56 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall View Post
Hi Roymogg,

Yes indeed, it appears to work fine with 3.6.8.
but the cached posts displaying any html posts as raw html error still exists. Is there any way to fix this issue?
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:54 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.05021 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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