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

Glossar as language dictionary?

I am new to drupal.

Could the glossary modul be used to build up a language dictionary (german -english)?

Is there a way to import language- content?

TIA!

Touch screen module

Is anybody busy with or has anybody developed a touch-screen (as interface instead of keyboard and mouse) module?

sections.module and CVS HEAD (soon to be 4.7)

Can someone tell me if the functionality of the sections module will be incorporated in 4.7 core or will this modules still be needed for users needing to support multiple sections and themes? I've been playing with CVS HEAD for a few days and I see no obvious ways to accomplish it. Also, FYI for anyone wanting to try it, the sections.module does not currently work with HEAD.

How do I do a "group by" on a date in drupal

I am trying to do something like views by day using the accesslog table. So instead of the full "timestamp" with the time portion I want to just use the "date part" of the field timestamp in a group by ..... this sort of works but I don't think the days are really correct... using my log I get some for tomorrow...

Looking at code in modules I just don't really understand "date math" without using date fields...

adding image upload functionality to your module

A while back I was asking about how to easily incoporporate image.module functionality into a module.

I got it working and thought I would share it here in case anyone else is trying to do this. This solution requires under 50 lines of code and will ignore the image functionality if image.module is not enabled on the site.

Step 1. hook_form

Add this code into your hook_form function.

  // image form code
  if(function_exists('_image_check_settings')){
    _image_check_settings();
    $param['options'] = array("enctype" => "multipart/form-data");
    if (is_array($node->images)) {
      foreach ($node->images as $label => $image) {
        $output .= form_hidden('images]['.$label, $image);
      }
    }
    if ($node->images['thumbnail']) {
      $output.= form_item(t('Thumbnail'), image_display($node, 'thumbnail'));
    }
    $output .= form_file(t('Image'), 'image', 50, t('Click "Browse..." to select an image to upload.'), TRUE);
  }

Step 2. hook_insert

First, you will need to change hook_insert($node) to hook_insert(&$node). This is because image_validate acts on the $node object and if you do not import the reference to the actual $node object via the '&' prefix, these changes will be lost. After this change has been made, add this code:


// image insert code (remember that image.module acts on $node to create $node->images)

on creating new account during product purchase no email sent

Originally on installation of drupal 4.5 and ecommerce, purchasers must create a user account before purchasing a product. Originally, account creation worked including during an eccomerce transaction. Now when they attempt to do buy a product and create an account during that process, you get the error: 'Unable to send mail. Please contact the site admin. ' When I go just to create a new account without a transaction, I get the message like 'your account information has been sent to your email address...' but I check the account and no email is received.

Pages

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