Warning: The author of this contribution does not provide support for it anymore.

Prime Trash Bin

Work-Around for minor edit/delete issue. - Prime Trash Bin

Work-Around for minor edit/delete issue.

by PiperB » Mon Jul 31, 2017 1:16 pm

******************************

Hey Everyone,
Just posting a small work around for a minor issue that I noticed with this mod.

The issue is that when you try to delete the first post (which is the start of the topic) by using the checkbox in the edit post, it goes to the prime delete confirm page and when you choose to permanently delete the topic it just redirects to the edit post page instead of any other action.

This delete is what I'm referring to, and only for the first post does it have the issue. Still goes to the prime confirm, but the prime confirm permanent delete no work for topic start.
(Side note: Yes I know, my topic icons are fabulous, LOL)
1.png

The mod still will delete posts using the check box to delete when editing posts, and all other delete functions with this mod work perfectly as far as clicking the delete button, using quick mod, and from the mcp, so those are fine, several options offered still for deleting the topics and posts and with those can still delete topics and posts permanently.

So since using the checkbox to delete posts still works, again only does not work for the first post.

This is not the fix to make it delete the topic start using that check box in edit post, but rather a work around to hide the option only in the first post of the topic.

Since we already have a template variable that works for this in posting.php, which has statements to make is recognize first post and edit post, and looks like so.
Note: this part is for reference only and learning. You don't need to do anything with it because it's already present, just displaying the code here again to show where the template variable came from and why I used it.

Code: Select all

if ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_data['post_id']))
{
	$template->assign_var('S_NEW_MESSAGE', true);
}
So now comes the easy work around we use to hide the delete checkbox only in the first post of the topic. Also wanted to mention that the S_NEW_MESSAGE template variable as you can see from the statement above it, does not look to really see if it's a new message but rather if it's the first post of the topic and this fix works for topic starts of any age.

Work-Around Edits begin:
//Prosilver (and all prosilver based styles)

Open: styles/prosilver/template/posting_editor.html

Find:

Code: Select all

<!-- IF S_DELETE_ALLOWED -->
Replace with:

Code: Select all

<!-- IF S_DELETE_ALLOWED and not S_NEW_MESSAGE -->
Save the file.

//Subsilver2 (and all subsilver2 based styles)

Open: styles/prosilver/template/posting_body.html

Find:

Code: Select all

<!-- IF S_DELETE_ALLOWED -->
Replace with:

Code: Select all

<!-- IF S_DELETE_ALLOWED and not S_NEW_MESSAGE -->
Save the file.

Clear your cache and refresh your templates. If someone else wants to make an actual fix where the delete through using the checkbox redirect does not just redirect to the editing page again and actually does delete topics, then by all means post it.

The work-around is good enough for me because frankly having 3 other delete options to delete a topic doing the same options desired is enough for me. Otherwise I would try at the actual fix myself, but since it does not throw any errors and this is the only issue I have with this mod and love it, I am not going to even attempt it.

Perhaps it was that way on purpose to begin with, lol, not sure but here ya go folks, Enjoy! ;)

__________________________________
Disclaimer: I decided to share my edits, fixes, addons, companion mods, e.t.c. for "wiki" type purposes and for those out there like me who are on older versions of phpbb3 still. Also for those who still have or wanted this mod to have a new feature or a fix this is for you! :)
<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 167
Joined: Mon Nov 07, 2016 6:54 pm

Re: Work-Around for minor edit/delete issue.

by fliper4o » Wed Aug 23, 2017 12:03 pm

Does the ext work on 3.2.1 ?
User avatar
fliper4o
Registered User
Posts: 215
Joined: Wed Mar 23, 2011 8:15 pm
Contact:

Re: Work-Around for minor edit/delete issue.

by RMcGirr83 » Wed Aug 23, 2017 12:33 pm

No it doesn't and PiperB has been necro-posting old 3.0 mods.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20431
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Work-Around for minor edit/delete issue.

by PiperB » Fri Aug 25, 2017 2:53 pm

There are a lot of people still using older versions of phpbb, and also the downloads are still available, which means people can and will still use them. I'm just sharing my fixes and work around for those people. Hence the disclaimer. Are you a moderator or something?

I saw no rules against sharing in here. I did read the rules. What I did see is we are not supposed to behave as moderators if we are not moderators.
<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 167
Joined: Mon Nov 07, 2016 6:54 pm

Re: Work-Around for minor edit/delete issue.

by RMcGirr83 » Fri Aug 25, 2017 6:54 pm

I'm not acting as a moderator, simply stating the truth. 3.0 is no longer supported here, so one should move on.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20431
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Work-Around for minor edit/delete issue.

by open-your-eyes » Thu Nov 09, 2017 10:10 pm

PiperB wrote:There are a lot of people still using older versions of phpbb, and also the downloads are still available, which means people can and will still use them. I'm just sharing my fixes and work around for those people. Hence the disclaimer. Are you a moderator or something?

I saw no rules against sharing in here. I did read the rules. What I did see is we are not supposed to behave as moderators if we are not moderators.
Nervermind him. He said the same thing to me. The guy has issues.
My forum: Under construction...
User avatar
open-your-eyes
Registered User
Posts: 35
Joined: Mon Jul 31, 2017 8:20 am
Contact:

Re: Work-Around for minor edit/delete issue.

by PiperB » Mon Nov 20, 2017 6:55 pm

Thank you. :)
<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 167
Joined: Mon Nov 07, 2016 6:54 pm