Changeset 2015524
- Timestamp:
- 01/19/2019 07:56:59 PM (7 years ago)
- Location:
- zotero-notes/trunk
- Files:
-
- 5 edited
-
class.zotero-notes-citation.php (modified) (1 diff)
-
class.zotero-notes-dataCollector.php (modified) (3 diffs)
-
class.zotero-notes-referencesList.php (modified) (1 diff)
-
css/plugin.css (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zotero-notes/trunk/class.zotero-notes-citation.php
r2008431 r2015524 209 209 if ( isset($this->_editor) ) { 210 210 $html .= ", ".__('on','zotero-notes')." <i>".$this->_editor."</i>"; 211 } 211 } 212 212 213 213 /** -
zotero-notes/trunk/class.zotero-notes-dataCollector.php
r2008431 r2015524 103 103 104 104 /** 105 * Parses Citoid JSON and extracts data. 106 * 107 * title 108 * date 109 * DOI 110 * url 111 * accessDate 112 * notes[] 113 * tags[] 114 * creators[] 115 * firstName 116 * lastName 117 * creatorType 118 * itemType 119 * language 120 * 105 * Parses JSON and extracts data. 106 * 121 107 * @param $json JSON to parse 122 108 * @return metadata … … 132 118 $zotero_data = $zotero_api_response["data"]; 133 119 $zotero_meta = $zotero_api_response["meta"]; 134 120 135 121 /** 136 122 * Here, $zotero_api_response contains a lot of tags with information. … … 165 151 $this->_readon = $zotero_data["accessDate"]; 166 152 167 // Publisher/editor 168 $this->_editor = $zotero_data["publisher"]; 169 170 return true; 153 // Publisher/editor, depending on media type 154 $itemType = $zotero_data["itemType"]; 155 if (strcmp($itemType, "newspaperArticle") == 0) { 156 $this->_editor = $zotero_data["libraryCatalog"]; 157 } else if (strcmp($itemType, "blogPost") == 0) { 158 $this->_editor = $zotero_data["blogTitle"]; 159 } else if (strcmp($itemType, "webpage") == 0) { 160 $this->_editor = $zotero_data["websiteTitle"]; 161 } else { 162 $this->_editor = $zotero_data["publisher"]; 163 } 164 171 165 } 172 166 -
zotero-notes/trunk/class.zotero-notes-referencesList.php
r2008431 r2015524 124 124 ob_start(); 125 125 $current_reference = $this->handle_reference( new Zotero_Notes_Citation( $atts, $content ) ); 126 $res = "<sup style='font-size:8px;vertical-align:super' id='note-" . $current_reference->get_anchor() . "'>";127 $res .= "<a href='#zotero-ref-p" . $current_reference->get_post_id() . "-r" . $current_reference->get_ref_num() . "'>[" . $current_reference->get_ref_num() . "]</a></sup>";126 $res = "<sup class='sup-ref-note' id='note-" . $current_reference->get_anchor() . "'>"; 127 $res .= "<a class='sup-ref-note' href='#zotero-ref-p" . $current_reference->get_post_id() . "-r" . $current_reference->get_ref_num() . "'>[" . $current_reference->get_ref_num() . "]</a></sup>"; 128 128 print( $res ); 129 129 -
zotero-notes/trunk/css/plugin.css
r2008431 r2015524 26 26 } 27 27 28 .sup-ref-note { 29 font-size:8px; 30 border: none; 31 } 28 32 33 a.sup-ref-note { 34 text-decoration: none; 35 border: none; 36 } 37 -
zotero-notes/trunk/readme.txt
r2008496 r2015524 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 9 10 This plugin adds references and citations functionalities (in a wikipedia-like style) from a Zotero library (you need a Zotero account to use this plugin).10 This plugin adds references and citations functionalities (in a wikipedia-like style) from a Zotero account. 11 11 12 12 == Description ==
Note: See TracChangeset
for help on using the changeset viewer.