The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding a "newreply_post_complete" hook to the quick reply
Hi all,
Noob at vb tbh, but I'm attempting to fix a bug within Zoint's Anonymous Posting mod. To summarize, the problem appears to be this: When you press the "Reply" button and go to the newreply.php page, you can choose to post anonymously. When you do, the mod adds an entry into a table that logs who created the post for later moderation. This is enabled by the mod looking for the following hook: ($hook = vBulletinHook::fetch_hook('newreply_post_complete' )) ? eval($hook) : false; I have found that this hook is only present in the newreply.php page, and not in the showthread.php which houses the quick reply option. Given my limited experience with vbulletin modification, is there a clever way to modify the plugin so that the quick reply will generate the hook, or do I need to manually update the showthread.php file? I know this is a slippery slope in that I will have to patch it during each upgrade, but it is a pretty important feature to me so I'm not above putting in a little extra time. Having said that, a more elegant solution is always preferable! Thanks all --------------- Added [DATE]1250719180[/DATE] at [TIME]1250719180[/TIME] --------------- I've been doing a bit more research and I think I understand how/when the hook is called in the newreply.php, but I'm not finding a comparable place in the showthread.php to add this.. I think this is because it is building the quick reply dynamically, and is not set to interpret the post itself. This leaves me wondering what it's actually calling to do the post. I might be nuts here, but it almost looks like when doing the quick reply, the php file just builds the interface and lets the template handle the actual posting.. whereas in newreply it is doing some validation that allows it to use the hook? I'm not sure.. Does anyone have any experience with modifying the quick reply that could save me a bunch of headache? --------------- Added [DATE]1250722815[/DATE] at [TIME]1250722815[/TIME] --------------- Eureka! I think I've answered my question. I found this awesome guide: http://www.vbhackers.com/f80/how-adv...ide-1-a-11234/ which tipped me off that there is a seperate hook for the AJAX quick reply called "newreply_post_ajax". I went into my plugin manager and created a new hook for the Zoint's Anonymous Posting mod and everything works now! Go me |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|