Are node variables (i.e. uid, nid) available to hook_exit?

I'm looking at the documentation for hook_exit, and the only parameter is $destination.

However the example code is:

function hook_exit($destination = NULL) {
  db_query('UPDATE {counter} SET hits = hits + 1 WHERE type = 1');
} 

I'm wondering how this query updates for the specific node? Or maybe it doesn't? But the statistics module definitely does.

I want to modify the statistic module, and I really want to get access to uid & nid for the current node. I can't find anywhere in the documentation what variables are available.

The statistics module hook_exit implementation is this:


function statistics_exit() {
global $user, $recent_activity;

drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);

if (variable_get('statistics_count_content_views', 0)) {
// We are counting content views.
if ((arg(0) == 'node') && is_numeric(arg(1)) && arg(2) == '') {
// A node has been viewed, so update the node's counters.
db_query('UPDATE {node_counter} SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = %d WHERE nid = %d', time(), arg(1));
// If we affected 0 rows, this is the first time viewing the node.
if (!db_affected_rows()) {
// We must create a new row to store counters for the new node.

warning: Division by zero in C:\apache2triad\htdocs\irp\includes\pager.inc on line 74.

I recently installed Favorite_nodes and changed the titles of everything. Once installed I keep receiving the following error:

warning: Division by zero in C:\apache2triad\htdocs\irp\includes\pager.inc on line 74.

anyone have any idea where this is arising from??

changing advanced search form

Hi. I'd like to be able to change the advanced search form that is displayed on the search results page. Specifically I would like to remove the "only of types" checkboxes from the form. But I would also like to know how to change this entire form in general. I don't think the _search related theme functions relate to this form do they?
Thanks.

images disappearing / using flexinode and also image attach -- help!

We use flexinode to post stories, I figure this has to do with IMCE though. IMCE had a security issue that I thought I fixed but maybe someone can tell me if this is the issue.

When the security thign came out I updated IMCE and the date on the changelog was 2006/08/29, tho I don't see any comments ab security issues. I just installed the newest from dev and it says 2006/10/19 and it does mention security fixes. I replaced what I had with this new build. Do you think that will fix the issue?

Jay

how do i display a table of data from a remote database?

hi everyone,

this is a dumb question, but what is the best way to create a page that has the results of a database query? i'm still new to drupal, so the whole hooks, blocks, nodes, modules, etc thing is still a bit hazy for me. if anyone can point me in the right direction, it would be much appreciated!

fyi, the remote database in question is DB2 running on an iSeries machine, which i'm assuming means i'll have to use the ibm adapter for db2. but for now, displaying data from my local mySql database would suffice.

thanks!

Using webform module data to send out monthly emails to webform database

I have set up the webform module [http://drupal.org/project/webform] and am hoping that I can configure it somehow to work as a form that users can fill out some contact info (name, email, address, age etc...) to enter a monthly contest and as a way to gather emails and data for a monthly email newsletter.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x