PDA

View Full Version : Update post before inserting to database (replace text during new post submit)


lim(x?-5x?) = ∞
12-29-2009, 12:03 PM
Is it possible to replace text After user submitted new post, Before inserting to database. For example:


something (http://www.mysite.com/forum/showthread.php?t=1234)
http://www.mysite.com/forum/showthread.php?t=1234
www.mysite.com/forum/showthread.php?t=1234


to


something
1234
1234



This is not about updating old posts in database via query, and not about bbcode parsing.

Is it possible to do with hooks? Is it possible with file edits? /includes/functions_newpost.php

May be someone knows hack or plugin with similar code?

Lynne
12-29-2009, 02:29 PM
Try using the hook location newpost_process. It's after vB sets the message but before it is saved. So, you can intercept it there and change it.