Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2650)
This mod will add options to remove or display the buttons of your choice
The current buttons supported are as follows
Home
Help
Search
Profile
Personal Messages
Calendar
Version 0.4.
Fixed the other buttons, they had the same errors as the home button
nobody probably noticed since the buttons were not their to click
if a member stumbles on an action where you have disabled the button
for that action, it will not attempt to select that button as its
disabled.
Added a lot more default to home actions, this mod should be completely
bug free now.
Version 0.3
The Home button bug is fixed, no more errors when disabling the home button.
I didn't add Admin or Moderate for obvious reasons.
I have not added any support for portals.
Congratulations, John. It looks great! :)
Wow, this was approved without any warnings from the Customization team, that's a 1st :)
Your welcome, Enjoy :)
Looks good John. Weldone. I needed something like this but i had to remove buttons manually all the time.
This will be helpful when RC4 Comes out.
How would you suggest rtemoving the tniy portal button from the main menu?
check the Sources/subs.php file for the related code.
if you remove a button... can you add it back?
say if somone removes the wrong button by mistake... if you know what i mean
Quote from: tRu3_sKiTz0 on July 24, 2010, 09:46:58 AM
How would you suggest rtemoving the tniy portal button from the main menu?
I will be updating the mod with different versions, they will be called "portal" versions, those versions will have the additional options for adding or removing the portal created buttons.
Quote from: SN on July 24, 2010, 10:47:56 AM
if you remove a button... can you add it back?
say if somone removes the wrong button by mistake... if you know what i mean
Yes, you can add or remove buttons as you please, just check to disable, un-check will bring it back
Bug found;
When removing the "Home" button, all default current actions result in an empty button on the right side at the end, I'm working on a fix for this at the moment, for now, just leave your home buttons on.
Keep up the good work! I can't wait till the remove all portal buttons!
I'm still waiting for portal support requests, I cant just guess which portal you use lol :)
However, I think I will start a Simple Portal supported version 1st, depends on the demand
Well tiny portal is the one that has a button in the main menu and I would loev to get rid of that. I only keep TP installed because it kind hods my forum together in a nice way but I dont use it so I wanna lose the button for it.
Quote from: tRu3_sKiTz0 on July 24, 2010, 11:37:12 PM
Well tiny portal is the one that has a button in the main menu and I would loev to get rid of that. I only keep TP installed because it kind hods my forum together in a nice way but I dont use it so I wanna lose the button for it.
Added to the to do list then :)
Tiny portal would be the one i would want too :P
Why? It's easier to comment out with // in the Subs.php or you can do this:
'show' => true, $context['allow_view_contact'],
To:
'show' => false, $context['allow_view_contact'],
Just replace true to false to hide the menu, if true is not there then add false.
Quote from: Delita on July 25, 2010, 05:01:20 AM
Why? It's easier to comment out with // in the Subs.php or you can do this:
'show' => true, $context['allow_view_contact'],
To:
'show' => false, $context['allow_view_contact'],
Just replace true to false to hide the menu, if true is not there then add false.
You cannot use false, you replace
true,
with
'',
That's not what I heard...
Quote from: ♪ JohnCcCcCc ♫ on July 25, 2010, 01:06:02 PM
You cannot use false, you replace
true,
with
'',
have you tried using false yet ?
Quote from: Joker™ on July 25, 2010, 01:46:31 PM
Quote from: ♪ JohnCcCcCc ♫ on July 25, 2010, 01:06:02 PM
You cannot use false, you replace
true,
with
'',
have you tried using false yet ?
How do you think I discovered it lol, I naturally assumed false would be it, seems if you add anything their it shows the button.
I discovered this while making this mod.
http://www.simplemachines.org/community/index.php?topic=392282.msg2717067#msg2717067 (http://www.simplemachines.org/community/index.php?topic=392282.msg2717067#msg2717067)
i think you got it sorted :P
Yea damn XAMPP messing me up lol, I will clean up the code later, fortunately the mod still actually works, I will add the new version right now, its not a big mess, if your currently using the mod, just give it a few minutes then check back at the mod site.
John, I like this mod but it conflicts with Simple Portal when installing with regards to the 'home' menu. I have a thought to improve it in order for it to work even if Simple Portal mod is installed (I believe it doesn't conflict with other mod with regards to this home menu line) since it changed the home menu code in Subs.php.
Why not change instead of find this:
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
to find this:
$scripturl,
'show' => true,
'sub_buttons' => array(
),
And from changing it to this:
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => empty($modSettings['addremovetab_home']) ? true : false,
'sub_buttons' => array(
),
to changing it to this:
$scripturl,
'show' => empty($modSettings['addremovetab_home']) ? true : false,
'sub_buttons' => array(
),
It simplifies the code but I think it should work. Just a thought that it may useful for the betterment of this mod. :D
I will be releasing other versions as soon as I get more demand and time for testing to do so.
Add or Remove buttons (no portal)
Add or Remove buttons (Simple Portal)
Add or Remove buttons (Tinyportal)
Add or Remove buttons (other portals)
I have to keep (find) code big, we never know who will change or add a buttons in their somewhere, where the link is $scripturl too (I don't know why they would, but some people do these things) lol
Once I get all my testing forums side by side, I will come up with a Universal Version which will work on all, If possible.
you should make it update, like when i install ismple portal it adds it in
Quote from: JohnCcCcCc on July 24, 2010, 04:25:41 PM
Bug found;
When removing the "Home" button, all default current actions result in an empty button on the right side at the end, I'm working on a fix for this at the moment, for now, just leave your home buttons on.
I was going to post this "bug" but saw that you already found it. So instead I'm posting in here so I can be notified when an update is released.
*patiently waiting* ;D
Quote from: lowburb on August 08, 2010, 12:09:18 AM
Quote from: JohnCcCcCc on July 24, 2010, 04:25:41 PM
Bug found;
When removing the "Home" button, all default current actions result in an empty button on the right side at the end, I'm working on a fix for this at the moment, for now, just leave your home buttons on.
I was going to post this "bug" but saw that you already found it. So instead I'm posting in here so I can be notified when an update is released.
*patiently waiting* ;D
The mod is still completely usable, just don't use the home button remove :), even if you do use the home button remove, it throws a few errors but nothing serious and forum changing :)
It just so happens that I was looking to remove the Home button hence the "patiently waiting" LOL
Do you have any plans on figuring that out?
Quote from: lowburb on August 08, 2010, 12:31:51 AM
It just so happens that I was looking to remove the Home button hence the "patiently waiting" LOL
Do you have any plans on figuring that out?
Its actually more complicated that it seems, even the customization team missed it when approving this mod, it happens because of the $current_action array, everything defaults to home that does not have an current action set, so when you use these actions which default to the home button and the home button does not exist, well then it causes that error.
I have one solution, not very ethical though, we can just disable the current action array completely, but then the buttons will not be selected, however, you will have no errors in your log then.
As for a completely working solution, none yet, still working on that...
Version 0.3 Released
Version 0.3
The Home button bug is fixed, no more errors when disabling the home button.
Version 0.4 Released
Changelog;
Version 0.4
Fixed the other buttons, they had the same errors as the home button
nobody probably noticed since the buttons were not their to click
if a member stumbles on an action where you have disabled the button
for that action, it will not attempt to select that button as its
disabled.
Added a lot more default to home actions, this mod should be completely
bug free now.
I'm getting compatibily errors when I use this mod with the Sitemap (http://custom.simplemachines.org/mods/index.php?mod=755) mod. If I hide menu buttons, and then open the sitemap link on my board, error messages show up in my error log, pointing to the template_menu() function on index.template.php, these lines to be exact:
<a class="', $button['active_button'] ? 'active ' : '', '" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
', $button['title'], '
</a>';
The error messages are: 8: Undefined index: title, and 8: Undefined index: href. Any ideas?
I have never seen that in testing, I will set up a test forum using this mod and the Sitemap mod too and see if I can track it down.
Quote from: JohnCcCcCc on September 05, 2010, 07:27:25 PM
I have never seen that in testing, I will set up a test forum using this mod and the Sitemap mod too and see if I can track it down.
I have fixed the Sitemap issue by editing Subs.php and adding 'sitemap' to this part of your mod:
// Custom actions after this line - In quotes with a comma between - | , 'mycustomaction1', 'mycustomaction2' |
I implemented that part of the code just for situations like this, its actually designed for additional actions that default to home created by mods, so if the sitemap mod has an additional action that defaults to home when its page is active, that should fix the issue.
Have all your errors gone now?
Actually I had some more errors with other actions, but I solved them in the same way. No more errors (for now ;))
Quote from: Vandaahl on September 06, 2010, 04:05:09 PM
Actually I had some more errors with other actions, but I solved them in the same way. No more errors (for now ;))
I'm glad that the new implementation I added has made it easy to solve errors :)
Enjoy the mod :)
Have an issue that popped up and I'm not finding a solution so far.
Because of all the testing that happens on my site it sometimes needs to be reloaded with fresh copies of the SMF files and that process was started yesterday.
Add Remove Buttons v02 was working OK before the files reload, but after the reload v04 was installed. Because of some 'test failed' errors the mod was manually installed and now works as expected except for one issue... When the link for 'My Messages' is turned off the message count indicator remains and is moved to the end of the line of links/buttons.
I've tried any number of fixes that can be found here on SMF for commenting out links ..etc, but so far nothing helps.
Any tips would be greatly appreciated. :)
This happens only when this mod is installed?
That's very odd since my mod only changes the true/false factor ???
Yes, it only happens when the message button is turned off in the cp for ARB.
This error is showing it the logs:
Quote8: Undefined index: addremovetab_settings_menu (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.ourfamilyforum.org%2FFamilyForum%2FThemes%2Fpandora20rc3%2Fimages%2Ffilter.gif&hash=90d9e022295e59a81a2c6bffa9ca7ce0f75609b7) (http://www.ourfamilyforum.org/FamilyForum/index.php?action=admin;area=logs;sa=errorlog;desc;filter=file;value=L2hvbWUva2Vua2F5am0vcHVibGljX2h0bWwvRmFtaWx5Rm9ydW0vU291cmNlcy9BZG1pbi5waHA=) File: ../Sources/Admin.php
Line: 246
Have you checked to make sure modifications.english.php has the edit
$txt['addremovetab_settings_menu'] = 'Add or Remove buttons';
Something like the above
It has that and includes the line for the PM's of course.
$txt['addremovetab_pm'] = 'Check here to disable the Personal Message\'s Button';
The command in the ARB cp for turning the button on or off works OK, it just leaves the message count indicator.
BTW... The counter has no link so it defaults to whatever page you are on when the count indicator is clicked.
Hey guys i recentely have downloaded the latest version of this mod "Add or Remove Buttons" http://custom.simplemachines.org/mods/index.php?mod=2650 my smf version is SMF 2.0 RC3 and i am using the theme darkbreak. So my problem is everything work's correctly except the "remove memberlist" i have the teampage mod so there is no need for the member list tab to be there so i selected it to be removed and it still wont go away.
bump
Attach your Subs.php file from /Sources.
does this work with rc3 emulated when im using rc4?
where do u find this when installed?
Quote from: eyo on December 04, 2010, 01:11:11 AM
where do u find this when installed?
If you had looked at the MOD Preview you would have seen at the top of the screen it says
Admin -> Configuration -> Forum -> Members -> Maintenance
Although that does seem odd, may be a SMF ver 1.x thing
Regards,
Siirist
Failed to install on version 2.11
Quote from: Kosuki on April 14, 2016, 07:05:16 PM
Failed to install on version 2.11
http://wiki.simplemachines.org/smf/Installation_-_How_do_I_install_a_modification (http://wiki.simplemachines.org/smf/Installation_-_How_do_I_install_a_modification)
http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn't_work_in_my_SMF_version
Siirist
I'm trying to uninstall a mod called "Add And Remove Buttons" version 0.4, and think it's this one even though this one is called "Add or Remove Buttons" ("And" versus "or"). I had an uninstallation failure. Screenshots attached.
http://wiki.simplemachines.org/smf/Error_in_mod_installation