Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 10:28 am EDT

Geeklog Forums

file to edit menu elements in header?


Status: offline

jastanle84

Forum User
Chatty
Registered: 12/17/06
Posts: 36
working
can someone tell me which file or how I edit the position of menu elements in the header? I have disabled some menu links but i need to rearrange a static page menu, About Us, to be the first element, and I need to rename the Media Gallery menu element to Gallery Viewer. I tried to configure these changes in config.php to no avail. any suggestions?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Unfortunately, there is no way yet to order the plugin entries. There's an option to sort static pages menu entries, but there's no way to tell whether the static pages entries should come before or after, say, MediaGallery.

You could try sorting the entries of the gl_plugins table directly in the database. Or you would have to hard-code the links in the order you want.

bye, Dirk
 Quote

Status: offline

jastanle84

Forum User
Chatty
Registered: 12/17/06
Posts: 36
I see how the plugins are arranged in the gl_plugins database and right now static pages will always come before calendar, links, and media gallery. But, contribute, advanced search, and directory are before static pages. is there a way to hard code so static pages come before contribute, advanced search, and directory?
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
No, all the plugins have to be together. Look in your config.php for this:
Text Formatted Code
$_CONF['menu_elements'] = array
(
    // 'home',      // link to homepage
    'contribute',   // contribute / "submit a story" link
    'search',       // link to advanced search
    'stats',        // link to site stats
    'directory',    // link to list of past stories
    // 'prefs',     // link to user's preferences
    'plugins'       // links added by plugins, like {plg_menu_elements}
    // 'custom'     // for custom links (see lib-custom.php)
);
You could move search and contribute after plugins, but not sandwich them between various plugins
 Quote

Status: offline

jastanle84

Forum User
Chatty
Registered: 12/17/06
Posts: 36
i am going to move plugins before contribute, this should fix the display a little bit. can i rename Media Gallery?
 Quote

harooki2

Anonymous
Sorry but from reading this, I still don't understand. Can you delete certain menu items? How can I change "Contribute" to "Submit a Story"?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
:rtfm: How do I change the menu?
 Quote

harooki2

Anonymous
I know how much patience it must take for accomplished programmers like yourself to put up with a newbie like me. Pardon my ignorance, but I assume this is the part of the .php file to which you are referring.

$_CONF['menu_elements'] = array
(
// 'home', // link to homepage
'contribute', // contribute / "submit a story" link
'search', // link to advanced search
'stats', // link to site stats
'directory', // link to list of past stories
// 'prefs', // link to user's preferences
'plugins' // links added by plugins, like {plg_menu_elements}
// 'custom' //

I have tried to make my change by changing 'contribute' above to 'Submit a Story'. All that accomplishes is to remove the menu item altogether. That doesn't work for me. However, I do want to remove Site Statistics and Links. In the meantime, can you elaborate on your instructions for making this change?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If you want to disable a menu entry, remove it from that list (or comment it out). That works for the "stats" entry, for example.

Keep in mind that all entries provided by plugins are represented by the one "plugins" entry. Check the plugin's configuation file for ways to disable a specific plugin's menu entry.

If you want to change the text of an entry, please see the FAQ article again. There's a link there ...

bye, Dirk
 Quote

Josh

Anonymous
Hi. I have the same problem as harooki2. I wanted to change the Contribute element in the top menu item to Submit a Story or something similar and when I uncomment Contribute (place those 2 slashes in front of it, then it changes color) in the config.php file line 204 $_CONF['menu_elements'] = array and upload the changes to my config.php file, the word Contribute dissapears from the menu. I looked in the header.thtml file but afraid to mess with the stuff there for I have no knowledge of html and don't want to make things worse by adding words there and then find myself in a bigger ordeal.

I already looked at the info in the explanation link provided but that is not taking me anywhere. Is there any suggestion you can make so I can change the word Contribute for another. New users might think the word is related to money contributions as I was told twice today instead of a story contribution and don't even get to click that link when in fact that could add to the site's content. Your help is appreciated.
 Quote

Josh

Anonymous
Hi. I have the same problem as harooki2. I wanted to change the Contribute element in the top menu item to Submit a Story or something similar and when I uncomment Contribute (place those 2 slashes in front of it, then it changes color) in the config.php file line 204 $_CONF['menu_elements'] = array and upload the changes to my config.php file, the word Contribute dissapears from the menu. I looked in the header.thtml file but afraid to mess with the stuff there for I have no knowledge of html and don't want to make things worse by adding words there and then find myself in a bigger ordeal.

I already looked at the info in the explanation link provided but that is not taking me anywhere. Is there any suggestion you can make so I can change the word Contribute for another. New users might think the word is related to money contributions as I was told twice today instead of a story contribution and don't even get to click that link when in fact that could add to the site's content. Your help is appreciated.
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Quote by: Josh

Hi. I have the same problem as harooki2. I wanted to change the Contribute element in the top menu item to Submit a Story or something similar and when I uncomment Contribute (place those 2 slashes in front of it, then it changes color) in the config.php file line 204 $_CONF['menu_elements'] = array and upload the changes to my config.php file, the word Contribute dissapears from the menu. I looked in the header.thtml file but afraid to mess with the stuff there for I have no knowledge of html and don't want to make things worse by adding words there and then find myself in a bigger ordeal.

Adding two slashes adds a comment. That's why it disappears. You want to modify the languages/english.php file. The text 'Contribute' is found in the $LANG01 array at index 71. Change:

Text Formatted Code
    71 => 'Contribute',

to

    71 => 'Submit a Story',
 
 Quote

Josh

Anonymous
Thanks jmucchiello. That solved the problem. By any chance you happen to know which file controls the font size of the menu letters?. I went to style.css and found plenty options, but none dealing with the menu letters size/color. My goal was to use buttons and include the same words that appear on the menu in those buttons (except the already changed Contribute menu element). Any ideas?
 Quote

All times are EDT. The time is now 10:28 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