Posted on: 08/17/07 10:48am
By: adelaidebear
I am completely new to the Geeklog system,and generally a bit of a novice on computers compared to most on here i would think.
My question is : How do i do away with some of the links in the main menu bar and add some of my own.
For example , i run a soccer based prediction League and want to link it to my menu bar, and a few other things aswell.
Can this be done relatively easily ?
Can i do it from the admin area ? and if so how do i go about it
Any help would be greatfully appreciated.
Re: Menu bar advice
Posted on: 08/17/07 01:46pm
By: Dirk
Re: Menu bar advice
Posted on: 12/12/07 08:45pm
By: Anonymous (Vin)
Could'nt find this answer in the forum, but figured it out.
Let's say you want to add a link to maybe a static page on your site, or an external site
to the menu bar.
1. Static Pages - Create New
2. Give it a title, and Label the link
3. Add this to Content:
<script type="text/javascript">
<!--
window.location = "http://whatever.php"
//-->
</script>
4. I unchecked In a Block, but don't know if that makes any difference.
5. Click Save, and you're done.
Re: Menu bar advice
Posted on: 12/14/07 03:54pm
By: Dirk
Quote by: Vin3. Add this to Content:
<script type="text/javascript">
<!--
window.location = "http://whatever.php"
//-->
</script>
Of course this won't work if the visitor has JavaScript disabled. I'd suggest modifying the function CUSTOM_menuEntries in system/lib-custom.php instead (note that it's commented out by default).
bye, Dirk
Re: Menu bar advice
Posted on: 09/01/14 03:03pm
By: BobWeber
Hey Dirk,
php amateur here. Looking for instructions directed to same. I found the aforementioned location in the lib-custom.php file regarding adding custom menu entries but my understanding of the code precludes implementation. Running Geeklog 2.1.0 and wish to move my admin menu from a sidebar block to the main menu. Guessing this is an easy answer for you?
Here's the code so you don't have to look it up:
function CUSTOM_menuEntries ()
{
global $_CONF, $_USER;
$myentries = array ();
// Sample link #1: Link to Gallery
$myentries[] = array ('url' => $_CONF['site_url'] . '/gallery/',
'label' => 'Gallery'

;
// Sample link #2: Link to the Personal Calendar - only visible for
// logged-in users
if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) {
$myentries[] = array ('url' => $_CONF['site_url']
. '/calendar/index.php?mode=personal',
'label' => 'My Calendar'

;
}
return $myentries;
}
Thanks much,
~Bob
Re: Menu bar advice
Posted on: 09/02/14 12:59pm
By: ::Ben
Hi,
You might try the
menu plugin. It offers exactly what you want to do.
Ben