Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Display the spider total links

Quote Reply
Display the spider total links
Hello

I want to display the total links indexed by spider on the front page.

any help

Bachir
http://www.wilayates.com

Quote Reply
Re: Display the spider total links In reply to
Hi,

To do this do go to your administration panel and find the Build->Template globals section.

Add a new code named something like, "num_links_spidered".

In the description Textarea add the following code

Code:
sub {
# returns number of spidered links
my $tbl = $DB->table('Spider_Links');
return $tbl->count();
}
And from there, in any of your templates, the tag <%num_links_spidered%> will be replaced by the number of links in your spider database.

Quote Reply
Re: Display the spider total links In reply to
Hello

When i add the tag <%num_links_spidered%> to the template this error displays:

Can't use string ("") as a subroutine ref while "strict refs" in use at ../Links.pm line 287.

ThanX

Bachir
http://www.wilayates.com