![]() |
newpost_preview - editing message on this hook...
I have working code that makes a last minute change to displayed text in a post based on a custom profile field and it works great in postbit_display_complete. Today I realized though if a user "previews" a post before submitting it the last minute change doesn't happen because this event is a different hook.
I believe what I'm looking for is newpost_preview hook. Looking in the newpost_preview template the message is contained in $previewmessage as opposed to $postt['message'] like it is in the postbit hook. So I changed the code I was using in postbit_display_complete to replace $post['message'] with $previewmessage but it isn't working. My code is something like: Code:
if ($vbulletin->userinfo['field16'] == "No" OR $vbulletin->userinfo['styleid'] == 20 OR $show['guest'] OR preg_match('|domain1.com|', $previewmessage) OR preg_match('|domain2.com|', $previewmessage)) :confused: --------------- Added [DATE]1286123659[/DATE] at [TIME]1286123659[/TIME] --------------- Update There must have been a typo in the code, when I re-did it it worked as expected. :o |
All times are GMT. The time now is 10:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|