This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Bulk node creation

Let's say my module defines a new node type. We'll call it TypeA.

drupal_mail text/html - text/plain

Hi all,

I am updating my module to drupal 5. every thing is working again except for the mailing part.

I send several html mails with this module, but the content type with the new mailing function drupal_mail does not change.

4.7

<?php
$header = "From: ".$mailto."\r\n" .
"Content-Type: text/html";
user_mail($to, $subject, $message, $header);
?>

sends a html mail

5.0

Newbie Questions

Is there a way to intergrate a pirep (pilot reporting) system into drupal as a module? Both are run a php/mysql and css base, each has a way to show members/pilots. With the pirep system it shows pilots, pilot hours and so forth. What I'd like to do is have the register portion on the main website register on the pirep system, member list would show the roster portion of the pirep system.

If anyone wants I can send them the system used. I didn't write it and I have no php experience other than modifing them for websites and such.

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.

Module to monitor disk/database/email usage for multisite setup

I spent a few hours last night looking for an online program that would monitor disk space in the multisites folders. I use cpanel with the whm site manager, and I have used that for a couple of years to manage the various sites I host. Now that I am using Drupal multisites, whm isn't able to monitor each individual site since they are all in the parent site's drupal folder.

What I am looking for is a module that will monitor disk usage of each of my clients. The three places I can think of that my clients will use space will be the "sites/theirdomain.com" folder, their email accounts, and the two databases I set up for each account: the main drupal database and the gallery2 database.

I have been playing around with some code, and I can now monitor the disk space in each of the "sites/theirdomain.com" folders, as well as their respective databases, then add them up for the total space used.

I have never used the imap functions before now- currently I'm able to list all the email accounts and their folders, but haven't gotten any size data pulled from them... I see numbers but they seem to be representing something other than size.

-----------------------------------

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??

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions