Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Logged in User not recognized on home page

Quote Reply
Logged in User not recognized on home page
Hey,

When a user log's in, Links SQL does not recognize it on the home page.

for example, there are two different menu's, one for a logged in user and one for a non logged in user:

Code:

<%if Username%>
<p align=
"center"><font size="2">
<a href=
"/jobs">Camp Job Home</a> |
<a href=
"<%db_cgi_url%>/search.cgi">Camp Job Search</a> |
<a href=
"<%db_cgi_url%>/page.cgi?p=login_success">Post a Job</a> |
<a href=
"<%db_cgi_url%>/page.cgi?p=login_success">Modify a Job</a> |
<a href=
"<%db_cgi_url%>/page.cgi?p=login_success">Camp Admin</a> |
<a href=
"<%db_cgi_url%>/user.cgi?logout=1">Logout</a>
<%endif%>

<%ifnot Username%>

<p align=
"center"><font size="2">
<a href=
"/jobs">Camp Job Home</a> |
<a href=
"<%db_cgi_url%>/search.cgi">Camp Job Search</a> |
<a href=
"<%db_cgi_url%>/page.cgi?p=post_a_summer_job">Post a Job</a> |
<a href=
"<%db_cgi_url%>/page.cgi?p=post_a_summer_job">Modify a Job</a> |
<a href=
"<%db_cgi_url%>/user.cgi">Login</a>
<%endif%>

But on the home page, and all other static pages, the non-logged in user menu pops up.

How do I change this?

Quote Reply
Re: [Gregorio] Logged in User not recognized on home page In reply to
Are you using dynamic or static pages? i.e page.cgi, or .html generated pages).

You won't be able to use <%if Username%> ...<%endif%> is running in static mode (unless you are using mod_rewrite, so it just looks static, but is in fact running throuh page.cgi dynamically).

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!