The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
change post upon save
Hi,
i would like to change something in messages posted. therefore I would have written a plugin on postdats_presave hook PHP Code:
|
#2
|
||||
|
||||
Assuming $vbulletin->GPC['message'] actually contains the message before it's saved then yes that is how the plugin system would work.
|
#3
|
|||
|
|||
thanks
doesn't seem to work. so, how may I find out where the message is stored at the moment of this hook? I saw other plugins https://vborg.vbsupport.ru/showthread.php?t=150761 using this, but maybe because I'm on 4.1.4 and not 3.1.6 it fails? |
#4
|
||||
|
||||
I will move this to the VB 4.x forum for you then. I would try $post['message'] or $newpost['message'] and see if either of those work.
The right way would be to open the php file and see what variable is actually be used around that hook. But guessing doesn't really hurt anything. |
#5
|
||||
|
||||
FYI the appropriate variable for this was: $this->post['pagetext']
|
#6
|
|||
|
|||
but what's the difference to $post['message'] ?
|
#7
|
||||
|
||||
The difference for me is that $post['message'] didn't work on my tests. If it's working for you then don't worry about it. But I can confirm $this->post['pagetext'] works on both 3.8 and 4.x.
|
#8
|
|||
|
|||
thanks again
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|