瀏覽代碼

Added support for another citation type

Stephen Ficklin 11 年之前
父節點
當前提交
54c02daad2
共有 1 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      tripal_pub/api/tripal_pub.api.inc

+ 21 - 0
tripal_pub/api/tripal_pub.api.inc

@@ -1197,6 +1197,10 @@ function tripal_pub_create_citation($pub) {
         $pub_type = $ptype;
         break;
       }
+      else if ($ptype == "Research Support, Non-U.S. Gov't") {
+        $pub_type = $ptype; 
+        break;
+      }
     }
     if (!$pub_type) {
       watchdog('tripal_pub', "Cannot generate citation for publication type: %types", 
@@ -1249,6 +1253,23 @@ function tripal_pub_create_citation($pub) {
     $citation .= '.';
   }
   //----------------------
+  // Research Support, Non-U.S. Gov't
+  //----------------------
+  elseif ($pub_type == "Research Support, Non-U.S. Gov't") {
+    $citation = $pub['Authors'] . '. ' . $pub['Title'] .  '. ';
+  
+    if ($pub['Journal Name']) {
+      $citation .= $pub['Journal Name'] . '. ';
+    }
+    if ($pub['Publication Date']) {
+      $citation .= $pub['Publication Date'];
+    }
+    elseif ($pub['Year']) {
+      $citation .= $pub['Year'];
+    }    
+    $citation .= '.';
+  }
+  //----------------------
   // Letter
   //----------------------
   elseif ($pub_type == 'Letter') {