News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Better Profile Menu (SMF 2.0.x Only)

Started by dougiefresh, July 30, 2014, 12:00:51 PM

Previous topic - Next topic

dougiefresh

Link to Mod



BETTER PROFILE MENU v2.8
By Dougiefresh -> Link to Mod



Introduction
This mod alters the main menu's Profile menu to bring all the functionality of the profile area to the main forum's menu bar.

This mod was inspired by tip provided by snow in Lazy Admin Menu in order to make it easier for the admin to navigate straight to where they want to go.

The only difference is that this mod built dynamically, so that any changes to the profile menu are shown immediately.

Security Issue Notice
If you are running either VERSION 2.0 or VERSION 2.1, you are STRONGLY URGED to stop using the mod immediately and upgrade to the latest version, which addresses a MAJOR SECURITY ISSUE that has been resolved.  All version 1.x and version 2.2+ mods are not affected by this security issue!

User Settings
Under Profile => Modify Profile => Look and Layout, there is a new option:
o Better Profiles Menu setting

Each user can set it to one of the following:
o Completely Disabled => Exactly like this mod isn't installed :p
o Enabled => Exactly like this mod before version 2.4.
o Enabled with NoClick => Like Enabled, but clicking profile menu item only opens dropdown.

Translators
o Spanish Latin: Rock Lee

Compatibility Notes
This mod was tested on SMF 2.0.12, but should work on any version of SMF 2.0.x.  SMF 1.x and SMF 2.1 is not and will not be supported.

Evidentally, there was an error in the SMF 2.0.11 to 2.0.12 that prevents the forum from properly caching serialized stuff longer than 4096 bytes long.  This update fixes this problem, if it is present in your forum.

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

License
Copyright (c) 2016, 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.

Steve

Awesome dude. Thanks for this. :)
DO NOT pm me for support!

Arantor

Glad that my work on 2.1 inspired something good :)

I'd suggest backporting what 2.1 actually does but that would be hell for theme support.

kat

Ask and thou shalt receive, eh?

Canine's gonads. :)

Steve

Apparently this mod and SMFPacks Shoutbox don't play nice together. Each time the shoutbox refreshes a bunch of errors are generated.
DO NOT pm me for support!

Hj Ahmad Rasyid Hj Ismail

Care to share the error(s) so that they can be looked into?

Steve

Um, I'm not sure how to screenshot the errors without my board url and my IP showing. I'm willing to pm the screenshot to staff or the author if that would help.
DO NOT pm me for support!

Arantor

Copy/paste would work too, then you can edit it out before posting.

Steve

Does this help? These errors just repeat over and over each time the shoutbox refreshes.

DO NOT pm me for support!

Arantor

That seems like a bug in this mod because it probably should avoid running when $_GET['xml'] is defined.

dougiefresh

Uploaded v1.1 - August 1st, 2014
o Fixed errors generated by not having the Profiles language file loaded.

Thank you for the bug report, Steve!

Quote from: ‽ on August 01, 2014, 02:05:16 PM
That seems like a bug in this mod because it probably should avoid running when $_GET['xml'] is defined.
This mod makes direct modifications to the Subs.php file in order to affect the Profiles menu changes.

Steve

You betcha. :D

Edit: just installed it and it works a treat. :D
DO NOT pm me for support!

Arantor

Hrm, I am not a fan of additional performance hit. :(

I'd use integrate_pre_include to add the file, the integrate_menu_buttons hook to run, and only do anything if !isset($_GET['xml']) to limit the workload.

Steve

#13
There's still a problem. With this installed, then going into board view or whatever the view is called that list the topics you'll see this for the last post times:





Grammatical error edit.
DO NOT pm me for support!

Arantor

Need to preserve $txt['time_format'] before loading Profile.<language>.php.

dougiefresh

v1.2 - August 2nd, 2014
o Rewrote mod so that menu replacement takes place in Subs-BetterProfileMenu.php....
o Added in code to preserve the original language text during the hook call...

Steve

Cool beans. That fixed the timestamp issue and seems to be working hunky-dory. :)
DO NOT pm me for support!

Steve

Then again ...

If I hover over 'Profile' and go down to 'Look and Layout' and click it, I get these two errors without even doing anything:



I don't know why it says anything about wysiwyg since I have it disabled ...
DO NOT pm me for support!

Arantor

That would appear to be the WYSIWYG Quick Reply mod since those are not present in a default installation.

Steve

You're probably right since I do have that mod installed. There are errors when I wanted to uninstall it so I'll have to do that manually which won't be tonight. :P
DO NOT pm me for support!

Advertisement: