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

Re: *LinksSQL 2* How much to convert my text db>MySQL?

Quote Reply
Re: *LinksSQL 2* How much to convert my text db>MySQL? In reply to
Okay, this much now works. Links no longer builds index pages for category 91 which I call "Default". Problem is it still puts category "Default" on the home page with a dead end hyperlink to /Default/index.shtml. Where do I look to keep it from building into the home page as well?

Code:
while (my ($id, $name) = $sth->fetchrow_array) {
unless($id eq "91"){#begin unless $id=91
$clean_name = $db->as_url($name);
$page = $CFG->{build_root_path} . "/" . $clean_name . '/' . $CFG->{build_index};
$url = $CFG->{build_root_url} . "/" . $clean_name . '/' . $CFG->{build_index};
$USE_HTML ?
print "\tBuilding category <a href='$url' target='_blank'>$name</a> ... \n" :
print "\tBuilding category $name ... \n";
_build_dir ($clean_name);
$total = $catlink_db->count ( { 'CatLinks.CategoryID' => $id, isValidated => 'Yes' } );
print "\t\tLinks: $total\n";

# Do sub-pages if requested.
if ($CFG->{build_span_pages}) {
$lpp = $CFG->{build_links_per_page} || 25;
$num_pages = int ($total / $lpp);
($total % $lpp) and ($num_pages++);

# Create the main page.
open (PAGE, "> $page") or _cant_open($page, $!);
print PAGE Links::Build::build ('category', { id => $id, nh => 1, mh => $lpp });
close PAGE;
my $perms = oct ($CFG->{build_file_per});
chmod ($perms, $page);

# Create the sub pages.
for (2 .. $num_pages) {
$page = $CFG->{build_root_path} . "/" . $clean_name . '/' . "more" . $_ . $CFG->{build_extension};
$url = $CFG->{build_root_url} . "/" . $clean_name . "/" . "more" . $_ . $CFG->{build_extension};
$USE_HTML ?
print "\t\tBuilding subpage: <a href='$url' target='_blank'>$_</a>\n" :
print "\t\tBuilding subpage: $page\n";
open (PAGE, "> $page") or _cant_open($page, $!);
print PAGE Links::Build::build ('category', { id => $id, nh => $_, mh => $lpp });
close PAGE;
chmod ($perms, $page);
}
}
else {
open (PAGE, "> $page") or _cant_open($page, $!);
print PAGE Links::Build::build ('category', { id => $id });
close PAGE;
my $perms = oct ($CFG->{build_file_per});
chmod ($perms, $page);
}
print "\tDone\n\n";
}#end unless $id=91
}
print "Finished building categories (", _time_display(), " s)\n\n";
Mark Brasche
http://SurfSafely.com/
Subject Author Views Date
Thread *LinksSQL 2* How much to convert my text db>MySQL? HomerUSA 11383 Mar 26, 2001, 1:32 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Paul 11172 Mar 26, 2001, 4:10 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
HomerUSA 11185 Mar 26, 2001, 5:03 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Paul 11166 Mar 26, 2001, 5:07 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
HomerUSA 11084 Mar 26, 2001, 5:23 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Paul 11098 Mar 26, 2001, 5:29 AM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 11058 Apr 8, 2001, 4:56 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Mel_g 11088 Apr 12, 2001, 12:19 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10966 Apr 12, 2001, 1:34 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
Stealth 10949 Apr 12, 2001, 2:08 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Mel_g 11008 Apr 12, 2001, 4:12 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10932 Apr 12, 2001, 4:27 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10998 Apr 12, 2001, 6:07 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10856 Apr 14, 2001, 5:51 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Mel_g 10887 Apr 17, 2001, 8:59 AM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10865 Apr 17, 2001, 12:17 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10864 Apr 17, 2001, 1:26 PM
Thread Re: *LinksSQL 2* How much to convert my text db>MySQL?
Alex 10886 Apr 18, 2001, 3:39 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10775 Apr 18, 2001, 4:57 PM
Post Re: *LinksSQL 2* How much to convert my text db>MySQL?
surfsafely 10747 Apr 18, 2001, 9:07 PM