Gossamer Forum
Quote Reply
User names
Is there a way to display the users name on pages after login?
if username
ifnot become a member...
I assume you would call it like anything else?

Quote Reply
Re: User names In reply to
<%Username%>



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: User names In reply to
<%if Username%>
Hello, <%Username%>.
<%endif%>
<%ifnot Username%>
Hello, Guest User. Please <a href="<%db_cgi_url%>/user.cgi?signup_form=1">Signup Account</a>
<%endif%>

Regards,

Eliot Lee
Quote Reply
Re: User names In reply to
Would be nice to be able to use the 96Username96 feature on other non-links pages, maybe by an ssi? Is this possible?

Quote Reply
Re: User names In reply to
Which pages is Username valid? It certainly isn't working on the home page even after login. How is Username passed around? Is this in the cookie?

Wil

Quote Reply
Re: User names In reply to
It should be valid throughout the dynamic pages. It won't work in the STATIC mode...meaning that the USERNAME should be available on all pages via page.cgi, but not on the STATIC pages.

Regards,

Eliot Lee
Quote Reply
Re: User names In reply to
Yes...you would have to write another script that pulls USER info and then use SSI directives (calls) to print that in SSI-enabled pages outside of your LINKS pages.

Regards,

Eliot Lee
Quote Reply
Re: User names In reply to
I wonder if anyone would be interested in mading a mod. for this? Seems like a good feature, but I am PERL challenged Frown

Quote Reply
Re: User names In reply to
It wouldn't be that complicated...basically, it would be a matter of creating another template file...called something like user_ssi.html. And you would have to add another SUB in the SITEHTML.pm file to load the template file.

Then you would have to add another sub in your user.cgi script that calls data from the Users table. Then you would add a condititional statement in the sub main routine that looks something like the following:

Code:

if ($IN->('ssi')) {
&user_ssi ($in, $dynamic);
}


Then you would add the WEBADVERTS MOD to properly call the ssi sub within other CGI scripts. Within static web pages, you could simply use SSI directives.

I am sure someone down the line would be willing to add this code hack as a formal plug-in.

Regards,

Eliot Lee