Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%Username%>

Quote Reply
<%Username%>
Hi:



I have a header.txt file with an "<%if Username%>" thing in it... and for most of the time, it works fine. But on a couple of pages, even if loggged in, it is not getting the <%Username%> variable, so not printing.



Usually, these are pages I have written, too (so that is probably the problem!)



Anyway, do I need to put something in the cgi of the pages to pull this variable onto the pages... am I missing something? I thought this would be a global, and always available.



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] <%Username%> In reply to
This is a complicated question.

The <%Username%> field is only active after a user logs in, and can only be active on DYNAMIC pages, not static pages.

If you are just serving pages, in static mode, the tag will be ignored. It will only display when pages are displayed with a script (a program like search.cgi, page.php, page.cgi, etc).


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] <%Username%> In reply to
Pugdog:



Hi tyhere! Been a while, hope all is well.



Well, they are dynamic pages... if you are bored, try this. Go to:



http://www.bcdb.com/



and log in as guest pass pugdog



Then go here:



http://www.bcdb.com/bcdb/problem.cgi?g=Report&ID=20487&Title=1001%20Arabian%20Nights&URL=591201



(Whoops, just noticed you cannot just link to that page. Please go to ANY cartoon and link to the cartoon. At the bottom, you will see a link that says, "Report Errors On This Page" Click on that, and you will get a page that is dynamic. Note the Title of the cartoon in the page...)



Note that this is dynamic. On the header.txt file,which supplies the left column, you should have "Edit Profile" if username, "Log In" ifnot username. (Also, your name should appear in the name box)



Now, if you follow one of the links on the left to annother studio (Hanna-Barbera, for instance), Usernname is back (note you can "Edit Profile" here!).



Since problem.cgi is one of my scripts, and Username is not showing up there, I figure I must be doing something wrong in that script...



But I do not use the variable "Username" anywhere in the Problem.cgi script, so I am not overwriting it...



Perplxed!



Dave
dave

Big Cartoon DataBase
Big Comic Book DataBase

Last edited by:

carfac: Jun 22, 2002, 11:19 AM
Quote Reply
Re: [carfac] <%Username%> In reply to
Pugdog:



GOT IT!!!! I am such an idiot sometimes...



To pass the <%Username%>, the cgi must have the:



Links::init_user ('/path/to/admin');



In it. DUH!!!! I feel stupid now! Pirate



Dave

dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] <%Username%> In reply to
:) Sometimes it's simple :)

The "init" procedures have to do with Gossamer Community integration.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] <%Username%> In reply to
Pugdog:



You know, I was also getting some very wild processes running, taking up tremendous server loads and megabites of memory... now that seems to have stopped, too. I wonder if they were trelated? Do you think?



Thansk again!



Dave
dave

Big Cartoon DataBase
Big Comic Book DataBase