Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 02 Mar 2011, 05:00
dartho dartho is offline
 
Join Date: Sep 2005
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
Reply With Quote
  #2  
Old 04 Mar 2011, 10:18
dartho dartho is offline
 
Join Date: Sep 2005
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
Reply With Quote
  #3  
Old 04 Mar 2011, 17:08
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.)
Reply With Quote
  #4  
Old 04 Mar 2011, 21:36
dartho dartho is offline
 
Join Date: Sep 2005
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
Reply With Quote
  #5  
Old 04 Mar 2011, 23:07
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.)
Reply With Quote
  #6  
Old 06 Apr 2011, 23:26
dartho dartho is offline
 
Join Date: Sep 2005
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



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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!
Reply With Quote
  #7  
Old 07 Apr 2011, 04:33
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.)
Reply With Quote
  #8  
Old 08 Apr 2011, 05:51
dartho dartho is offline
 
Join Date: Sep 2005
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
Reply With Quote
  #9  
Old 08 Apr 2011, 16:52
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 06:02.

Layout Options | Width: Wide Color: