![]() |
|
|
Thread Tools |
|
#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 No members have liked this post.
|
|
#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 No members have liked this post.
|
|
#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.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#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 articlesNo members have liked this post.
|
|
#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.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#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
No luck using $pagetext for articles and I'm not sure that hook is even called? Any further suggestions which might point me in teh right direction on how to apply this to articles? Thanks! No members have liked this post.
|
||||
|
#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.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#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 No members have liked this post.
|
|
#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.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 06:02.


I have working code for forum posts which I hoped to apply also to CMS articles
