Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: James Gryphon on October 26, 2016, 05:02:14 AM

Title: Troubleshooting New Menu Tab
Post by: James Gryphon on October 26, 2016, 05:02:14 AM
After creating a new SMF 2.0.12 forum some time ago, I installed Dragooon's Mentions mod (http://custom.simplemachines.org/mods/index.php?mod=3860) and applied the hack described here (http://www.simplemachines.org/community/index.php?topic=522005.msg3872249#msg3872249) to get the Mentions button in the menu bar.

I just noticed not too long ago, though, that the Mentions button doesn't light up when you're at that page; instead, the Profile button does. It seemed like I was able to fix this on a SMF 2.0.11 forum some time ago, but I don't remember what I did, or if anything's changed in .12 that would mess my fix up.

I wondered if it had to do with "Mentions" being an area that's listed under the Profile action, and if creating a new action would help, but I don't have the foggiest where to start doing that, if that is the trouble.

I've burned a few hours at this and haven't gotten anywhere, so I figured that it was worth asking about it here. Thanks in advance for any help y'all can provide.
Title: Re: Troubleshooting New Menu Tab
Post by: Dzonny on October 26, 2016, 07:39:02 AM
Hello there,

As this is related to the mod customization itself, it may be the best to post your question in the support topic for that specific mod in order to get best help.
Title: Re: Troubleshooting New Menu Tab
Post by: James Gryphon on October 26, 2016, 05:26:24 PM
I'm not sure that the mod details are more than incidental to the problem, but if you feel that's best, I suppose I can try that.
Title: Re: Troubleshooting New Menu Tab
Post by: GL700Wing on October 28, 2016, 11:54:44 PM
I had the same problem and it occurs because the Mentions mod installs a line of code too high up in an array in both Sources/Admin.php and Sources/ManageSettings.php.

Search for the word mentions in Sources/Admin.php and move the 'mentions' line to after the 'general' line as follows:
                        'general' => array($txt['mods_cat_modifications_misc']),
                        'mentions' => array($txt['mentions']),


Search for the word mentions in Sources/ManageSettings.php and move the 'mentions' line to after the 'general' line as follows:
        'general' => 'ModifyGeneralModSettings',
        'mentions' => 'ModifyMentionsSettings',