[PHP] core.submit_post_end (was: core.submit_post_modify_return_url)

These requests for events in core phpBB have been merged into 3.1/Ascraeus and will be available with the next release.
Post Reply
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

[PHP] core.submit_post_end (was: core.submit_post_modify_return_url)

Post by imkingdavid » Sun Dec 01, 2013 3:22 am

Identifer: core.submit_post_modify_return_url
Location: functions_posting.php directly before the return statement in submit_post()
Parameters:
  • $data - array containing post data
  • $url - The redirect URL used on the posting success page to return to the post
Explanation: For my topic prefixes extension, I need to be able to add prefixes to new topics, but with the current events it seems impossible to determine the ID of the new topic after it has been posted. The events in posting.php don't let me access it, and even if we added an event in after submit_post(), or if I used something that happens on all pages after that is run, I'd need to do another SQL query to determine the topic ID. If we add the event inside submit_post() the topic ID is available in the $data array. The name of this event is really due to the fact that the only actual action that you could perform by changing any of the event's parameters would be to change the URL. It just has the added benefit of allowing me to access some data I need.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [PHP] submit_post_modify_return_url

Post by imkingdavid » Sun Dec 08, 2013 7:25 pm

I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [PHP] submit_post_modify_return_url

Post by imkingdavid » Sun Dec 08, 2013 7:43 pm

NOTE: This was renamed to core.submit_post_end.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Post Reply