The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I need to parse the contents of a postbit on the fly, i.e. when a page is rendered server-side. I've had a play with postbit_display_complete but preg_replace('/moo/', 'baa', $this->post['message']); will not replace the only reference of moo with baa in the post
![]() |
#2
|
||||
|
||||
![]()
I've tried several methods and also cannot get it to do so :ermm:
Looks like you'll have to edit class_postbit ![]() Satan |
#3
|
||||
|
||||
![]()
Hmm strange
![]() |
#4
|
||||
|
||||
![]()
Are you sure the preg_replace is correct ?
If you simply put something like ; Code:
$this->post['message'] .= " # END # "; |
#5
|
||||
|
||||
![]()
Interesting. Then try using this hook @ postbit_display_complete:
Code:
str_replace('moo', 'baa', $this->post['message']); ![]() |
#6
|
|||
|
|||
![]()
Better try:
PHP Code:
|
#7
|
||||
|
||||
![]() Quote:
I would expect it to be ; PHP Code:
Since my test board has currently disappeared up it's own ar*e I can't prove this atm Edit: Darn, I see Marco has beaten me to pretty much suggesting the same. ![]() Edit 2: It does work. ![]() |
#8
|
||||
|
||||
![]()
I'm having a real bad day it would seem
![]() |
#9
|
||||
|
||||
![]()
Almost (?) all vBulletin Classes take a reference of the Registry ($vbulletin) object that can be accessed as $this->registry.
|
#10
|
|||
|
|||
![]() Quote:
![]() Don't worry happens to me a lot of times to. I open a lot of pages at once and read tehm when i have time. Sometimes that is 1 hour later. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|