Gossamer Forum
Home : Products : Gossamer Links : Discussions :

isLinkOwner not parsing

Quote Reply
isLinkOwner not parsing
Upgraded to 2.0.4 and seems like the <%$if isLinkOwner%> tag in links.html is not parsing. I never get the "Edit this Link" link even when I am logged in as the owner. This used to work before the upgrade. This specific tag seems to be exactly the same as in the old templates though. Advice?

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: isLinkOwner not parsing In reply to
You need to take out the dollar sign.

<%if isLinkOwner%>
<%body_font%>
<small><a href="<%db_cgi_url%>/modify.cgi?LinkID=<%ID%>">
Edit this link</a></small>
<%endif%>

Quote Reply
Re: isLinkOwner not parsing In reply to
Nope - not that. The dollar sign is a typo in my post! Smile Good catch though! Any othr ideas?

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: isLinkOwner not parsing In reply to
I still have this problem.... When a person hits the "Modify" link the script seems to be functioning fine by building a page with only those links owned by the user.

However, the piece of code below, which is supposed to create an Edit link next to each record the person owns seems like it's not working at all - no Edit links appear.

Code:
<%if isLinkOwner%>
<a href="<%db_cgi_url%>/modify.cgi?LinkID=<%ID%>">Edit this DZ</a>
<%endif%> 
This is curious because it worked fine before I upgraded to 2.0.4.

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: isLinkOwner not parsing In reply to
This has me stumped! I still have this problem and have spent countless hours trying to resolve what seems to be non-existent bug! I've resolved to copy-'n-pasting the exact line from the isLinkOwner line from the new templates into the old ones...no lock. Did anything change in V 2.0.4 that changed the way this tag is parsed? is there something on the new templates that I'm overlooking that needs to be included on my old templates to get this to work?

Bumping this thread to the top again to see if anyone has suggestions or can help with this...

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: isLinkOwner not parsing In reply to
<%if LinkOwner eq Username%>

"isLinkOwner" is not a valid tag.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Plugins:http://LinkSQL.com/plugin
Quote Reply
Re: [pugdog] isLinkOwner not parsing In reply to
Nope - I still have this problem and would still like to display some info to Link Owners only. Pugdog's suggestion above does not work for me eirther. I have version 2.0.5 installed. Anyone else.

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] isLinkOwner not parsing In reply to
One thing you might want to check is that the Username (for your user record) is the same case as as LinkOwner for the Link. If you look in admin/Links/SiteHTML.pm, you'll see on around line 52 something like this:
Code:
(defined $Links::USER->{Username} and ($rec->{'LinkOwner'} eq $Links::USER->{Username})) ?
($rec->{'isLinkOwner'} = 1) : ($rec->{'isLinkOwner'} = 0);
And the same thing for detailed pages on line 85.

What that does is checks to see if you're logged in (and therefore $Links::USER will be your user record). Then it checks to see if the LinkOwner is the same as your username. It might be possible that the username was added with a different case (ie. lowercase) than what youre Username is set to. If that's the case you might want to consider changing those lines of code to:
Code:
(defined $Links::USER->{Username} and (lc($rec->{'LinkOwner'}) eq lc($Links::USER->{Username}))) ?
($rec->{'isLinkOwner'} = 1) : ($rec->{'isLinkOwner'} = 0);

This could be one reason why it's not recognizing you as the person who created the link. If I made this post a little too technical, tell me, and I'll try simplify the approach on checking to see if this is the case.



Adrian
Quote Reply
Re: [sangiro] isLinkOwner not parsing In reply to
Hi

Did you or anyone ever figure this one out?

I seem to have the same trouble..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] isLinkOwner not parsing In reply to
I've just checked and <%if isLinkOwner%> is working on my site within the Link template.