file

Create node programmatically with file

  1. <?php
  2.  
  3.   $node = new stdClass();
  4.   $node->type = 'photo';
  5.   node_object_prepare($node);
  6.    
  7.   $node->language = LANGUAGE_NONE;
  8.   $node->uid = $photo->client_id;
  9.   $node->name = $photo->client
MaxWesten's picture

Fix for Fix for Send MIMEMAIL with attachment from print module

  1. $attachments[] = array(
  2.   'filepath' => 'print/234',
  3.   'filemime' => 'text/html',
  4.   'filename' => 'test.html',
  5.   'list' => TRUE,
  6. );
  7. mimemail($settings['from'], $recipients, $subject, $body, FALS

Fix for Send MIMEMAIL with attachment from print module

  1. $attachments[] = array(
  2.   'filepath' => 'print/234',
  3.   'filemime' => 'text/html',
  4.   'filename' => 'test.html',
  5.   'list' => TRUE,
  6. );
  7. mimemail($settings['from'], $recipients, $subject, $body, FALS

Send MIMEMAIL with attachment from print module

  1. $file = new stdClass();
  2. $file->filename = 'test.html';
  3. $file->filepath =  'print/234';
  4. $file->filemime ='text/html';
  5. mimemail($settings['from'], $recipients, $subject, $body, FALSE, array(), che

Count rows in a large file

  1. /**
  2.  * Helper function to get the number of rows in a file. Excludes the first row
  3.  * which contains the column names.
  4.  *
  5.  * @param string $file

Migrating the ec_file module to Drupal 6

  1. A conversation with gordonh (lead developer of ecommerce) on irc to see about the possibility of migrating the file module to ec4 in D6, so that ec4 can sell file downloads.

Force PDF's to save or open without the plugin

  1. # Force PDF's to open without the plugin
  2. <FilesMatch "\.(?i:pdf)$">
  3.   ForceType application/pdf
  4.   Header set Content-Disposition attachment
  5. </FilesMatch>
Syndicate content