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

User Searchable User List (development)

USER SEARCHABLE USER LIST:
I am still fairly new to Drupal but after some thought and initial reading of API's and modules etc. I thought I'd throw in my thoughts and see if anything bounces back (as it is very slow going from the ground up on my own!).

Currently it is possible to view a list of users (details) according to role.
I wish to create a new search/reporting facility that produces sub-sets of this list.
If my ideas rework existing code or are way off base for some reason then please feel free to point in the right direction.

My approach is to be in two phases (unless someone decides to help accelerate it. I need to have phase 1 by end of this month; phase two is the nicer way to do it, but consider phase 1 proof of concept):

Phase One
Phase 1 will
i) create a simple form for user input that lists the available profile fields for the search. This will only be avilable to members of the site (rid>0), and will allow selection of the criteria (from list or checkbox according to the profile_field type)

ii) on form submission the selection criteria will be used to form the data query before calling the function to produce the list of users
OR (if easier/possible for phase 1 )
use an overide of whatever the function is to 'display users list' and only display a user IF all search profile_field values = listing-user-profile_field values.

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.

Pages

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