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

[ NEW PLUGIN ] GooglePR (Page Rank)

(Page 1 of 2)
> >
Quote Reply
[ NEW PLUGIN ] GooglePR (Page Rank)
GooglePR

This plugin gives you an easy way to show a "PR" (Page Rank) based on Google's ranking of the URL in question. This is a great way to show how good / popular a site is - as generally, sites with a high PR, are better sites / more popular / more linked to.

This plugin is part of both the ULTRA Package and ULTRA Package PRO deals.

PRICE: $30 [ details ]


Plugin Description :

This plugin gives you an easy way to show a "PR" (Page Rank) based on Google's ranking of the URL in question. This is a great way to show how good / popular a site is - as generally, sites with a high PR, are better sites / more popular / more linked to.
Plugin Requirements
  1. GLinks 3.0.4 + / LinksSQL 2.1.2 +
  2. WWW::Google::PageRank

Features:
  • You can show an image, with Google PR (Page Rank) for the given URL.
  • Easy to setup (just one bit of code)
  • If a URL is not listed in Google, they just see an image, but with the PR bit greyed out.
Screenshots:

You can view a couple of screenshots here: http://www.ultranerds.com/...rsion/GooglePR_L204/

As always, if you have any questions - please don't hesitate to ask.

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
Purchased Cool
Quote Reply
Re: [Andy] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi Andy,
very nice but I have a lot of links pointing to my own server, cause this links are downloads.
I don't want to slow down my site while the server is looking for page ranks which are not there...

Is there a way to use this plugin only in defined topcategories?
Thanks
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Quote:
Is there a way to use this plugin only in defined topcategories?

When you say top-categories, do you mean just categories like /Music or /Computers, but not Computers/Sub_Cat ?

If so, you could just use:

Code:
<%if Cat_Depth < 2%>
<%Plugins::GooglePR::Get_PR_For_Link($URL)%>
<%endif%>

Hope that helps.

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
Hi Andy,
I have four main categories with many subcategories,
only one of this four main categories (with its subcategories) has links inside for which I want to use google page rank.

Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

What is the name of the category you want to show the PR for?

Should be able to do it with:

Code:
<%if Full_Name contains "Category/You_Want/To_Show/"%>
<%Plugins::GooglePR::Get_PR_For_Link($URL)%>
<%endif%>

Hope that helps.

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
Thanks Andy,
I will give it a try.
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Andy] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
IMPORTANT NOTE!

Please note, you need the WWW::Google::PageRank Perl module installed for this plugin to work!

Its not a hard module to install, and your host should be able to do this for you.

If you are on a dedicated server, and have full root access, you could try it yourself in SSH (as root);

Code:
perl -MCPAN -e 'install WWW::Google::PageRank'

So far, 5 people have tried this plugin - and 4 of them have asked me what the following error means:

Quote:
Unable to load plugin: GooglePR (Can't locate WWW/Google/PageRank.pm in @INC

It simply mean's you don't have that module installed =)

Hope that helps anyone in the future.

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,
I contacted my host and he don't want to install it on a shared server :-(
Must be a very dangerous module :-)))
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Nope, not dangerous at all - he's probably just paranoid =)

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:
Nope, not dangerous at all - he's probably just paranoid =)

paranoid or lazy :-))

Matthias
gpaed.de
Quote Reply
Re: [Andy] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hello Andy!

Here it is - I have the same problem as Matthias70:

1.) My hosting company will not install WWW::Google::PageRank Perl module on the server.
2.) I can't install it my self because I haven't privileges to do that.

Now, ...

A.) They want me to copy WWW-Google-PageRank-0.13/lib/WWW/Google/PageRank.pm file in the directory where I want to use it (which one is that? mysite.com/cgi-bin/directory/admin ?)
B.) I need to include it by using "use PageRank" command in the file where I want to use it ?! Which file is that?

Can you be so kind to explain how I can use this plugin if I must install it as above? Line by line please.

Many thanks in advance.
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Mmm.. ok.

Well, the first step is to goto this page:

http://search.cpan.org/...W/Google/PageRank.pm

From there, you should see a link called "Source". In this example, its: http://search.cpan.org/...W/Google/PageRank.pm

Save this page as PageRank.pm

Then, in your admin folder, make a new set of directories, as follows:

/admin/WWW
/admin/WWW/Google

Then, upload the PageRank.pm file into the /admin/WWW/Google folder.

Hopefully, this should then work for you (assuming you have its dependencies installed, - i.e LWP::UserAgent and URI::Escape)

