Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[ NEW PLUGIN ] GooglePR (Page Rank)

(Page 2 of 2)
> >
Quote Reply
Re: [Andy] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Thanks Andy, this one is much better but for some reason the list looks like:

Quote:
PR 0 - 14 links
PR 1 - 14 links
PR 2 - 14 links
PR 3 - 14 links
PR 4 - 14 links
PR 5 - 14 links
PR 6 - 14 links
PR 7 - 14 links
PR 8 - 14 links
PR 9 - 14 links
PR 10 - 14 links

which isn't true Smile

New ideas again? Cool
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
HI,

Whoops, had $_[0] instead of $i Tongue

Try this:

Code:
sub {

# GooglePR
my $tbl = $DB->table('Links');

my @counts;
for (my $i = 0; $i <= 10; $i++) {

my $count = $tbl->count( { GooglePR => $i } );
my $tmp;
$tmp->{PR} = $i;
$tmp->{Count} = $count;
push @counts, $tmp;
}

return { google_pr_counts => \@counts }

}

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Jipiii .. he he .. WinkCool

Finaly! Andy, you are genius!

Many thanks again.

BTW, the list looks now as:

Quote:
PR 0 - 14 links
PR 1 - 3 links
PR 2 - 6 links
PR 3 - 21 links
PR 4 - 52 links
PR 5 - 46 links
PR 6 - 40 links
PR 7 - 13 links
PR 8 - 7 links
PR 9 - 1 links
PR 10 - 1 links

Smile
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Glad it works <G> (3rd time lucky, huh? :P)

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
The plugin is really cool ..Cool

Just one little bug:

Quote:
<%get_google_pr_links%>
<%loop google_pr_counts%>
PR <%PR%>: <A HREF="http://www.website.com/cgi-bin/directory/search.cgi?GooglePR=<%PR%>"><%Count%> links</A><br />
<%endloop%>

It count NASA's page twice: Both as PR 10 and PR 1 on search.cgi page. Any suggestion?
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Can you PM me a URL, so I can see?

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
No problem ..
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

For anyone interested, it was just due to the way he was calling search.cgi, to get the listings :)

search.cgi?GooglePR=0

That was matching the "0" in "10". What he needed was:

search.cgi?GooglePR=0;GooglePR-opt==

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Here are results with search.cgi?GooglePR=10;GooglePR-opt==

PR 0: (wrong)

Quote:
Google PageRank:
PR 0: 14 links

Your search returned 0 categories and 13 links

PR 1: (right)

Quote:
Google PageRank:
PR 1: 3 links

Your search returned 0 categories and 3 links

PR 10: (right)

Quote:
Google PageRank:
PR 10: 1 links

Your search returned 0 categories and 1 link
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Mmm.. not really sure I'm afraid :/

Its something to do with the way the searches are done.

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Anyway, everything is much better - now it's only PR 0 wrong Crazy
Post deleted by katakombe In reply to
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Everything is OK!!

Quote:
PR 0: (wrong)


Quote:Google PageRank:
PR 0: 14 links

Your search returned 0 categories and 13 links

was wrong because there was 1 link awaiting validation with PR 0! Since I've deleted it, the result is right:

Quote:
PR 0: (right)


Quote:Google PageRank:
PR 0: 13 links

Your search returned 0 categories and 13 links

So Andy, thanks again for all your efforts - the plugin is superb! Smile

Last edited by:

katakombe: Aug 31, 2007, 10:24 AM
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Glad its working now <G>

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hm...one question.

When I count all PR links that number if different from total links in database...

UnReal Network
Quote Reply
Re: [deadroot] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Not sure what you mean?

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Andy wrote:
HI,

Whoops, had $_[0] instead of $i Tongue

Try this:

Code:
sub {

# GooglePR
my $tbl = $DB->table('Links');

my @counts;
for (my $i = 0; $i <= 10; $i++) {

my $count = $tbl->count( { GooglePR => $i } );
my $tmp;
$tmp->{PR} = $i;
$tmp->{Count} = $count;
push @counts, $tmp;
}

return { google_pr_counts => \@counts }

}

I'm using this global to display stats for pagerank links in my database.

Now, when I count all links with all PR (pr0+pr1+pr2+pr3+...+pr10), that number is different from total number of links in database.

UnReal Network
Quote Reply
Re: [deadroot] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

It will do =)

Remember, the GooglePR plugin is *only* called when someone goes to detailed.html, or link.html (can't remember where you have it setup). Therefore, if someone hasn't looked at a link, then the PR won't exist =)

Its not possible to have a script go through and just update all the DB entries either, cos Google have restrictions in place - so after a couple of thousands queries, you will get blocked (for excessive accessing of the PR tool)

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] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Oh, I see. Thanks for explanation.

UnReal Network
Quote Reply
Re: [Andy] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Version 1.3 is now available in the Members Area.

This one will store the PR for 2 days, until the next build (or page call)... and then it will re-grab the PR again.

This should help those with larger databases, or those who do a build more than once a day (as a customer was doing recently, thus the change to the plugin :))

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!
> >