Welcome to Geeklog Sunday, August 18 2019 @ 02:35 am EDT

Geeklog Forums

Adding another option to user functions menu


Status: offline

ItsCurly

Forum User
Junior
Registered: 05/12/05
Posts: 24
Hi,

I am tweaking again, one day I will find something Geeklog won't let me do, but that day has not yet arrived.

I read in another post that to reorder the entries in User Functions menu I edit something in the lib-common.php (function called COM_userMenu)

I don't need to do this but I do need to add a static link in there (just to webmail) so is there any code I can drop in? all the HTML equivalent would be is something like:

PHP Formatted Code
<a href="http://urlforwebmail">Webmail</a>


This code is static so no variables involved. Where abouts would i drop that in that function, I just need it somewhere in the User Functions block and not visible to non members.

Thanks.

Status: offline

DTrumbower

Forum User
Moderator
Registered: 08/01/03
Posts: 507
I would create separate block and add the HTML in the block. Then you can give the appropriate rights to the block.

Status: offline

ItsCurly

Forum User
Junior
Registered: 05/12/05
Posts: 24
Yeah that kind of worked, and it looked exactly right when I was logged in, but as soon I logged out I hit the other problem. I don't have a login box on the front page any more, as thats obviously part of the gldefault 'user functions' block.

So now I can't get into my site, well unless I go to users.php

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
Setup two blocks. One, the default user block. Give it permissions such that only anonymous can see it. The other block is your set of links, set it so anonymous cannot see it. Make sure the two blocks are next to one another.

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
The non-hacky way would be to write a small plugin that provides that entry via the plugin_getuseroption_xxx plugin API function.

bye, Dirk

Status: offline

ItsCurly

Forum User
Junior
Registered: 05/12/05
Posts: 24
Setup two blocks. One, the default user block. Give it permissions such that only anonymous can see it. The other block is your set of links, set it so anonymous cannot see it. Make sure the two blocks are next to one another.


That does the job perfectly. Admin can see them both but thats not biggie.

Thanks for you help, didn't think of doing something that only anonymous could see.

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