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

Extended User Attributes

Hi All

I'm had a search through the modules/forums and I hope I'm not missing something.

Can anyone help point me the right way to extend the user attributes? I'd like to capture more info when a user registers e.g Hobbies, Age, more exact location....... what's the best way to go about this? Write a module or re-write drupal?

thanks
Simon

Music module!

I needed to upload/download and play mp3 files on my site so I made a music module, it's still a bit buggy but overal it works good, I used the getid3 project to enable reading id3v2 tags, it disabled rewriting tags, because it was returning just to many errors at this time. Apart from storing the id3v2 info in the file, it's also stored in the db in a seperate table. Anyway i've been using it for some time now on my site and it's doing what it's supposed to except for the download feature. I just noticed a few days ago, that when a user is not logged in some files can be downloaded and some can't and return a '500 Internal Server Error'. Here's the code I use in for the download hook:

  switch (arg(1)) {
    case "download":
      $node = node_load(array("nid" => arg(2)));
      header("Expires: ". gmdate("D, d M Y H:i:s") ." GMT");
      header("Content-Type: audio/mpeg");
      header("Content-Length: ". $node->filesize);
      header("Content-Disposition: attachment; filename=" .$node->filename);
      readfile(variable_get("music_files_dir", "music_files/") ."musicfile_$node->nid.mp3");
      db_query("UPDATE {music} SET downloads = downloads + 1 WHERE nid = $node->nid");
      break;
  }

I suspect it probably has something to do with drupal caching these pages, because while logged in there's no problem at all.
If anyone can has any idea how I should handle this or how I can disable the caching for these pages, please let me know.

Blog this! module

I created a module to add a Blog this! bookmarklet to the user pages for Drupal 4.5. It is available for download here.

I have a few questions to ask the Drupal devs or more experienced module programmers:

New flexinode field type for page type select PLEASE?

Jonbob can you please let me know if you can set up a new flexinode field type similar to this nodeselect one for pages.
That is I need a select field that allows you to choose from a drop down list an item of "page_type = flexinode_pagetype"

1. So lets say we have added a flexinode called textbooks and added 5 books of that type of flexinode page
2. Now we want to add another flexinode called courses.
3. In the courses flexinode you now want to add a new field (just like you would add a text line field or textarea field) but it will be a new field type (one you will have to write jonbob) called something like 'page type select'
4. Page Type Select : will allow you to list (dynamically when the form is shown and you hit the drop down list - or before) all of the page types (textbooks in this example) that you specify.
5. This will be similar, but not the same as, the categories check box that says what page types to apply the category to. I dont think you will be able to use the categories for this, as you want to be able to list the text books down the page, but I guess you may want to use categories as it may(or may not) simplify things.
6. When adding a new Course (2 above) page, you will have a choice of selecting one of the textbooks that get listed in the drop down select menu. This may also be a multi-select so that you could choose more than one textbook for a course.

How to show as inline image one of the node attached image

Is there a way to show as inline image in body or teaser of a Drupal 4.5 node one files uploaded to that node ?
My idea is simple, I would like a user to upload the files (images or not) that are related to that node, and then he should be able to specify a tag (with a proper syntax - e.g. [inline: filename]) in the body of the node, which will be substituted by the proper img tag.

auction.module in 4.4.0...does ANYONE know?

Hello all,
I spent the the day going through all the new and old auction.module's. I like the ecommerce package a great deal. My problem, I have not migrated to 4.5.0, although I do have 4.5.0 up and running on another system. I love 4.4.0 and I'm not so keen on tabs...yet. Anyway, I have thoroughly gone through the cvs archives and various sandboxes looking for an auction module that will work on 4.4.0. For example, in the ecommerce suite of modules, in the contrib folder, lives the auction module. It was first released almost three weeks ago...it will not work with 4.4.0. This auction module requires the product.module that is included in the ecommerce suite in order to run. I found older versions of the product.module in the cvs archive. I searched for a date on the module that was before 4.4.0s release, found one, installed it, and it worked. The auction module did not. Is there ANY way to make this auction module work with 4.4.0? I know the hooks are different, but it's still drupal. Any suggestions?

Also, I found another auction.module that was stand-alone(not requiring another module to work as in my previous example), supported images, written at a time 4.4.0 should be able to use it. It was written by 'tlodge' and I think, not to certain though, taken over by 'uwe'. Anyhow, it didn't work. I fiddled around and got half of it installed...I think, but I don't know how big it really is. I successfully installed the section dealing with image size and email to the buyers and sellers. Yet, and I have REALLY TRIED, I can't get any menu links or access to any other part of the module. Does anyone have any sugestions or know how this module works? I think this module has much promise, although the author called it 'alpha alpha'. Any suggestions are welcome.

Pages

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