Welcome to Geeklog, Anonymous Tuesday, May 07 2024 @ 12:29 pm EDT

Geeklog Forums

Top menu bar


Anonymous

Anonymous
How could I disable the top menubar where the links are (I use Smooth_Blue) when a guest is on the site and enable it for loged in users only. Can I add some PHP code in the header.thtml that would check that it is displaying the page for a loged-in user and not for a guest. If so what would be that code Thanks
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Actually, you can use PHP in the header.thtml file. But what's wrong with having the menu bar visible to anonymous users? That way, they would know what they get when they register as a user ... bye, Dirk
 Quote

Anonymous

Anonymous
There' nothnig wrong with teh menu bar. In fact I want to keep it, but just for register users. I' geekloging the private part of an existing web site that contains information not to be seen by everybody. This is a company web site and this part is for employees only. A lot of documents are available, private links private calendar.....
 Quote

Status: offline

Dirk

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

You can completely close a site for anonymous users (as of Geeklog 1.3.6). The menu bar will still be there, but you will be asked to log in if you try to follow one of the links.

Isn't that what you want?

bye, Dirk

 Quote

Anonymous

Anonymous
So far there is nothing (no blocks) on my site when and unregistered use comes in. Only the Login box is available, and a middle bloc that says " only registered users have...." But this top menu bar is there. Some of the links are not available to the unregistered user but most are. This is what I want to disable to unregistered users
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Yes, I understand what you want - I was merely trying to show an alternative solution that doesn't require hacking the theme and / or Geeklog. I'm running a site with that solution (i.e. the menu bar is visible, but anonymous users will be asked to log in when they follow a link from the menu bar). Actually, that feature only exists in Geeklog because I needed it for that site :-) If you really want to hide the menu bar then I suggest you have a look at the code to see how Geeklog identifies users. You should be able to implement what you want in the theme's functions.php file and then call such a function from header.thtml - although I've never tried to use that feature myself. bye, Dirk
 Quote

Anonymous

Anonymous
Well... I'll open my PHP Programming Book and I will add this function to my site. I was looking for a "faster easy magic solution" ! Where is that book ........
 Quote

All times are EDT. The time is now 12:29 pm.

  • 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