[PHP|Implemented] posting_refresh

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|Implemented] posting_refresh

Post by imkingdavid »

Identifer: posting_refresh
Location: Directly following $refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load || $preview) ? true : false;, around line 41 in posting.php
Parameters: $refresh
Explanation: The $refresh boolean variable determines whether to retain content on the posting form across submissions. For instance, if I hit Preview, the value of the message box is retained. If I added a new submit button for any other purpose and did not add it to the refresh condition, when I click it, I will lose whatever is contained in the message box (and other form elements).

As a practical example, my topic prefixes extension needs to add a way to add prefixes on the posting screen, and I plan to do so by adding some more buttons, but I don't wish to lose the content of the post every time I wish to change the applied prefixes.

So basically, the extension would do something like:
$refresh = $refresh || isset($_POST['my_new_button']) || isset($_POST['my_other_new_button']);
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] posting_refresh

Post by imkingdavid »

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] posting_refresh

Post by imkingdavid »

Something similar to this has been merged.
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