Download & Extend

sending abstracts inline to reviewers

Project:Conference
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I can't get download to work...either on my domain.com or my sub.domain.com site. One workaround would be to send the abstracts inline in the email that goes out to the reviewers. is there a relatively easy way to modify the module so that I can do this?

What might spike this is I used cck to create a custom content type so my field names are a bit odd...phpmyadmin shows them as field_abstract_value etc. etc.

The appropriate section of code is likely here:

  foreach( $variables as $key => $val ){
    switch( $key ){
      case 'pnid': // paper
$result = db_query("SELECT * FROM {files} WHERE nid = ".(int)$val);
$files = array();
while ($file = db_fetch_array($result))
  $files[] = file_create_url($file['filepath']);
$body = str_replace( '%download', implode("\n", $files), $body);

$node = db_fetch_array( db_query("SELECT * FROM {node} n WHERE n.nid = ".(int)$val ));
$subject = str_replace( $key = '%title', $val = $node['title'], $subject);
break; // and do the same replace in body
      case 'ruid': // reviewer
$papers = '';
$result = db_query("SELECT * FROM {conference} c LEFT JOIN {node} n ON n.nid = c.pnid WHERE c.ruid = ".(int)$val);
for ( $n = 1 ; $node = db_fetch_array($result) ; $n++ ) {
  $papers .= sprintf("%02d. %s\r\n", $n, $node['title']);
};
$body = str_replace('%papers', $papers, $body);
// drop thru: username replace as for author
      case 'puid': // author
        $user = user_load(array('uid' => $val));
        $email= $user->mail;
        $subject = str_replace( $key = '%username', $val = $user->name, $subject);
        break; // and do the same replace in body
      default: $key = '%'.$key; // decision, feedback (maybe others in future)
    }
    $body = str_replace( $key, $val, $body);   
  }
nobody click here