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

strange things happen with .flv files and file_check_upload()

Hej
Using Drupal v 4.7
I've hacked up the attachment module to work with a custom module that i've designed.
The overall goal is that this custom module is the only one which users can add content to, and that content consists of a few text fields and an uploaded file. I felt that the advantages of the filemanager module were worth keeping, so i borrowed the code from the attachment module that looked good.

Most of my work seems to be functioning very well; except with what goes on with the myNode_add().
This function gets called from within myNode_nodeapi() during the following check:

......
    case 'prepare':
      if (isset($_POST['edit']['attachments'])) {
        $node->attachments = $_POST['edit']['attachments'];
      }

      if ($_POST['fileop'] == t('Add')) {
        myNode_add($node);
      }
......

this leads to the following:

function myNode_add(&$node) {
  $file = file_check_upload('attachment_file');
  if (!$file) {
    form_set_error('attachment_file', t('No file, not appropriate.'));
    return $node;
  }
.....

This works fine with any file i try to add, except ones that end with .flv, which produce the error message "No file, not appropriate" . Even files without any extensions get added with no problem. I can't quite figure out why, and this is a problem because the content being uploaded with be video files, and we expect to use flv for most.

Orphaned advanced user module. Someone to take over.

Hiya,

I am unable to offer any support on the advanced user module ( http://drupal.org/project/advuser ) at present nor in the near future. There are a few bugs that have been reported on the module that if fixed will make the module handy for those working with large number of users. A few more sorting features can also be added.

Create CCK node in a module

Is there a way to create a CCK node programatically through another module? The CCK content type is already available, and all the required information for the fields are available.

Ideas?

Howto use a different subject than node in the url?

Hi,
I guess this topic has been posted before, but I could not find it while searching.
So, how could I write a module or edit the current node module so it does not say 'node' in the url. Example: ?q=node/1
I would like a url like ?q=articles/1
Or what would be even more terrific: a url like ?q=articles/title_of_article

Is it possible to do so with Drupal?
Currently I am using the 5.0 beta 1.

I've some PHP experience, so a link to a tutorial wouldn't harm me: )

Thank you

Reverse "Blog this" feature with xml-rpc

Is there a module that allows you to blog with Drupal to an external application, with xml-rpc? An example would be how you are able to "blog this" with Digg. It's like the reverse of blogapi: blogging from drupal to an external application.

Exposing data value of forms

I’m developing a module at the moment and would like to use the data generated on my from ie

$form['Team_details']["Teamname"] = array(
'#type' => 'select',
'#title' => t('Club'),
'#default_value' => $node->clubB,
'#options' => (array(‘one’,’two’,’three’)),
'#description' => '',
'#prefix' => '

',
'#suffix' => '

',

and place it in my load hook ie

Pages

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