Gossamer Forum
Home : Products : Links 2.0 : Customization :

Adding flags as new fields

Quote Reply
Adding flags as new fields
Hi.

I would like to add a flag field to my links, so i can see if the link are in english, german, french or something else.

I have been searching - but i all i have found is : http://gossamer-threads.com/...d;guest=337906#52260 and http://gossamer-threads.com/perl/gforum/gforum.cgi?do=ubb&ubb=002723:Forum3

But none of them point to a site, where i can see the result !

Do you know of any ?
God love simple things - Like Links
Quote Reply
Re: [Webpoint] Adding flags as new fields In reply to
There aren't any...follow the instructions in the last link that you posted...it's not that hard.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Webpoint] Adding flags as new fields In reply to
The Download Archive features the language mod (click the link in my sig), I have implemented it in my directory as well, check out the What's New section.
Quote Reply
Re: [Tho:mas] Adding flags as new fields In reply to
That just what im looking for !

Is it possible, to talk you into, to guide me though ?

Every time i come to the upgrade.pl - i get a internal server error. Even if i upload in ascii.

Thanks

Kim
God love simple things - Like Links
Quote Reply
Re: [Webpoint] Adding flags as new fields In reply to
And did you change the permission of the file to 755? It needs to have executable permissions in order to run!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] Adding flags as new fields In reply to
Yes. i did changede the permissions to 755.

Same problem Frown
God love simple things - Like Links
Quote Reply
Re: [Webpoint] Adding flags as new fields In reply to
Perhaps the problem is in the upgrade file.

I take this text :
Quote:
#!/usr/local/bin/perl
# -------------------------------------------
$ENV{'REQUEST_METHOD'} and (print "Content-type: text/plain\n\n");
open (DB, "<links.db") or
print "Unable to open links database 'links.db'. Reason: $!" and exit;
print "\tOpening output file . . .\n";
open (DBOUT, ">links2.db") or
print "Unable to open output database.
Make sure data dir is chmod 777 temporarily. Reason: $!" and exit;
print "\tProcessing records\n";
while (<DB> ) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp; # Remove trailing new line.
@rec_in = &split_decode($_);
# Copy ID, Title, URL, Date and Category
for $i (0 .. 4) {
$rec_out[$i] = $rec_in[$i];
}
# Add New Field here
$rec_out[5] = ""; # add something between quotes if you have a default value
# Copy the rest of old links.db to new links2.db
for $i (5 .. 13) {
$rec_out[$i + 1] = $rec_in[$i];
}
print DBOUT &join_encode(&array_to_hash(0, @rec_out));
}
print "\tDone.\n\n";
close DB;
close DBOUT;
print "Database saved it as links2.db.\n";
print "Change permissions back to 755 on the data directory.\n\n";
print "You must rename 'links2.db' to 'links.db before using with Links v2.\n";
print "It is recommend you save the original 'links.db' before renaming.";


and saves it into a file called upgrade.pl.

The file is placed in cgi-bin/admin/data and cmod to 755

Is this right ?


God love simple things - Like Links