PDA

View Full Version : Stop Quoted text > New text - which hook?


bulbasnore
02-21-2008, 03:56 AM
Hi folks,

I'm pretty fair with php, but putting that into the context of vB isn't always easy for me. It's finding where the body is buried, or the needle in a haystack or the leaf in the forest - the frustrating search for where to inject your code and how to get it called. I'm here for your help with that!

What I want to do is intercept the message text on its way to the post and return the user to the editor with a message saying something like "You must have more new text than quoted text to post on <Forum Name>. Please edit your quotes to just the most relevant text and submit your reply again."

I'm pretty sure I can parse the text and then compare new to quoted character counts.

May I ask:

Has someone done this mod already? I've looked, but hope I haven't overlooked.
Where do I hook in to catch this text before its posted?
What do I use to return them to the editor (with message)?


Anything else you want to suggest as far as templates or tutorials, is appreciated.

'snore

Dismounted
02-21-2008, 05:20 AM
Look at one of the newreply hooks. The relevant variables will be available there.