Welcome to Geeklog Monday, November 20 2017 @ 12:44 am EST


Status: offline

adelaidebear

Forum User
Newbie
Registered: 17/08/2007
Posts: 1
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.

Status: offline

Dirk

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

Vin

Anonymous
excited
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.



Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
Quote by: Vin

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

Status: offline

BobWeber

Forum User
Newbie
Registered: 28/01/2009
Posts: 4
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'Wink;

// 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'Wink;
}

return $myentries;
}


Thanks much,
~Bob

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
Hi,

You might try the menu plugin. It offers exactly what you want to do.

Ben
I'm available to customise your themes or plugins for your Geeklog CMS

All times are EST. The time is now 12:44 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