I'm (trying) to work on my own PPC Plugin for Links SQL. So far its going pretty well, however I have come accross a problem as to how I am going to format it.
I thought I could get away with adding Bid DESC in the category sort varable, but that still shows up bidding links, even if their account has no credit. What I was thinking now, is to write a new search script, based on the Search.pm code by GT, and then modify it to specify the PPC results. The problem is...I don't see how!
$args->{callback} = \&_cat_search_subcat if ($args->{catid});
my $orig_sb = $args->{sb};
my $orig_so = $args->{so};
$args->{sb} = $CFG->{build_sort_order_search_cat};
$args->{so} = '';
$filter and $args->{sb} =~ s/score//;
my $cat_sth = $categories->query_sth ($args) unless ($filter);
my $cat_count = $filter ? 0 : $categories->hits();
$args->{callback} = \&_search_subcat if ($args->{catid});
$args->{sb} = $orig_sb ? $orig_sb : $CFG->{build_sort_order_search} || '';
$args->{so} = (defined $orig_so and $orig_so =~ /^(asc|desc)$/i) ? $1 : 'ASC';
$filter and $args->{sb} =~ s/score//;
my $link_sth = $links->query_sth ($args);
my $link_count = $links->hits;
Where exactly would I define it to search for only links with credit in links_Users, and also a bid registered in links_Links.
Any help is welcome...I'll just keep playing, and hope I get somewhere
Cheers
I thought I could get away with adding Bid DESC in the category sort varable, but that still shows up bidding links, even if their account has no credit. What I was thinking now, is to write a new search script, based on the Search.pm code by GT, and then modify it to specify the PPC results. The problem is...I don't see how!
Code:
# Then do the search. $args->{callback} = \&_cat_search_subcat if ($args->{catid});
my $orig_sb = $args->{sb};
my $orig_so = $args->{so};
$args->{sb} = $CFG->{build_sort_order_search_cat};
$args->{so} = '';
$filter and $args->{sb} =~ s/score//;
my $cat_sth = $categories->query_sth ($args) unless ($filter);
my $cat_count = $filter ? 0 : $categories->hits();
$args->{callback} = \&_search_subcat if ($args->{catid});
$args->{sb} = $orig_sb ? $orig_sb : $CFG->{build_sort_order_search} || '';
$args->{so} = (defined $orig_so and $orig_so =~ /^(asc|desc)$/i) ? $1 : 'ASC';
$filter and $args->{sb} =~ s/score//;
my $link_sth = $links->query_sth ($args);
my $link_count = $links->hits;
Where exactly would I define it to search for only links with credit in links_Users, and also a bid registered in links_Links.
Any help is welcome...I'll just keep playing, and hope I get somewhere
Cheers