Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

New Fields

Quote Reply
New Fields
Hi,

How difficult is it to integrate new fields into the script?

For instance, if I wanted to use the script as a recipe db and wanted to add custom fields such as ingredients, directions, etc., what would the integration entail?

I'm expert with SQL, but not with Perl.

Also, is it possible to integrate custom SQL statements ontp pages w/variables or tags?

TIA,
ATKOgirl
Quote Reply
Re: [ATKOgirl] New Fields In reply to
Hi,

It's much easier in Links SQL. You simply go to Database->Links->Properties and you can add as many columns as you like. These columns instantly become available in your admin and in the templates. So you could add ingrediants, directions, etc and they would automatically be available as tags in your template via <%ingrediants%>.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] New Fields In reply to
I'm starting to love this...Wink
Quote Reply
Re: [ATKOgirl] New Fields In reply to
How about if I were to add a completely new table to the database? Would those fields also be available?
Quote Reply
Re: [ATKOgirl] New Fields In reply to
Why would you need a new table?
Quote Reply
Re: [ATKOgirl] New Fields In reply to
Hi,

No, but they are easily accessible if you know a little bit of perl. For instance, with the SearchLogger plugin, you can access the information in the searchlogger table with a simple global that looks like:

Code:
sub {
my $table = $DB->table('SearchLogger');
my $sth = $table->select_options ("ORDER BY Count DESC", "LIMIT 10");
$table->select;
my $output;
while (my $row = $sth->fetchrow_hashref) {
$output .= "Term: $row->{Term} has been searched $row->{Count} times.";
}
return $output;
}
You can use our SQL api to access any tables you create making it easy to do custom mods.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] New Fields In reply to
Quote:
You can use our SQL api to access any tables you create making it easy to do custom mods.

Hmm that just answered my dense question above.