Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

small add.cgi problem

Quote Reply
small add.cgi problem
Hi all,
I've had Links 2.0 running fairly smooth for a while now. But I keep having problems with the "auto category select" feature.

I have it setup properly (I think) in links.cfg, and all of the files outside of site_html.pl and my old db are 2.0 files. I've updated the section in site_html.pl under the add section, and I've tried everything else. Please help! (fyi I am not using templates)

links.cfg:
# Should your add.cgi automatically select what category the user
# is adding his link into?
$db_single_category = 1;

site_html.pl (add a resource area)
sub site_html_add_form {
# --------------------------------------------------------
# This routine determines how the add form page will look like.
#
my $category = shift;
$category ?
($category = qq~$category <input type=hidden name="Category" value="$category">~) :
($category = &build_select_field ("Category", "$in{'Category'}"));

&html_print_headers;
print qq~
<$dtd>
<html>

<head>
<title>$site_title: Add a Resource</title>
</head>

<$site_body>
<center>
<$site_logo>
<h1>$site_title: Add a Resource</h1>

$site_menu

<form action="$build_add_url" method="POST">
<p>Please fill out the form completely, and we'll add your resource as soon as possible.</p>
<div class="margin">
<table border ="0" cellspacing="0" cellpadding="0">
<tr><td align="right" valign="top">Title:</td>
<td><input name="Title" value="$in{'Title'}" size="50"></td></tr>
<tr><td align="right" valign="top">URL:</td>
<td><input name="URL" value="$in{'URL'}" size="50"></td></tr>
<tr><td align="right" valign="top">Category:</td>
<td>$category</td></tr>
<tr><td align="right" valign="top">Description:</td>
<td><textarea wrap="virtual" name="Description" value="$in{'Description'}" rows="3" cols="42">$in{'Description'}</textarea></td></tr>
<tr><td align="right" valign="top">Contact Name:</td>
<td><input name="Contact Name" value="$in{'Contact Name'}" size="40"></td></tr>
<tr><td align="right" valign="top">Contact Email:</td>
<td><input name="Contact Email" value="$in{'Contact Email'}" size="40"></td></tr>
<tr><td></td><td><input type="SUBMIT" value="Add Resource"></td></tr>
</table>
</div>
</form>
$site_footer

</body>
</html>
~;
}

Thanks in advance! I'm really stumped.

Geoffrey


------------------