The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Can't modify $post['signature'] in plugin...
I can modify $post['message'] and $post['title'] no problem... I'm trying to modify $post['signature'] by searching for a string, if it's found, replacing it with a different string.
I tried postbit_display_complete first and while it worked for message and title it didn't do anything for signature... So then I changed it to postbit_display_start and nothing from there either- I get no errors but the text never gets replaced. This is frustrating because I have another custom plugin running on the same hook which modifies $post['signature'] already and it works. (I disabled that plugin while testing the new one.) The working plugin evaluates a template on the signature start template hook and then "erases" the existing sig with the line: Code:
$post['signature'] = ''; |
#2
|
||||
|
||||
You need to look in the db and see what it shows for the string you are looking for before it is parsed.
|
#3
|
||||
|
||||
So would a different hook be better- after it is parsed? I would think postbit_display_complete would be after parsing...
--------------- Added [DATE]1290961069[/DATE] at [TIME]1290961069[/TIME] --------------- GOT IT!! This is absolutely ridiculous but in postbit_display_complete it does work IF I use: $post[signatue] but doesn't work if I use $post['signature'] |
#4
|
||||
|
||||
I assume you mean $post[signature]? But actually, if you look at the code around postbit_display_complete, you'll see the proper variable to use is $this->post, so it should be $this->post['signature'] . (however, I tried $post['signature'] and it worked fine for me. :/ )
|
#5
|
||||
|
||||
You know it was 4am... I'm not sure of anything at this point.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|