PDA

View Full Version : What hook location to use?


BirdOPrey5
09-28-2010, 01:56 AM
I'm looking to do a search and replace on text in a post when a user displays a post in their browser... Basically there will be code for a specific image in the post HTML, something like <img src="myimage.jpg" alt="alt text" /> and if the user has a specific custom user profile field enabled they will see the image, but if they have it disabled it will do a search and replace on the text and display some alternate HTML code instead. I think I've got the rest of the code figured out but wondering what hook location I should use... newpost_complete I don't think is right... maybe postbit_display_complete or postbit_display_begin? Or something else?

thanks...

Lynne
09-28-2010, 03:31 AM
I would think postbit_display_complete. (Try it and see.)

BirdOPrey5
09-28-2010, 05:16 AM
Yes that looks to be working, Thanks Lynne!