solved Preventing accidental deletion of my Forum Profile / disable delete button

Strumelia
Strumelia
@strumelia
6 years ago
3,603 posts
I recently made a stupid mistake, but I now know I need to prevent this from happening so easily again.

My site uses the jrForum module, and when first building my site I created a forum profile called "Forums" to house/own all the discussion forums on my site. This profile 'owns' the many hundreds of forum discussions created over the past nine years of the site.

Yesterday, while going through and deleting some older moot discussion threads (by clicking on the trash can button to the right of each discussion title), I let down my guard and accidentally clicked the trashcan button a couple of inches higher- the one to the right of my "Forums" profile name. After deleting over 30 discussions one after another, i was no longer reading the "Are you sure you want to delete this item?" warning.
I clicked it and BOOM, all my forums were GONE, and the profile along with it.
The terrific Jamroom Team responded very quickly to my desperate ticket and retrieved everything for me (luckily I had hourly backups enabled, so I didn't lose a whole day of site activity).
Whew, a huge relief!
But this got me thinking that it was all too easy for me to hit the wrong trashcan again- they are uncomfortably close to each other.
I'd like to DISABLE the trash can next to ONLY my Forums Profile (profile#2) so it won't show and will be more 'idiot proof'. =8-\ I want that button to remain in place for all other profiles, however.

How can I do this please?
Below is a screenshot of the button I'd like to hide from myself and any other Admins...you can see the forum area I was in when I committed the dumb mistake.
trashcans.jpg
trashcans.jpg  •  366KB




--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 06/01/18 09:12:06AM
paul
@paul
6 years ago
4,326 posts
Hi Strumelia
Goto your skin's profile_header.tpl template and find the {jrProfile_delete_button profile_id=$_profile_id} code on line 18. Replace it with this -
{if $_profile_id != 2}
    {jrProfile_delete_button profile_id=$_profile_id}
{/if}
hth


--
Paul Asher - JR Developer and System Import Specialist
brian
@brian
6 years ago
10,148 posts
And just to add - if for some reason this DOES happen again, just go into ACP -> Tools -> DB and System Backup -> Tools -> Hourly Backup Browser. You can then restore the tables/items that were deleted right there.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
6 years ago
3,603 posts
Will do!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Strumelia
Strumelia
@strumelia
6 years ago
3,603 posts
Thanks Paul that tweak worked perfectly. :)
Brian I never noticed that particular tool - I won't forget it now! =8-o


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Strumelia
Strumelia
@strumelia
6 years ago
3,603 posts
Brian let me get this straight:
You used that tool to FIRST restore all the tables under 'profiles' in the list, and AFTER that you ran an integrity check and then used the tool again to restore all the tables under 'forum' category in the tool list?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
6 years ago
10,148 posts
I actually did it from the command line - but yes - you would just go into the set you want to restore from (i.e, the hour and time you want to restore from), put a checkmark in all the PROFILE and FORUM tables, then restore. Then run an integrity check and reset caches.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
6 years ago
3,603 posts
Would I need to do the Profile ones FIRST, and then go back and do the forums one? (like first provide the profile again, and then fill in the profile's content?) Or just do it all in one shot? Is the sequence important?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
6 years ago
10,148 posts
No - you can do them all at once.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
6 years ago
3,603 posts
Ok got it- thank you as always Brian! :D


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015