Advertisement:

Author Topic: Better Profile Menu (SMF 2.0.x Only)  (Read 36003 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Better Profile Menu (SMF 2.0.x Only)
« on: July 30, 2014, 12:00:51 PM »
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.
« Last Edit: January 16, 2015, 07:36:01 PM by dougiefresh »

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #1 on: July 30, 2014, 08:22:51 PM »
Awesome dude. Thanks for this. :)
Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,605
    • StoryBB/StoryBB on GitHub
Re: Better Profile Menu
« Reply #2 on: July 30, 2014, 08:25:42 PM »
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.
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.

kat

  • Guest
Re: Better Profile Menu
« Reply #3 on: July 31, 2014, 06:36:10 AM »
Ask and thou shalt receive, eh?

Canine's gonads. :)

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #4 on: July 31, 2014, 02:37:26 PM »
Apparently this mod and SMFPacks Shoutbox don't play nice together. Each time the shoutbox refreshes a bunch of errors are generated.
Online Manual

Please do not PM me for support.

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: Better Profile Menu
« Reply #5 on: August 01, 2014, 01:06:47 AM »
Care to share the error(s) so that they can be looked into?

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #6 on: August 01, 2014, 10:28:38 AM »
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.
Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,605
    • StoryBB/StoryBB on GitHub
Re: Better Profile Menu
« Reply #7 on: August 01, 2014, 10:35:24 AM »
Copy/paste would work too, then you can edit it out before posting.
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 Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #8 on: August 01, 2014, 12:00:56 PM »
Does this help? These errors just repeat over and over each time the shoutbox refreshes.

Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,605
    • StoryBB/StoryBB on GitHub
Re: Better Profile Menu
« Reply #9 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.
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 dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Better Profile Menu
« Reply #10 on: August 01, 2014, 03:56:45 PM »
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!

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.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #11 on: August 01, 2014, 03:57:53 PM »
You betcha. :D

Edit: just installed it and it works a treat. :D
Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,605
    • StoryBB/StoryBB on GitHub
Re: Better Profile Menu
« Reply #12 on: August 01, 2014, 04:00:50 PM »
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.
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 Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #13 on: August 01, 2014, 04:41:00 PM »
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.
« Last Edit: August 01, 2014, 07:22:35 PM by Steve »
Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,605
    • StoryBB/StoryBB on GitHub
Re: Better Profile Menu
« Reply #14 on: August 01, 2014, 04:43:14 PM »
Need to preserve $txt['time_format'] before loading Profile.<language>.php.
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 dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Better Profile Menu
« Reply #15 on: August 02, 2014, 07:16:28 PM »
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...

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #16 on: August 02, 2014, 07:34:18 PM »
Cool beans. That fixed the timestamp issue and seems to be working hunky-dory. :)
Online Manual

Please do not PM me for support.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #17 on: August 02, 2014, 07:47:33 PM »
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 ...
Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,605
    • StoryBB/StoryBB on GitHub
Re: Better Profile Menu
« Reply #18 on: August 02, 2014, 07:52:46 PM »
That would appear to be the WYSIWYG Quick Reply mod since those are not present in a default installation.
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 Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Better Profile Menu
« Reply #19 on: August 02, 2014, 08:07:59 PM »
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
Online Manual

Please do not PM me for support.