PDA

View Full Version : Hook for Visitor Message Display


nanabite
05-26-2009, 11:11 AM
Hi All,

I would like to inject an additional field into the $message variable used for displaying visitor messages on profiles, however I cannot seem to find the right hook to let me do it.

Which hook would allow me to intercept the $message variable so that I can refer to my additional field in the memberinfo_visitormessage template?

Thanks in advance for any assistance.

Adam

Lynne
05-26-2009, 02:14 PM
Did you take a look at class_visitormessage.php? You can see the hooks called there - visitor_messagebit_display_start and then visitor_messagebit_display_complete

nanabite
05-26-2009, 07:19 PM
Thanks Lynne,

I ended up working it out, there was a condition in my plugin that was stopping my debug code from executing. I didn't take into account that the $vbulletin variable hadn't been set from the global at the point where the visitor_messagebit_display_complete hook was placed, and as such was comparing my username with null.

Adam