Ellsinore Posted October 14, 2020 Report Share Posted October 14, 2020 My dropdown menus (Find, Media, Info) contain numerous menu items that contain no content. I know at one time I was able to comment these out, but have upgraded (v.12) since that time and can't for the life of me find where to change this. Quote Link to comment Share on other sites More sharing options...
theKiwi Posted October 14, 2020 Report Share Posted October 14, 2020 It's all in genlib.php Roger Quote Link to comment Share on other sites More sharing options...
Ellsinore Posted October 14, 2020 Author Report Share Posted October 14, 2020 Thanks! Quote Link to comment Share on other sites More sharing options...
Philip Roy Posted October 14, 2020 Report Share Posted October 14, 2020 If you also want to remove some of these items from your footer of the main page, then you should look at the index.php file that is part of your template folder....so (for example) /templates/template18/index.php I'm not sure if it's the same for all templates, but it is for Template 18. Phil Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted October 14, 2020 Report Share Posted October 14, 2020 If you are going to make changes to genlib.php, I would recommend that you learn how to create private mods using the Mod Manager to make your changes. Reason being that genlib.php is changed in every TNG upgrade and it is a lot easier to uninstall mods, upgrade, and re-install the mods than to keep track of changes you make to TNG files and have to manually figure out how to make the change again. Quote Link to comment Share on other sites More sharing options...
Ellsinore Posted November 30, 2020 Author Report Share Posted November 30, 2020 On 10/14/2020 at 11:36 AM, theKiwi said: It's all in genlib.php Roger Hi, Roger I'm just now getting to this and have hit yet another snag, of course. The "Find" and "Info" menus are easy and self-explanatory -- and done. For the "Media" menu, however, which is the main one that needs fixing, instead of listing each media type (except for "Albums"), I see only "if(!$mediatype['disabled'])" at line 665 (v.12). If media types CAN be disabled, that would work great. Ideally, I'd rather just "Media" link to "All Media" rather than initiating the drop-down, but I'd be happy just commenting out the media types I don't have. I'm really on the fence about upgrading at this point. I sure don't want to have to go through this all over again. Thanks! Quote Link to comment Share on other sites More sharing options...
Ellsinore Posted November 30, 2020 Author Report Share Posted November 30, 2020 On 10/14/2020 at 5:43 PM, Ken Roy said: If you are going to make changes to genlib.php, I would recommend that you learn how to create private mods using the Mod Manager to make your changes. Reason being that genlib.php is changed in every TNG upgrade and it is a lot easier to uninstall mods, upgrade, and re-install the mods than to keep track of changes you make to TNG files and have to manually figure out how to make the change again. I completely agree with you, and a few years ago this is probably how I would do it. Unfortunately, I'm not as smart as I used to be and the mere thought is overwhelming at this stage. The code confuddles me. Quote Link to comment Share on other sites More sharing options...
Rob Roy Posted November 30, 2020 Report Share Posted November 30, 2020 Speaking of menus. At 73, not sure if I can remember how to tie my shoes, let alone modify PHP with Mod Manager. What I would love to see is a mod (there would probably need to be one for each template) that would allow you to remove some of the site menu options. Say Recordings, Videos, DNA Tests, etc. Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted November 30, 2020 Report Share Posted November 30, 2020 37 minutes ago, Ellsinore said: For the "Media" menu, however, which is the main one that needs fixing, instead of listing each media type (except for "Albums"), I see only "if(!$mediatype['disabled'])" at line 665 (v.12). If media types CAN be disabled, that would work great. To disable media menus that are not used on your site, go to Admin > Import/Export and click the Secondary Process tab. Then click the Trim Media Menus to remove the collections for which you have not media from your Media drop down menu Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted November 30, 2020 Report Share Posted November 30, 2020 Rob, If you run the Trim Media Menus from the Import/Export - Secondary Process tab as mention in the previous post, it might remove the Recordings and Video if not being used from your sidebar menu. I know it removes them from the Media pull down. There is an option in Admin > Setup > General Settings in the DNA Test section - Hide all DNA pages and data when set to NO should remove the entry from the public side of TNG. There is a mod that will remove it from the Admin menu Quote Link to comment Share on other sites More sharing options...
Ellsinore Posted November 30, 2020 Author Report Share Posted November 30, 2020 13 minutes ago, Rob Roy said: Speaking of menus. At 73, not sure if I can remember how to tie my shoes, let alone modify PHP with Mod Manager. What I would love to see is a mod (there would probably need to be one for each template) that would allow you to remove some of the site menu options. Say Recordings, Videos, DNA Tests, etc. Wow -- that menu has a lot of stuff on it! Is that the v.13? I'm definitely not wanting to try to mess with that! Quote Link to comment Share on other sites More sharing options...
Ellsinore Posted November 30, 2020 Author Report Share Posted November 30, 2020 13 minutes ago, Ken Roy said: To disable media menus that are not used on your site, go to Admin > Import/Export and click the Secondary Process tab. Then click the Trim Media Menus to remove the collections for which you have not media from your Media drop down menu That did the trick! Thank you! Quote Link to comment Share on other sites More sharing options...
Rob Roy Posted November 30, 2020 Report Share Posted November 30, 2020 Ken, thank you. Cleaned up a lot. Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted November 30, 2020 Report Share Posted November 30, 2020 This Mod is under development, but works wel. Actually the menus on the main page (depending of each template) are not (yet) modified The Mod is not yet documented. If you want to try it... Michel PS : to edit the parameters , go to Mod Manager, develop the mod (once installed) and use the green "Easy Edit" button instead the normal "Edit" button Note : prior to install, your file genlib.php must be without your own modifications. If there are modifications done => Bad targets This Mod is not compatible with the "Hide google buttons" Mod show_hide_menus_v13.0.1.1.zip Quote Link to comment Share on other sites More sharing options...
Rob Roy Posted December 1, 2020 Report Share Posted December 1, 2020 Michael. I do appreciate the offer, however, Ken's suggestions trimmed things down. I am at least 3 weeks away from getting glasses after eye surgery and am careful of my time on PCs. Eye strain is an issue. I do appreciate it. Quote Link to comment Share on other sites More sharing options...
Andreas Martinus Posted February 21, 2021 Report Share Posted February 21, 2021 On 11/30/2020 at 10:55 PM, Michel KIRSCH said: show_hide_menus_v13.0.1.1.zip This mod does not work in TNG 13.0.3. Kan niet installeren verwijderen Allows you to Show or Hide any sub-menu in Search, Media and Info menus Vous permet de Cacher ou Montrer chaque sous-menu des menus Chercher, Médias et Info flags: @ optioneel ^ (tijdelijk) moet beschikbaar zijn ~ protected lijn 15: %target:genlib.php% gecontroleerd lijn 18: %location:% #1 niet geïnstalleerd lijn 85: %location:% #2 Ongeldig doel lijn 127: %location:% #3 Ongeldig doel Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted February 22, 2021 Report Share Posted February 22, 2021 Hi Andreas, this Mod is not official and is not supported until it will be released as definitive Mod. The Mod works for TNG v13.0.3 (shows "ready to install" but certainly have a conflict with previous Mod you've installed. Try to install it first... Here is the actual version... Michel show_hide_menus_v13.0.1.beta2.zip Quote Link to comment Share on other sites More sharing options...
PapaTango Posted May 25, 2022 Report Share Posted May 25, 2022 Has there been an update for those of us running v13.1.2 and PHP v8.1.x? Otherwise, I need to eliminate the "Contact Us" tab. That function is handled in the WP front end. Any direction or suggestions sincerely appreciated... 😎 Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted May 25, 2022 Report Share Posted May 25, 2022 The latest version of the Menu manager mod works with TNG 13.1.2 and PHP8+ Quote Link to comment Share on other sites More sharing options...
PapaTango Posted May 25, 2022 Report Share Posted May 25, 2022 Thanks, Rob, it works like a treat! I was busily looking for something of the "show hide menus" labeling...🤔 If anyone else goes looking for this sort of solution, find it here: https://tng.lythgoes.net/wiki/index.php/Menu_manager Quote Link to comment Share on other sites More sharing options...
John Paul Posted September 6, 2023 Report Share Posted September 6, 2023 On 11/30/2020 at 8:12 AM, Ken Roy said: To disable media menus that are not used on your site, go to Admin > Import/Export and click the Secondary Process tab. Then click the Trim Media Menus to remove the collections for which you have not media from your Media drop down menu FYI: In TNG v14.02, it's in Admin -> Export >>Post-import Utilities >> Trim media menus. Looks like it trims the menu item(s) that have no media in them, like in my case it is Recordings and Videos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.