Home : Products : Links 2.0 : Customization :

Products: Links 2.0: Customization: Re: [Andy.] Multi category and Link templates: Edit Log

Here is the list of edits for this post
Re: [Andy.] Multi category and Link templates
Eeek....that isn't going to work for sure :)

You will need something like:

Code:
#!/usr/bin/perl

print "Content-type: text/plain\n\n";

open(IN, "data/links.db") or &cgierror("unable to open data file. Reason: $!");
open(NEW, ">data/links.db.new") or &error("unable to open data file. Reason: $!");
while (<IN>) {
chomp;
split /\|/;
print NEW join('|', @_);
if ($_[6] =~ /\.(gif|swf)$/) {
print NEW "|$1";
print "Updated record $_[0].....added $1\n";
next;
}
print NEW "\n";
}
close NEW;
close IN;

It will need to go in your admin directory.

Last edited by:

Paul: Apr 13, 2002, 5:20 AM

Edit Log: