The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Modify Article Text via a Plugin
I've been trying to find how to do this, but have had no luck.
I want to change BBCode behaviour on the fly in articles. With posts I can do this by changing $text and reparsing into $parsedtext but can not find what to change for article content... If anyone in the know would care to help, it'd be much appreciated... Thanks |
#2
|
|||
|
|||
An alternative would be to find a way to have vBulletin not use the BBCode parsed articles as all I really want to do is change the way user defined BBCodes behave under certain ciurcumstances (such as paticular styles)
Any suggestions? Thanks |
#3
|
||||
|
||||
Can you post the code that you tried but isn't working? Please make sure to post the hook locations and put the code in code tags.
|
#4
|
|||
|
|||
I don;t have any not working code. I just do not know what var the cms article text is stored in to manipulate it. I have working code for forum posts which I hoped to apply also to CMS articles
|
#5
|
||||
|
||||
For actual articles (as compared to Static pages or PHP Direct Evaluation pages), the template name is vbcms_content_article_page . And, in that template, they are using the variable $pagetext to spit out the pagetext.
|
#6
|
|||
|
|||
Thanks for you help so far, Lynne.
What I have working for forum posts is on hook bbcode_parse_start and the code does a preg_replace on $text and then runs it through the bbcode_parser to get $parsedtext PHP Code:
Thanks! |
#7
|
||||
|
||||
If you go into debug mode (look in the articles forums), then you will get a list of all the hooks used on that page and be able to pick a good hook location to use.
|
#8
|
|||
|
|||
Seems I have to use the variable $view->pagetext to get the article content - I'm getting inconsistent results, but at least I'm getting somewhere now ...
Thanks |
#9
|
||||
|
||||
The actual variable name/syntax will change depending on what hook location you use. That is why it is always important to actually go look at the code around where the hook is being called.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|