Gossamer Forum
Home : Gossamer Threads Inc. : Custom Modification Jobs :

Custom Job: Multiple Modify Form for Multiple Add Form For Links SQL 2.1.0

Quote Reply
Custom Job: Multiple Modify Form for Multiple Add Form For Links SQL 2.1.0
Hello all,

For the information, i'm using the global tag i attach in this thread to make a multiple add form for multiple category, the problem now is on modification, how to make the link will using/recognise the modify form same as addition.

For example i was add a link by using 'add_announ.html' on category 'Announcement', but how if i want to make a modication it will using the same form, sorry to my english and please quote to me the job.

custom_form =>
sub {
my $tags = shift;
my $query = $tags->{query};
my ($full_name) = $DB->table('Category')->select(['Full_Name'], { ID => $tags->{ID} })->fetchrow;
my $file = '';
if ($full_name =~ /^Announcements/) {
$file = 'add_announ.html';
}
elsif ($full_name =~ /^Automobiles/) {
$file = 'add_auto.html';
}
elsif ($full_name =~ /^Business_Opportunities/) {
$file = 'add_buss.html';
}
elsif ($full_name =~ /^Collectibles/) {
$file = 'add_collect.html';
}
elsif ($full_name =~ /^Computers___Software/) {
$file = 'add_computer.html';
}
elsif ($full_name =~ /^Employment/) {
$file = 'add_employ.html';
}
elsif ($full_name =~ /^General_Merchandise/) {
$file = 'add_general.html';
}
elsif ($full_name =~ /^Lost___Found/) {
$file = 'add_lost.html';
}
elsif ($full_name =~ /^Personals/) {
$file = 'add_personal.html';
}
elsif ($full_name =~ /^Professional_Services/) {
$file = 'add_services.html';
}
elsif ($full_name =~ /^Real_Estate/) {
$file = 'add_real.html';
}
elsif ($full_name =~ /^Rentals___Roommates/) {
$file = 'add_rental.html';
}
..
else {
$file = 'include_form.html';
}
open (FILE, "/home/worldbar/public_html/db/cgi-bin/admin/templates/default/$file");
read (FILE, my $data, -s FILE);
close FILE;
return $data;
}

Last edited by:

reenee: Mar 3, 2002, 11:24 AM