show pr of current site on status page

deekayen - June 21, 2008 - 21:57
Project:Google PageRank
Version:5.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Using hook_requirements(), the underlying structure is there to show the pagerank of the current site on the status report page at admin/logs/status.

<?php
/**
* Implementation of hook_requirements().
*
* Show the pagerank of the current site in the status report.
*/
function google_pr_requirements($phase) {
 
$requirements = array();
 
$t = get_t();
  if (
$phase == 'runtime') {
   
$pr = google_pr_get(url('<front>', NULL, NULL, TRUE));
   
$requirements['google_pr_rank'] = array(
     
'title' => $t('Google Pagerank'),
     
'value' => $pr,
     
'severity' => REQUIREMENT_INFO
   
);
  }
  return
$requirements;
}
?>

#1

deekayen - July 21, 2008 - 14:41
Status:needs review» fixed

added in CVS revision 1.1.4.3

#2

Anonymous (not verified) - August 4, 2008 - 14:42
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.