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

Easy link to attachments

I just had a look through all the available modules and couldnt find any that did this easliy(i could have missed it, but i did look through them all)

Was just wondering if there was a module about that let you easily link to the desired attached content.

Moderate Comments like Digg

Hello, instead of having that button you have to press to moderate comments, I'm looking for a solution like Digg.com. It shows the drop down with each comment, and after choosing one of it's choices, the vote is entered without the need for page reload, and remains so it can be changed. My guess is that it is some sort of ajax solution. Thanks for any help!

TinyMCE doesn't work with firerfox 1.5 on os X

Any solutions. When i go into edit I lose all info

node_example.module and image.module

Hi,

I am trying to construct my own modules out of the node_example module. I want to be able to upload a couple of images together with this some other info.
I pasted all what seemed to be the necessary fuctions from the image.module. Everything works fine up to when it comes to showing the actual images. I think my error must be somewhere in the hook_load(). The original node_example loads data and returns it whereas the image.module loads defines in $node an image array. this works fine but when it comes to showing the images in hook_view() the images array is not defined.

Is there a way to return the image array together with the $additions in one object or alternatively what is going wrong that $node->images i undefined?

<?php

function node_example_load($node) {

// pasted from image.module
$result = db_query("SELECT filename, filepath FROM {files} WHERE nid=%d", $node->nid);
$node->images = array();
while ($file = db_fetch_object($result)) {
$node->images[$file->filename] = $file->filepath;
}
// special images
if (empty($node->images['thumbnail'])) {
$node->images['thumbnail'] = $node->images['_original'];
}
if (empty($node->images['preview'])) {
$node->images['preview'] = $node->images['_original'];
}

// node example module way of doing things
$additions = db_fetch_object(db_query('SELECT URLpath, URLpath2, quantity FROM {node_example} WHERE nid = %d', $node->nid));

Implementation of _user chokes on 'insert' - probably really simple error

Hi

I have implemented _user for my module to ask users a specific question and store the result in my own table. My form question shows up perfectly (I think - it looks correct anyway). My code chokes when I actually do the
registration and submit. It breaks on the database insert in the user module (not mine) but my insert must be
the problem. Here is my little _user:

function fhsstadmin_user($op, &$edit, &$user, $category = NULL)
{
  $books = _findbooks();  // return list of books 
  switch($op)
 {
    case 'register':
      $form['fhsstadmin-initialbook'] = array(
      '#type' => 'radios',
      '#title' => t('Choose the book you would like to start with:'),
      '#options' => $books);
   break;
   case 'insert':
     db_query("INSERT INTO fhsstadmin_userbooks (uid, bookparentid) VALUES (%d, %d)",$user->uid,$edit['fhsstadmin-initialbook']);
     $edit['fhsstadmin-initialbook'] = NULL;
   break;
 } // end switch
return $form;
}

I would really appreciate any advice. Its probably a trivial issue for an expert but I really can't see whats wrong and I think I've followed what is defined on: http://drupaldocs.org/api/head/function/hook_user

I have added the error message for completeness:

user error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0, pass, init, status, created, uid) VALUES ('fred', 'marknewlyn query: INSERT INTO users (name, mail, 0, pass, init, status, created, uid) VALUES ('fred', 'marknewlyn@gmail.com', '37693cfc748049e45d87b8c7d8b9aacd', '364aacd64f75ca82e0c373bc40500c6c', 'marknewlyn@gmail.com', '1', '1133714662', '13') in /var/www/fhsstadmin/includes/database.mysql.inc on line 108.

Taxonomy Access Control

Hi, just went to add the Taxonomy Access Control module and the README says to 'patch -p0 < taxonomy.patch'

So I ran it like this in /drupal/modules... patch -p0 < taxonomy_access/taxonomy.patch

and get these errors after typing in taxonomy.module for the file...

Pages

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