Advertisement:
GCWebhosting

Author Topic: Dougiefresh's Reorganized Admin Area (SMF 2.0.x Only)  (Read 8301 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Dougiefresh's Reorganized Admin Area (SMF 2.0.x Only)
« on: December 01, 2014, 05:50:20 PM »
Link to Mod


DOUGIEFRESH'S REORGANIZED ADMIN AREA V1.3
By Dougiefresh => Link to Mod


Introduction
This mod makes a variety of changes to the Admin area in order to more logically order the mods installed into the Admin area.  Most were dumped into the Configuration area by the mod authors, which was fine, but it creates a big mess that I really got tired off.

Admin Alterations
> Package Manager is now in its own section!
> Search section was created, using the Search area from Configuration and Search Engines from Main.
>>> If Optimus Brave is installed, it is moved to the Search area.
> Security section has been created, using Security and Moderations area from Configurations
>>> httpBL, Forum Firewall and Bad Behavior have been moved to the Security section
>>> If SMF 2.1-style Admin Area is installed, the Anti-Spam area is moved to the Security section.
> Configuration tab has been restored back to unmodified condition, with exception of Security and Moderations
> Modifications now have a Mods section, dedicated to everything that doesn't belong in Configuration!
>>> EMail Inactive Users has been moved to the Maintenance area.
>>> Related Topics has been moved to the Forums area.
>>> Like Posts has been moved to the Forums area.
>>> Akismet Spam Protection has been moved out of Modifications Settings and placed under Security
>>> Mentions has has been moved out of Modifications Settings and placed under Forum
>>> Block e-mail usernames has has been moved out of Modifications Settings and placed under Members
>>> All other modifications in the Configuration tab were moved into a new Mods section
> Forum => Calendar was moved to the Configuration area.
> Members => Paid Subscriptions was moved to the Configuration area.
> SMF Gallery area was merged with the Mods area.
> SimpleAds area was merged with the Mods area.
> SA Facebook Integration area was merged with the Mods area.
> Maintenance => Reports was moved to the Main area.
> Attachments and Avatars section renamed to Attachments
> Attachments and Avatars => Avatars Settings moved to Members => Avatars
>>> Attachments and Avatars => Browse Files => Avatars moved to Members => Avatars => Browse Files
>>> Default Avatar options in Modification Settings moved to Members => Avatars => Miscellaneous
>>> Avatar for Banned Members option in Modification Settings moved to Members => Avatars => Miscellaneous
> Permissions section removed from Members into it's own area.

Compatibility Notes
This mod was tested on SMF 2.0.9, but should work on earlier versions of SMF 2.0.x.  SMF 1.x is not and will not be supported.

Other Notes
The reorganization of the Admin menu takes place AFTER the processing of the hooks....

SMF 2.1-style Admin Area should be installed prior to this mod.

This mod was part of the Real Tabs for Admin & Moderator Menus mod (version 2.x line) and has been expanded upon.

This mod does not install any other mods in order to use, so if the specified mod is not installed, no menu change will be made.

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Copyright (c) 2015, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
« Last Edit: January 19, 2015, 09:46:05 AM by dougiefresh »

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Dougiefresh's Reorganized Admin Area
« Reply #1 on: December 01, 2014, 07:35:09 PM »
Sa-weet! Nice work! :D
Online Manual

Please do not PM me for support.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Dougiefresh's Reorganized Admin Area
« Reply #2 on: December 01, 2014, 08:15:20 PM »
Sorry to double post ...

Question ... I have your Lazy Admin Menu installed, does this mod incorporate that or should I keep it installed while I have this one installed?
Online Manual

Please do not PM me for support.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 783
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Dougiefresh's Reorganized Admin Area
« Reply #3 on: December 02, 2014, 12:36:16 AM »
Can you explain a bit what "The reorganization of the Admin menu takes place AFTER the processing of the hooks...." means? Because I installed it and am not seeing any changes... When are hooks processed?

Thanks!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,216
    • StoryBB/StoryBB on GitHub
Re: Dougiefresh's Reorganized Admin Area
« Reply #4 on: December 02, 2014, 11:41:56 AM »
Hooks are processed after the main menu is built in the admin area. This mod intercepts things after hook processing, I'm guessing.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 783
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Dougiefresh's Reorganized Admin Area
« Reply #5 on: December 02, 2014, 11:49:54 AM »
Ah, I see. Anyway I can find out why it's not working despite installing successfully?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,216
    • StoryBB/StoryBB on GitHub
Re: Dougiefresh's Reorganized Admin Area
« Reply #6 on: December 02, 2014, 12:01:34 PM »
What, exactly, is it not doing?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 783
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Dougiefresh's Reorganized Admin Area
« Reply #7 on: December 02, 2014, 12:02:51 PM »
...any changes to the Admin area :)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,216
    • StoryBB/StoryBB on GitHub
