Jump to content
TNG Community

Removing Irrelevant Menu Items


Ellsinore

Recommended Posts

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.  

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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!  

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!  

Link to comment
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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...
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
Link to comment
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

Link to comment
Share on other sites

  • 1 year later...

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... 😎

Link to comment
Share on other sites

  • 1 year later...
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.

TrimMediaMenus.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...