The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Allow Usergroups to Post HTML Details »» | |||||||||||||||||||||||||
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
|
Благодарность от: | ||
HeyMe |
Comments |
#352
|
|||
|
|||
Quote:
|
#353
|
|||
|
|||
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. |
#354
|
|||
|
|||
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. |
#355
|
|||
|
|||
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.
|
#356
|
|||
|
|||
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.
|
#357
|
|||
|
|||
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. |
#358
|
|||
|
|||
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 |
#359
|
||||
|
||||
Hi Roymogg,
Yes indeed, it appears to work fine with 3.6.8. |
#360
|
|||
|
|||
Quote:
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. |
#361
|
||||
|
||||
but the cached posts displaying any html posts as raw html error still exists. Is there any way to fix this issue?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|