Re: Dougiefresh's Reorganized Admin Area
« Reply #8 on: December 02, 2014, 12:04:24 PM »
So, *everything* is unchanged?

Hmm. I see it is using a hook; I wouldn't use a hook in this situation - at least not unless I was periodically checking that my hook was called *last*.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 783
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Dougiefresh's Reorganized Admin Area
« Reply #9 on: December 02, 2014, 12:08:02 PM »
No, nothing is changed indeed. It's as if I didn't install it...

---no wait, it did. It's just that you must, hm, how to put it, "expand" the Admin area with the two little arrows at the top left, then it's as described... Hope you understand what I mean :)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Dougiefresh's Reorganized Admin Area
« Reply #10 on: December 02, 2014, 12:10:36 PM »
Isn't your Package Manager moving from the left-most menu (or from the top menu, if you don't have it "expanded") to a menu of his own, right to "Configuration" (or below "Configuration")?

@Arantor: nevertheless, the changes to SMF "core" menus should be running. He is using a hook that adds a temporary hook every time, so it is added by SMF at the end of the list of "permanent" hooks. Works fine here...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,216
    • StoryBB/StoryBB on GitHub
Re: Dougiefresh's Reorganized Admin Area
« Reply #11 on: December 02, 2014, 12:12:13 PM »
You mean sidebar vs dropdown menus? This is a core SMF feature.

Both are built from the same base code so the changes would function the same between the two, just presented differently to much confusion. Fortunately in 2.1 this has been changed and there's only one method now (just the dropdown menus)

@margarett: I didn't look at what was going on there, but I certainly recognise the mentality having done similar myself ;)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 783
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Dougiefresh's Reorganized Admin Area
« Reply #12 on: December 02, 2014, 12:19:08 PM »
Isn't your Package Manager moving from the left-most menu (or from the top menu, if you don't have it "expanded") to a menu of his own, right to "Configuration" (or below "Configuration")?

Yes, it does, as soon as I do what I described above :)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Dougiefresh's Reorganized Admin Area
« Reply #13 on: December 02, 2014, 06:58:34 PM »
Uploaded v1.1 - December 2nd, 2014
o Changed hook code back to original code edit in Sources/Admin.php
o Removed Team Page from the list of areas in the Configuration section...

 :o Crap... I thought I had solved that particular issue, but I installed the mod on a clean install and it didn't make any changes.   So I changed the code back to the way it was when I had submitted it to the Customization Site, which included the file and called the function directly from Sources/Admin.php.  This fixes the issue reported by Gryzor.  I apologize to everybody that downloaded version 1.0....

Question ... I have your Lazy Admin Menu installed, does this mod incorporate that or should I keep it installed while I have this one installed?
Each mod does something different, so they are compatible to have both installed on the same forum.  This mod directly alters the Admin menu, reorganizing it to make it less "messy" looking.  The Lazy Admin Menu pulls the Admin menu and rebuilds the top menu to reflect the current layout of the Admin menu....  I hope this answers your question.
« Last Edit: December 02, 2014, 07:26:57 PM by dougiefresh »

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Dougiefresh's Reorganized Admin Area
« Reply #14 on: December 02, 2014, 07:12:44 PM »
It does and thank you. :)
Online Manual

Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Dougiefresh's Reorganized Admin Area
« Reply #15 on: December 02, 2014, 07:23:25 PM »
@Steve: In case you're wondering, you can also run my SMF 2.1-style Admin Area mod to further alter your Admin menu.  There is no conflict between all three mods.  This mod is "aware" of the changes that my SMF 2.1-style Admin Area mod makes and will properly move the sections around without issue.....  However, that mod should be installed first, then this mod....

EDIT: Updated mod description to reflect the preferred mod install order.....

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Dougiefresh's Reorganized Admin Area
« Reply #16 on: December 02, 2014, 08:49:57 PM »
Cool ... will do that tomorrow when I've not had so much Christmas cheer. ;)
Online Manual

Please do not PM me for support.

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 783
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Dougiefresh's Reorganized Admin Area
« Reply #17 on: December 03, 2014, 02:51:18 AM »
Thanks, works flawlessly though again you have to click on the expand-like little arrows for the effect to appear :)

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,873
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Dougiefresh's Reorganized Admin Area
« Reply #18 on: December 03, 2014, 03:07:05 AM »
Great mod! Thank you for all of the work you have put into it.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Dougiefresh's Reorganized Admin Area
« Reply #19 on: December 03, 2014, 04:11:13 AM »
Hmm. I see it is using a hook; I wouldn't use a hook in this situation - at least not unless I was periodically checking that my hook was called *last*.
Just so you know, the initial release of the mod to the Customization Site didn't have a temporary hook.  It had a single edit to Sources/Admin.php in order to make sure the reorganization was performed last...  Customization Team wanted it as a hook in order to approve it.  Still don't understand why....  but whatever....  Not gonna stress over it!  :P