Hope that helps.

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
Hi Andy,
that was easy. Thanks for the explanation.
And the code below to show the pagerank in defined categories works perfect
Andy wrote:

Code:
<%if Full_Name contains "Category/You_Want/To_Show/"%>
<%Plugins::GooglePR::Get_PR_For_Link($URL)%>
<%endif%>

Thanks
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Glad it worked Smile

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
It works as a dream ... SmileCool

Thanks Andy.

P.S.

BTW, is there any chance of sorting/displaying total number of registered sites with their PR on the main page? Kind of PR10=0; PR9=0; PR8=1; PR7=6; etc.
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Glad its working :)

I'll have a look into your suggestion. It would require a new field to be added to the Links table - say LinkPR, and then when the plugin is called, it updates the PR for that site.

Then, it would be possible to write a little global to get the listings with PR 10, PR 9 etc.

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

I'm looking forward to hear from you regarding this little "enhancement" of your PR plugin Smile

Have a great day ..
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

I've updated the plugin, to version 1.1.

This now logs the PR of a link, in the new GooglePR field (in the Links table)

Please note, you need to update your template in link.html, so it looks like this now:

Code:
<%Plugins::GooglePR::Get_PR_For_Link($URL,$ID)%>

Now, if you want to show a list of links that have a PR 10, you could add this global.

Lets call it: get_google_pr_links

The code is:

Code:
sub {

# GooglePR
my $tbl = $DB->table('Links');
$tbl->select_options("ORDER BY Title");

my $sth = $tbl->select( { GooglePR => $_[0] } ) || die $GT::SQL::error;

my @links;
while (my $hit = $sth->fetchrow_hashref) {
push @links, $hit;
}

return { google_pr_links => \@links }

}

Then, call with:

Code:
<%get_google_pr_links('10')%>

You can then "loop" through these links, with:

Code:
<%if google_pr_links%>
<%loop google_pr_links%>
<%include link.html%>
<%endloop%>
<%endif%>

If you wanted to show just the PR 8 links, you would just use:

Code:
<%get_google_pr_links('8')%>

Hope thats what you're after =)

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

That was a quick response! Thanks.

Now, I've installed your new plugin but I can't get it to work properly - it will not list any "list" as you described in your post above.

Anyhow, I'd like to have a small and simple list as follows:

Number of websites in the directory by their PageRank (or some similar text):

PR10=0
PR9=0
PR8=3
PR7=9
PR6=21
PR5=55
PR4=84
PR3=170
PR2=60
PR1=25

let's say on include_left.html through the whole directory. Is that possible and how?

BR

--------------------------

One more thing I've noticed - with the plugin installed, when I click on "Build Changed" link in my admin it rebuild the whole time 20-30 links. If I uninstall it, that stops? Strange, isn't it?

Last edited by:

katakombe: Aug 29, 2007, 11:12 AM
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hi,

Try this (still call it get_google_pr_links):

Code:
sub {

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

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

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

return { google_pr_counts => \@counts }

}

Then use this template code:

Code:
<%get_google_pr_links%>
<%loop google_pr_counts%>
PR <%PR%> - <%Count%> links <br />
<%endloop%>

Hope that helps.

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!

Last edited by:

Andy: Aug 30, 2007, 7:46 AM
Quote Reply
Re: [Andy] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Hello Andy!

Thanks, but there is an error:

Quote:
Unable to compile 'get_google_pr_links': syntax error at (eval 33) line 7, at EOF Can't use global @_ in "my" at (eval 33) line 9, near "=> $_" Unmatched right curly bracket at (eval 33) line 14, at end of line Unmatched right curly bracket at (eval 33) line 18, at end of line

Any idea?
Quote Reply
Re: [katakombe] [ NEW PLUGIN ] GooglePR (Page Rank) In reply to
Ooops, please try the modified version above. I was missing a ; at the end of one of the lines =)

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
It's like this now:

Quote:
Unable to compile 'get_google_pr_links': syntax error at (eval 32) line 7, at EOF Can't use global @_ in "my" at (eval 32) line 9, near "=> $_" Unmatched right curly bracket at (eval 32) line 14, at end of line Unmatched right curly bracket at (eval 32) line 18, at end of line

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

Sorry, serves me right trying to write that early this morning, when I'd only been up 30 minutes =)

Please try the modified version (hopefully this one will work Tongue)

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!

Last edited by:

Andy: Jan 2, 2010, 4:08 AM
> >