Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: nph-build problem -- abort or looping

Quote Reply
Re: nph-build problem -- abort or looping In reply to
All pugdog did for me was rem out the following lines of code in the sub build_category_pages routine:

Code:

###while (1) {
$categories_r = $CATDB->query ( { ID => '*', mh => $limit, $offset+1, sb => 'Name', so => 'ASC', tb => 0 });
###last unless ($categories_r and @{$categories_r} > 0);


Note: The bolded lines are what you need to rem out with the # sign.

I also changed $limit = 100; to the following:

Code:

$limit = &Links::DB_Utils::get_totalcats;


This is referencing a sub that I added in the DB_Utils.pl that counts the total number of categories in the Category table.

The sub you need to add in the DB_Utils.pl file is as follows:

Code:

sub get_totalcats {
#-----------------------------------------------------
my ($CATDB, $GRAND_TOTAL);
$GRAND_TOTAL = 0;
$CATDB = new Links::DBSQL "$LINKS{admin_root_path}/defs/Category.def";
$GRAND_TOTAL = $CATDB->total();
return $GRAND_TOTAL;
}


BTW: You can create a global variable in your HTML_Templates.pm like the following:

Code:

totalcats => &Links::DB_Utils::get_totalcats;


Then you can use <%totalcats%> in all your template files. Wink

Yes...the same thing can be done with links...rename the above sub, rename the .def file and global variables in that sub, then rename the global variable in the HTML_Templates.pm.

Hope this helps.

Regards,

Eliot Lee

Subject Author Views Date
Thread nph-build problem -- abort or looping pugdog 11635 Aug 29, 2000, 12:32 PM
Thread Re: nph-build problem -- abort or looping
Stealth 11501 Aug 29, 2000, 12:38 PM
Thread Re: nph-build problem -- abort or looping
qango 11396 Aug 29, 2000, 1:32 PM
Post Re: nph-build problem -- abort or looping
Stealth 11385 Aug 29, 2000, 1:40 PM
Thread Re: nph-build problem -- abort or looping
startpoint 11412 Aug 29, 2000, 2:24 PM
Thread Re: nph-build problem -- abort or looping
Stealth 11400 Aug 29, 2000, 3:39 PM
Thread Re: nph-build problem -- abort or looping
qango 11404 Aug 29, 2000, 3:47 PM
Thread Re: nph-build problem -- abort or looping
Stealth 11421 Aug 29, 2000, 3:52 PM
Thread Re: nph-build problem -- abort or looping
pugdog 11402 Aug 30, 2000, 1:25 AM
Thread Re: nph-build problem -- abort or looping
Alex404 11409 Aug 30, 2000, 3:30 AM
Thread Re: nph-build problem -- abort or looping
pugdog 11387 Aug 30, 2000, 6:11 AM
Thread Re: nph-build problem -- abort or looping
Alex404 11376 Aug 30, 2000, 6:36 AM
Thread Re: nph-build problem -- abort or looping
Stealth 11356 Aug 30, 2000, 7:51 AM
Thread Re: nph-build problem -- abort or looping
AndreasH 11385 Aug 30, 2000, 4:04 PM
Thread Re: nph-build problem -- abort or looping
Stealth 11363 Aug 30, 2000, 5:05 PM
Thread Re: nph-build problem -- abort or looping
AndreasH 11363 Aug 30, 2000, 5:20 PM
Thread Re: nph-build problem -- abort or looping
pugdog 11387 Aug 30, 2000, 6:02 PM
Thread Re: nph-build problem -- abort or looping
AndreasH 11368 Aug 30, 2000, 6:14 PM
Thread Re: nph-build problem -- abort or looping
pugdog 11387 Aug 30, 2000, 6:29 PM
Thread Re: nph-build problem -- abort or looping
AndreasH 11374 Aug 30, 2000, 6:50 PM
Post Re: nph-build problem -- abort or looping
pugdog 11363 Aug 30, 2000, 7:30 PM
Thread Re: nph-build problem -- abort or looping
Alex404 11384 Aug 31, 2000, 12:42 AM
Thread Re: nph-build problem -- abort or looping
AndreasH 11359 Aug 31, 2000, 10:58 AM
Thread Re: nph-build problem -- abort or looping
pugdog 11335 Aug 31, 2000, 2:06 PM
Thread to Alex
AndreasH 4439 Aug 31, 2000, 2:51 PM
Thread Re: to Alex
Stealth 4415 Aug 31, 2000, 3:09 PM
Thread Re: to Alex
AndreasH 4424 Aug 31, 2000, 3:18 PM
Post Re: to Alex
Stealth 4396 Aug 31, 2000, 3:25 PM
Thread Re: nph-build problem -- abort or looping
AndreasH 4436 Aug 31, 2000, 4:30 PM
Thread Re: nph-build problem -- abort or looping
pugdog 4407 Aug 31, 2000, 5:51 PM
Thread Re: nph-build problem -- abort or looping
AndreasH 4406 Aug 31, 2000, 6:27 PM
Thread Re: nph-build problem -- abort or looping
Alex404 4402 Sep 1, 2000, 1:38 AM
Post Re: nph-build problem -- abort or looping
AndreasH 4390 Sep 1, 2000, 3:32 AM
Post To all who helped me!
AndreasH 4379 Sep 1, 2000, 4:44 PM
Post Re: nph-build problem -- abort or looping
Alex404 11370 Aug 30, 2000, 7:50 AM