Welcome to Geeklog, Anonymous Monday, January 06 2025 @ 09:28 pm EST
Geeklog Forums
Custom links in headercould be used for other places.
champion510
Anonymous
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.
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.
3
5
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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.
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
6
7
Quote
champion510
Anonymous
I took the example from lib-custom.php with only logged in users able to see the link.
if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) {
$myentries[] = array ('url' => $_CONF['site_url']
. '',
'label' => '');
and modified it to
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.
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.
4
5
Quote
champion510
Anonymous
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.
5
7
Quote
All times are EST. The time is now 09:28 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