By Shiny on
I have a simple-ish module that creates node from a flickr stream, and then rechecks from the flickr api up to every 48 hours.
I just upgraded to drupal 4.7, and now it seems that the hook_view is not being called anymore....
I've disabled the module, and enable it again
i'm lost as to what to look at next.
Has the hook changed??
any help is greatly appreciated
my module file is flickrphoto.module
Here's my hook, that's not being called.
/**
* Implementation of hook_view().
*/
function flickrphoto_view(&$node, $teaser = FALSE, $page = FALSE) {
if ($page) {
//Refetch code goes here
$sql = "SELECT * from {flickr_photo} where nid = %d and lastfetched < CURRENT_TIMESTAMP - '48 hours'::interval";
$sql .= " LIMIT 1";
$result = db_query($sql, $node->nid);
if ($result and pg_numrows($result)) {
$fp = pg_fetch_object($result);
flickrPhotoNodeRefresh($fp->photo, $node);
}
}
$node = node_prepare($node, $teaser);
}
Comments
hook_node_info?
I'm not sure why the hook isn't getting called, but I'm also wondering if you should use hook_load rather than hook_view for this?
Do you have the function hook_node_info() defined? I think the function name may have changed from 4.6:
http://api.drupal.org/api/HEAD/function/hook_node_info
---
Work: BioRAFT
The same thing happens to me
Me neither can get the hook_view to run.
Can any module implement this hook or must it be a module implementing a node type?
Only a module implementing a
Only a module implementing a node type. All other modules use hook_nodeapi()
---
Work: BioRAFT