PageRank Widget

As of March 7th 2016, Google has removed the public PageRank metric completely. Google is no longer making this metric available to the public at all. See https://webmasters.stackexchange.com/a/92048.

A block showing the Google PageRank of the site (e.g. PageRank 3).

Optionally modify the widget color, rounded corners and other CSS values by enabling the Style (CSS) Settings module.

Two versions are available:
- A visually appealing widget, by default enabled in all themes that have a region 'footer'.
- A simple text version, by default disabled.

Optionally the widget can link to a third party service that displays the rank as well, making it more trustworthy for visitors. Any service can be used that takes a trailing domain to query in the URL. By default the service of domaintyper.com will be used. Feel free to add other services that look more or less clean.

Also tired of updating the year in the copyright notice after each New Year? Optionally a copyright notice gets appended that automatically updates to the current year.

Features

Customizable

Advantage over embedded third party PageRank code snippets is the possibility to change the color of the widget to fit your theme.

Optionally show the block for specific roles e.g. only the webmaster.

Lightweight

Most external scripts make a request on each page load. This module only once every 24 hours.

Configuration

Settings at 'admin/config/system/pr_widget'.

Optionally enable the copyright notice that auto updates to the current year, like:
© 2008-2013 www.example.com

Usage

Block configuration at '/admin/structure/block/manage/pr_widget/pr_widget_widget/configure' (widget) or at '/admin/structure/block/manage/pr_widget/pr_widget_text/configure' (text).

To use only a simple text, disable the 'PageRank Widget' block and enable
'PageRank text only'.

Customization

Just enable the Style (CSS) Settings module to have a section 'CSS variables' added on the settings page with extra options (e.g. widget color, rounded corners).

Troubleshooting

  • The PageRank gets refreshed every 24 hours or after saving the PageRank settings.
  • If the region ‘footer’ is not available in the used theme, the block should be enabled “manually”.
  • The module depends on the curl PHP extension which is present on most hosts, otherwise it produces a Fatal Error warning. Check on your site at admin/reports/status/php#module_curl.
  • For testing purpose a dedicated variable can be used as URL . Set it using Drush, e.g. with drush vset pr_widget_testurl 'https://www.drupal.org'. Don't forget drush vdel pr_widget_testurl after you're done.

D8

Fully functional. Tested on Drupal 8.0-alpha 4-6. No simple text version widget is offered, only the fancy one. Another difference with previous versions is that the block should be 'placed' first at admin/structure/block. A stable version will be released once a stable D8 gets released.

In the same series

The module UpTime Widget.

Cross browser tested

The HTML generated by this module has been tried on many different browsers and mobile devices using BrowserStack.

Project information

Releases