Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Modify only with password

Quote Reply
Modify only with password
I'm trying to get the Modify only with Password mod to work, but keep getting the same error message when I try to run modify.cgi:

Software error:
Execution of /links/modify.cgi aborted due to compilation errors.

I've been following the instructions for the mod exactly (At leas I think I have...) and the code that I'm changing on modify.cgi is just the sub main part where I am completely replacing it with the code provided in the mod which is:

sub main {#0
# ---------------------------------------------------
# Determine what to do.
#
my $in = new CGI;
my $dynamic = $in->param('d') ? $in : undef;
%in = %{&cgi_to_hash($in)};
print $in->header('text/html');

if ($in->param('modify')) { #2
&process_form ($in, $dynamic);
} #2
else { #2
if ($in->param('SiteID') =~ /^\d+$/) { #3
my $db = new Links::DBSQL $LINKS{admin_root_path} . "/defs/Links.def";
my $rec = $db->get_record ($in->param('SiteID'), 'HASH');
$rec or &site_html_modify_first ( { erro => "ID Unknow", SiteID => $in->param('SiteID'), Password => $in->param('Password') } ) and return;


if ($rec->{'ID'} eq $in->param('SiteID')) { #4

if ($rec->{'Password'} eq $in->param('Password')) { #5

my ($name, $category);
# my $id = $in->param('ID');
my $id = $rec->{'CategoryID'};

# If we don't have an id, and can't generate a list, let's send the user a message.

if (! $id and ! $LINKS{db_gen_category_list})
{ #6
&site_html_error ( { error => "Please first go to the category that you want the listing to be in and click from there." }, $dynamic); } #6
else { #6
if ($id) {#7
$name = &get_category_name ($id);
$name ?
($category = "$name <input type=hidden name='CategoryID' value='$id'> ") :
($category = &get_category_list ());
}#7
else {#7
$category = &get_category_list ();
}#7
# &site_html_modify_form ( { Category => $category, %in }, $dynamic);
# &site_html_modify_form ( { %$rec, Category => $category, %in }, $dynamic);
}#6
&site_html_modify_form ( { %$rec, Category => $category, %in }, $dynamic);
# &site_html_modify_form ( { Category => $category, %in }, $dynamic ); } #5
else { #5
&site_html_modify_first ( { erro => "Wrong password", SiteID => $in->param('SiteID'), Password => $in->param('Password') } );
} #5
} #4
else { #4
&site_html_modify_first ( { erro => "ID Unknow", SiteID => $in->param('SiteID'), Password => $in->param('Password') } );
} #4
} #3
else { #3
&site_html_modify_first ( { SiteID => '', Password => ''} );
} #3
} #2
} # sub 0
# ========================================================= ##--##


I've added a field called Password and made it required and made sure that all links had a password filled in.

I also made the changes to HTML_templates.pm as outlined in the mod...

Has anyone successfully installed this mod and can let me know where the problem might be? Thanks very much...

--Frank



Subject Author Views Date
Thread Modify only with password rover 2004 Sep 24, 2000, 11:58 AM
Post Re: Modify only with password
pugdog 1938 Sep 24, 2000, 1:35 PM