Closed (won't fix)
Project:
Link
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2010 at 15:32 UTC
Updated:
6 Nov 2014 at 05:24 UTC
Jump to comment: Most recent
Comments
Comment #1
daniel wentsch commentedI was looking for something similar and decided to go with Computed Field module (http://drupal.org/project/computed_field).
This allows me to run some PHP code on the content of a field (ie the value provided for link field). So I took the functions of sitestats that are needed to return the page rank, put them inside my template.php and call them inside my computed field, passing the entered URL as an argument for _sitestats_getpagerank().
If a node gets edited and saved, calculated field code will run again and thus update the pagerank.
So what I did step by step:
- installed computed field module
- add a link field to my content type
- add a computed field afterwards, calculated code being:
$node_field[0]['value'] = _sitestats_getpagerank($node->field_pagerank_link[0]['url']);- took all the functions from sitestats.inc and put them into my template PHP (I'll figure out which can be removed later, but I'm planning to make use of alexa, too.)
Works fine for me, maybe this will help you.
Comment #2
jcfiala commentedIt's been four years since this bug, and no one's touched it. If you need to you can re-open this ticket, but I suspect you don't need this fixed anymore.