Posted on: 01/19/06 04:56am
By: Anonymous (champion510)
I am trying to setup a link in my header section to link to an addon page that a logged in user has. I can not find the header part for the addon so making the link in the header for "GUESTS" only is easier for me.
I took the example from lib-custom.php with only logged in users able to see the link.
// 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']
. '',
'label' => '');
and modified it to
if (!empty ($_USER['uid']) && ($_USER['uid']
$myentries[] = array ('url' => $_CONF['site_url']
. 'path',
'label' => 'name');
It doesn't work which would be obvious just looking at it if you know the coding language but I don't.
I think I read somewhere that a "guest/person not logged in" has a value of 1 or something like that. That is why I made it
Any help with this code would be appreciated. Prefferably to the point I could almost copy past it and it would work.
P.S I know the "path" and "name" have to be changed, they just as examples in the coding.
Custom links in headercould be used for other places.
Posted on: 01/19/06 03:31pm
By: Dirk
[QUOTE BY= champion510] It doesn't work which would be obvious just looking at it if you know the coding language but I don't.[/QUOTE]
Well, maybe. But since you forgot to use the forum's CODE button to prevent PHP code being eaten by the HTML filter, the above code is now unreadable and it's impossible to tell what may be wrong with it. Please post it again.
bye, Dirk
Custom links in headercould be used for other places.
Posted on: 01/19/06 06:22pm
By: Anonymous (champion510)
I took the example from lib-custom.php with only logged in users able to see the link.
Text Formatted Code
if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) {
$myentries[] = array ('url' => $_CONF['site_url']
. '',
'label' => '');
and modified it to
Text Formatted Code
if (!empty ($_USER['uid']) && ($_USER['uid'] < 2)) {
$myentries[] = array ('url' => $_CONF['site_url']
. '',
'label' => '');
P.S Sorry about the code I didn't know about that.
Custom links in headercould be used for other places.
Posted on: 01/20/06 02:00am
By: Dirk
Not sure how you managed that, but it's still garbled. Try again, please ...
bye, Dirk
Custom links in headercould be used for other places.
Posted on: 01/20/06 02:25am
By: Anonymous (champion510)
Don't bother, I found a bug with an addon I was using (the addon was the only reason I was using Geeklog) and there isn't any more support for the addon, so I got to go with the second choice addon I found but it specifically says I can't have anything like geeklog/php-nuke or anything else installed, so I got to say bye Geeklog, will miss you.