Jump to content
TNG Community
Ellsinore

Removing Irrelevant Menu Items

Recommended Posts

Ellsinore

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.  

Share this post


Link to post
Share on other sites
theKiwi

It's all in genlib.php

Roger

Share this post


Link to post
Share on other sites
Philip Roy

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

Share this post


Link to post
Share on other sites
Ken Roy

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.

Share this post


Link to post
Share on other sites
Ellsinore
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. :-D  

Thanks!  

Share this post


Link to post
Share on other sites
Ellsinore
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.  :-D

Share this post


Link to post
Share on other sites
Rob Roy

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.

image.png

Share this post


Link to post
Share on other sites
Ken Roy
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

Share this post


Link to post
Share on other sites
Ken Roy

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

Share this post


Link to post
Share on other sites
Ellsinore
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.

image.png

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!  :-D

Share this post


Link to post
Share on other sites
Ellsinore
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!  

Share this post


Link to post
Share on other sites
Rob Roy

Ken, thank you.  Cleaned up a lot. 

Share this post


Link to post
Share on other sites
Michel KIRSCH

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

Share this post


Link to post
Share on other sites
Rob Roy

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.

Share this post


Link to post
Share on other sites
Andreas Martinus
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

     
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

Share this post


Link to post
Share on other sites
Michel KIRSCH

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×