Gossamer Forum
Home : Products : Gossamer Links : Discussions :

links waiting for validation

Quote Reply
links waiting for validation
In LSQL, admin panel shows this :

Build All
Validate Links
Validate Reviews




I would like to add a subroutine to display this :

Build All
Validate Links (2)
Validate Reviews (0)




I don't get it with the sub function calls.

I created a new global :

sub {
# Displays number of validations waiting.
my $test = Links::Tools::validate_links();
my $count = $test->$total;
return $count;
}

It does not work. Any simple solution ?

Mitia
Quote Reply
Re: [mitiamitia] links waiting for validation In reply to
You would need to add a new bit of code into the actual admin modules. The code looks fine, but its finding the place where the 'Validate' etc links are generated.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] links waiting for validation In reply to
Here's the original function

sub validate_links {
# ------------------------------------------------------------------
# Display a list of links waiting to be validated.
#
my $db = $DB->table ('Links');
my $cat_link = $DB->table ('CatLinks');
my $user_db = $DB->table ('Users');
my $html = $DB->html ( $db, $IN );
my $font = 'font face="Tahoma,Arial,Helvetica" size="2"';
my $nh = $IN->param('nh') || 1;
my $mh = $IN->param('mh') || 5;

# Process any actions.
my $results = _validate ($db);

# Clear our cgi so we don't cause conflicts.
$html->{input} = {};

# Get a list of links awaiting validation.
my $sth = $db->query_sth ( {
isValidated => 'No',
mh => $mh,
nh => $nh,
sb => 'Add_Date',
so => 'DESC'
});
my $total = $db->hits;
my $i = 0;

So I'm trying to get to this $total variable (it already exists in the function) but it does not come out.

Mitia
Quote Reply
Re: [mitiamitia] links waiting for validation In reply to
I think you will find you are looking in the wrong area. That appears to be a list option, rather than the actual 'menu' codes that appear to the left of the page.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!