Welcome to Geeklog Monday, August 10 2020 @ 05:12 am EDT

Geeklog Forums

what file is the top menu system located in?


LWBS

Anonymous
what file is the top menu system located in?


Contribute : Web Resources : Calendar : Advanced Search : Support : Themes : Downloads : Forum


I want to change some of the links manually...
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany

LWBS

Anonymous
that link is too complex for my little brain

where is the actual file where the links are typed?

that is, where are the words "Contribute : Web Resources : Calendar : Advanced Search : Support : Themes : Downloads : Forum" actually typed? which file and what is the path to that file??

thanks in advance.. I am new to GL
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
the very first line of the faq entry Dirk pointed you to reveals the answer: in the header.thtml a variable is replaced (when the page is built) by a list of links. That list is created dynamically according to your settings in config.php (except the downloads and forum links), which the faq also points out.

So, the links aren't actually typed anywhere, unless you are only looking to change the text of those links, in which case you are looking for the language file, e.g., english.php.
 Quote

LWBS

Anonymous
I really appreciate your help with this gentlemen, but I just don't get it...


In header.thtml I have this line on line 51:

{allowed_menu_elements}{plg_menu_elements}

I want to get rid of the menu items I have showing like: "Web Resources, Calendar and Past Polls".. how would I get rid of these from my menu up top?????

I just dont understand what to do from the FAQ... I think I need an even more basic answer than the FAQ
 Quote

LWBS

Anonymous
Quote by machinari: ...That list is created dynamically according to your settings in config.php ....


what is the path to the config.php file you are referring to?

what is the line number in config.php where the list is dynamically created?


I cant seem to find it...
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
once you find your config.php, look for this:
PHP Formatted Code
// List of entries that you want to see in the site's menu bar (if you're using
// a theme that uses the {menu_elements} variable in its header.thtml).
// Choose any combination of the following (order here = order in the menu).
$_CONF['menu_elements'] = array
(
    'home',      // link to homepage
    'contribute',   // contribute / "submit a story" link
    'links',        // link to the links section (aka web resources)
    'polls',        // link to past polls
    'calendar',     // link to the site calendar
    'search',       // link to advanced search
    'stats',        // link to site stats
    'prefs'     // link to user's preferences
    //'plugins'       // links added by plugins, like {plg_menu_elements}
    // 'custom'     // for custom links (see lib-custom.php)
);

 

As for what the path is to config.php, that depends on your installation... Perhaps whoever installed Geeklog for you could tell you. If you used fantastico or something like that, perhaps you could ask your webhost.

hope that helps
 Quote

LWBS

Anonymous
well, there is the problem... I do not have anything that resembles that in my config.php file.

I even did a "search" in my config.php for some of the words in that block of code that you pasted and nothing shows up...

I must be looking in the wrong config.php file... the one I am looking in is at the parent install of my Geeklog.

It is one directory level higher than the following Geeklog directories: admin, images, layout, plugin, staticpages.

Is this the right config.php file? or is there another one that is buried in one of the directories?
 Quote

LWBS

Anonymous
by the way, I am using GL version 1.3.9sr2
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWBS: well, there is the problem... I do not have anything that resembles that in my config.php file.

Which version of Geeklog are you on?

The bit that Machinari quoted was only introduced in 1.3.10, IIRC. In earlier versions, the menu entries were hard-coded in lib-common.php.

bye, Dirk
 Quote

LWBS

Anonymous
So I guess the problem was I was using an older version..

I am in lib-common.php now and I have commented out some of the menu items like Site Statistics and Past Polls.

There is are a few Plugin menu items that I also want to get rid of... I believe it is referenced from this line:

line 925: $plugin_menu = PLG_getMenuItems();

what file do I find the plugin menu items in???
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
any plugin that encorporates a menu item in the header usually will be using a function called plugin_getmenuitems_pluginName() where pluginName is the name of the relevant plugin.
You can find this function in that plugin's functions.inc file located path/to/geekog/plugins/pluginName/functions.inc.

once you find the function, just comment it out.
 Quote

LWBS

Anonymous
no, it isn't in functions.inc either

I give up.. I can't find where this menu item is located!!!!

take a look at my website:
http://medsim.net/

The menu item "ASSET Simulation" .. I need to get rid of it.. but I can't find out which file it is located in.

I did a "search" for the word "asset" in the following files:
config.php
lib-common.php
functions.inc (plugin directory)
header.thtml

no luck.. can't find it!!!

where else could it be hiding?

I am using GL version 1.3.9sr2
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
I don't see that "asset" menu item anywhere on your site.

an example of a plugin's menu item being in it's functions.inc file is the forum... you can find the function plugin_getmenuitems_forum() in path/to/geeklog/plugins/forum/.
 Quote

LWBS

Anonymous
it gets even weirder

only when I log into my site with my account does "ASSET Simulation" appear across the top menu.

When I log out it is no longer there... does that give a clue as to where thelink could be hiding among the many lines of GL code?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
Is it a static page? if so, you can disable the menu item from the staticpage editor...
 Quote

LWBS

Anonymous
Quote by machinari: Is it a static page? if so, you can disable the menu item from the staticpage editor...


You are a GENIUS!!!

thank you, thank you, thank you!!!!!!
 Quote

All times are EDT. The time is now 05:12 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content