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

Passing $category to profile.module

Hello,

I'm trying to alter the profile.module to spit out appropriate fields based on a profile category. In this case, i will be using the new audio.module to include a mp3 player into profiles of the category "band". I need to establish the category during registration, and I am stuck on one portion of the user.module code that I don't quite understand.

nodewords - title in meta description

How can i put the title of a node in the meta description?

I know that i can wrote the title in the teaser part but this isnt a good solution because there is already a headline. The title should displayed in the meta description. Any ideas where i can do this? In the theme or in the module (which line?!) ?

I am using drupal 4.62 and the latest nodwordsmodule.

Thank you very much

is hook_nodeapi properly called upon update?

I am making a module using hook_nodeapi.
When I try to echo debug info for operations "update" or "insert", nothing outputs for any node type. So I wonder whether this hook is being properly called upon update & insert of a node. I can echo debug info properly for other operations ("settings", "validate" printing OK). Code:

Direct Posting to MySQL database

HI, I am fairly new to Drupal but have installed several dozen sites, and just recently have come up with the need to bulk import entries to a flexinode. I remember reading that there are some problems with directly entering posts to the MySQL database. Is this possible to do.

I tried using the Node_Import module but have not be able to get it to work. I point it to the CSV file and click Import, the page refreshes but no data is imported. Perhaps I have missed some setting for it.

Fatal error : Can't open file: 'variable.MYI'. query...

Hi,

I have problem with Drupal 4.6.2 (Linux system : Ubuntu 5.04).

I can't write any content on my drupal website, neither login nor logout fron the drupal. I can't see any content or do anything.

I've got this message :

Fatal error: Can't open file: 'variable.MYI'. (errno: 145) query: SELECT * FROM variable in
/var/www/drupal462/includes/database.mysql.inc on line 66

I was working on my drupal website (on local), suddently everything is blocked. I stopped the system by using the power button. I couldn't restart the system. Then, I try again and the system asked me to do this :

mount -n -o remount, rw /

then, the system asked me to lauch fsck to clear problem on i_blocks and inode. I said yes to valide.

Some inodes and blocks are deleted. After that I restart the system and that works.

I launched the drupal website and this message appears :

user error: Can't open file: 'variable.MYI'. (errno: 145)
query: SELECT * FROM variable WHERE name like 'event_nodeapi_%' in /var/www/drupal462/includes/database.mysql.inc on line 66.

I can't create content and anything else on my website. This message appears :

Fatal error: Can't open file: 'variable.MYI'. (errno: 145) query: SELECT * FROM variable in /var/www/drupal462/includes/database.mysql.inc on line 66

AJAX form_autocomplete problems (CVS)

Hi,

I'm having some problem with AJAX form_autocomplete functionality from the CVS build.

When I navigate to my page with the form_autocomplete it works fine! But when I navigate to another page and again to the one with the form_automplete it doen't work anymore... The form_autocomplete field keeps loading and loading. Looks like a infinitive loop.

I've put in the code I'm using.
The form_autocomplete functionality is great but it doesn't look stable. Any help welcome.

Regards,
Marcel


<?php
// $Id$

/**
* Implementation of hook_help().
*/
function email_help($section='') {
$output = '';
switch ($section) {
case 'admin/modules#description':
$output = t('Allows messages to be send between users.');
break;
}
return $output;
} // function email_help

/**
* Implementation of hook_perm().
*/
function email_perm() {
return array('read messages', 'send messages');
} // function email_perm

/**
* Implementation of hook_menu().
*/
function email_menu($may_cache) {
global $user;

$read_messages = user_access('read messages' );
$send_messages = user_access('send messages' );

$items = array();
if ($may_cache) {
$items[] = array('path' => 'email/recipient_autocomplete',
'title' => t('email recipient autocomplete'),
'callback' => '_email_recipient_autocomplete',
'access' => $send_messages,
'type' => MENU_CALLBACK);
}
else {
$items[] = array('path' => 'email',
'title' => t('email') . ' (' . (int)_email_get_unread_messages() . ')',
'callback' => '_email_inbox',
'access' => $read_messages || $send_messages,
'type' => MENU_NORMAL_ITEM);
$items[] = array('path' => 'email/compose_message',
'title' => t('compose message'),
'callback' => '_email_compose_message',
'access' => $send_messages,
'type' => MENU_NORMAL_ITEM,
'weight' => 1);
$items[] = array('path' => 'email/inbox',
'title' => t('inbox'),
'callback' => '_email_inbox',
'access' => $read_messages,
'type' => MENU_NORMAL_ITEM,
'weight' => 2);
}
return $items;
} // function email_menu

/**
* Helper function for autocompletion
*/
function _email_recipient_autocomplete($string) {
$matches = array();
$sql = 'SELECT name ' .
'FROM {users} ' .
'WHERE LOWER(name) LIKE LOWER("%%%s%%") ' .
'AND status = 1';
$result = db_query_range($sql, $string, 0, 10);
while ($user = db_fetch_object($result)) {
$matches[$user->name] = check_plain($user->name);
}
print drupal_implode_autocomplete($matches);
exit();
} // _email_user_autocomplete

function _email_get_unread_messages($uid = 0) {
// return 3 while not implemented.
return 3;
} // function _email_get_unread_messages

function _email_compose_message() {
$output .= '

Compose Message

Pages

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