Gossamer Forum
Home : Products : Gossamer Links : Discussions :

"Username" Clash?

Quote Reply
"Username" Clash?
How do you differentiate Links.Username from the logged in Username when generating dynamic pages?

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


Quote Reply
Re: "Username" Clash? In reply to
I had that problem also with Title, due to a seperate addition I'd made to the Users table. I had this problem a while ago so I'm not sure if this is right or not...but I assigned an extended Title/Username within the sub &site_html_link, it looks kind of like this:

Code:
my $user = {};
defined $dynamic and &load_user ($dynamic, $user, $rec->{CategoryID});
my $output = &load_template ('link.html', {
detailed_url => "CUT TO FIT",
%$rec,
%$user,
%GLOBALS,
LinkTitle => $rec->{Title},
enc_title => CGI->escape ($rec->{'Title'}),
enc_One800 => CGI->escape ($rec->{'One800'}),
enc_add => CGI->escape ($rec->{'Address'}),
enc_town => CGI->escape ($rec->{'Town'})
}, undef, $template);
# Don't clean output on a single link.
return $output;
Truthfully I can't remember what else I did to make this work...but I do remember I had it working.

So what you can do is just reassign a new code like User_Namensie => $rec->{Username}
then access <%User_Namensie%> in the template.

Quote Reply
Re: "Username" Clash? In reply to
I've worked around it in this situation, but it seems that it should be something that has a real official solution to prevent clashes in add-ins, add-ons, and even standard dynamic pages with advanced template tricks.

I noticed some of the fields have been passed in as CatLinks.CategoryID, but ith "Username" a field in both the Users and Links tables, and two different kinds of "users" (owner/non-owner) can view a "link" I wondered what the official mechanism was to make this work.

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


Quote Reply
Re: "Username" Clash? In reply to
That would be useful addition ;)
I guess I misunderstood the question, thought it seemed out of place here. But now I unnerstand Blush

Quote Reply
Re: "Username" Clash? In reply to
Hey:

I have noticed something else that may or may not be related. When you Validate a link, the field "Username" shows "E-Mail Address".

Can this be made to actually shoew the Name?

Dave

Quote Reply
Re: "Username" Clash? In reply to
Just a thought -- try re-sync the tables under "properties" and see if that fixes it.

If you mean the text-entry box shows the email address, the above might work.

If the label on that box is wrong, there is a way to edit that, to change the label on the display I believe. Again, that is in the Properties area.

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


Quote Reply
Re: "Username" Clash? In reply to
Yes, I'll fix this up.

Cheers,

Alex

--
Gossamer Threads Inc.