Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Disabling LinkOwner completely

Quote Reply
Disabling LinkOwner completely
I just lost 45 minutes of typing & hitting preview, so I'll give the quick version: I'm not worried about the security aspects involved, but I want to allow and Registered User the permission to modify ANY link. I've gone into modify.pm and changed one of the lines as such:

my $sth = $link_db->select ( { ID => $lid, LinkOwner => $USER->{Username} });

TO:

my $sth = $link_db->select ( { ID => $lid });



This allowed me to finally click on edit without any errors and get into the modify screen. Unfortunately, when I make a change and hit submit, I get this error message:

We were unable to find the URL '53' in the database. Please make sure you typed it in exactly as it appears in the directory.

And link ID 53 is a valid link. Any help or input would really be appreciated here....I'd like to sleep some day this week!
Perl Hopefull
Quote Reply
Re: [stilton] Disabling LinkOwner completely In reply to
Why not just set the option for modifications, so that someone doesn't have to be logged in, for it to let them modify a link? Unsure

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!
Quote Reply
Re: [Andy] Disabling LinkOwner completely In reply to
I would still like them to be logged in, in order to use conditional statements to present customized templates for specific individuals, particularly when dealing with the form elements...Unfortunately, I didn't realized how difficult it would actually be to make such a minor change.
Perl Hopefull
Quote Reply
Re: [stilton] Disabling LinkOwner completely In reply to
There's another line:

$sth = $db->select ( { ID => $lid, LinkOwner => $USER->{Username} });

which you'll need to edit in sub modify_link which should get rid of that error message. I'm not sure whether that's the final edit you'll need to do though.
Quote Reply
Re: [afinlr] Disabling LinkOwner completely In reply to
Afinir....my bloodshot eyes and twitching fingertips thank you greatly! I did edit this line of code as well as drop down to another line that was:

if ($USER->{Status} ne 'Administrator')

and changed the Status to Editor instead. Simply doing this by itself still doesn't work, however if you make all of the changes discussed, it finally allows an editor or whatever you specify the opportunity to make changes to any link.

Thanks again everyone for the help!!
Perl Hopefull