Gossamer Forum
Quote Reply
Simple Sort by Title
Why can't I sort my links simply by Title?

Every time I do an update I have to worry about whether or not "Build.pm" gets updated or not.

You would think (at least I would) that specifying 'Title' for build_sort_order_category
would actually sort the links by Title, but it doesn't. It incorporates ExpiryDate somehow.

So everytime there is an update to Build.pm, I have to make the following changes:
This mod displays ALL links regardless of the payment status.

File: links/admin/Links/User/Search.pm

$IN->param('ExpiryDate', '>=' . time) if $CFG->{payment}->{enabled};

Make it a comment.

File: links/admin/Links/Build.pm
sub: build_category
Comment out the following.

if ($CFG->{payment}->{enabled}) {
require Links::Payment;
my $payment_info = Links::Payment::cat_payment_info($opts->{id});

if ($payment_info->{mode} == OPTIONAL) {
my $paycond = GT::SQL::Condition->new($cond);
$paycond->add(ExpiryDate => '>=' => time, ExpiryDate => '<=' => UNLIMITED);

my $offset = ($opts->{nh} - 1) * $opts->{mh};
$catlink_db->select_options("LIMIT $opts->{mh} OFFSET $offset");
$optional_sth = $catlink_db->select('Links.*', $paycond);

$cond->add(ExpiryDate => '=' => FREE);
else {
$cond->add(ExpiryDate => '>=' => time);

Any chance GT could fix this permanently? Or give us an option or something?

FYI, I use payments, but I still want my links just sorted by Title.
Is it just me that wants to sort links by Title? because frankly this is a PITA. Wink

RGB World, Inc. - Software &amp; Web Development.
Subject Author Views Date
Thread Simple Sort by Title rgbworld 2962 Jul 16, 2006, 11:18 PM
Post Re: [rgbworld] Simple Sort by Title
eupos 2864 Jul 17, 2006, 12:08 AM
Post Re: [rgbworld] Simple Sort by Title
afinlr 2836 Jul 19, 2006, 11:04 AM
Post Re: [rgbworld] Simple Sort by Title
pugdog 2823 Jul 19, 2006, 7:47 PM