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

how do i use pathauto for taxonomy_menu?

i've created a taxonomy_menu from my taxonomy/term. but i found the pathauto module only auto generates alias for taxonomy/term, but not for taxonomy_menu. anyone knows if it works for taxonomy_menu at all? do i have to manually do the alias?
thanks,
erick

File upload handling: temp files

A question, which should eventually be appended to http://drupal.org/node/117054.

In the MySite Icon module (part of http://drupal.org/project/mysite -- available in HEAD), I allow administrators to upload image files.

My understanding is that the file uploads are written to the /tmp directory by the FormsAPI and then validated. For instance, I run this code, taken from user.module, to ensure that the upload is in fact an image:

  // Check that uploaded file is an image
  $info = image_get_info($file->filepath);
  if (!$info || !$info['extension']) {
    form_set_error('icon', t('The uploaded file was not an image.'));
  }

If this succeeds, I then move the file into the proper /files directory.

My naive question: If the $info check fails, do I need to expressly delete the file from the /tmp directory, or does that happen automatically as part of the upload process?

For reference, here's the entire validation function:

<?php
function mysite_icon_validate_picture($file, &$form_values, $form_element = 'icon') {
// get the size restrictions
list($maxwidth, $maxheight) = explode('x', variable_get('mysite_icon_dimensions', '120x60'));
$size = variable_get('mysite_icon_file_size', 32);

// Check that uploaded file is an image
$info = image_get_info($file->filepath);
if (!$info || !$info['extension']) {

LDAP groups -> Drupal Role: Problem with “groups of groups”

I’m about to complete successfully the installation of Drupal. I’m using it with a Windows 2000 server Active Directory and also the LDAP integration, groups & data module. All modules run correctly and the Drupal’s roles mapping for LDAP groups too but I’ve a problem with persons who are in a LDAP “group of group”: I’m using the group A and the group B from Active Directory, then I map those groups to Drupal’s roles A & B : No problem ! But if a person is in a group C, who is in the group B (or A) no group is assigned to this user...

Looking for some 'location' module that does this :

Hi,

I am looking for a module that :

Allows registered users to fill in a form on wich they :

1. registered users
enter they're location details (hidden to anonymous)
enter extra options : telephone number, services they provide etc
define a working area (example : 10Km (around they're home))

Ming and Drupal

Hi all

I'm developing all my modules on my own test server. This server has Ming support:
http://ming.sourceforge.net/

Has anyone coded a module successfuly using the Ming library?

Could I maybe see some example code? (Not Ming PHP Code) But module code itself.

Becasue it seems everytime I want to use the functions within Drupal something breaks...

Image upload/cropper

Hi all,

Pages

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