Plugin Directory

Changeset 2015524


Ignore:
Timestamp:
01/19/2019 07:56:59 PM (7 years ago)
Author:
janiko
Message:

cosmetic

Location:
zotero-notes/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • zotero-notes/trunk/class.zotero-notes-citation.php

    r2008431 r2015524  
    209209            if ( isset($this->_editor) ) {
    210210                $html .= ", ".__('on','zotero-notes')." <i>".$this->_editor."</i>";
    211             }
     211            } 
    212212           
    213213            /**
  • zotero-notes/trunk/class.zotero-notes-dataCollector.php

    r2008431 r2015524  
    103103
    104104    /**
    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     *
    121107     * @param $json    JSON to parse
    122108     * @return metadata
     
    132118        $zotero_data = $zotero_api_response["data"];
    133119        $zotero_meta = $zotero_api_response["meta"];
    134        
     120
    135121        /**
    136122         * Here, $zotero_api_response contains a lot of tags with information.
     
    165151        $this->_readon = $zotero_data["accessDate"];
    166152
    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
    171165    }
    172166   
  • zotero-notes/trunk/class.zotero-notes-referencesList.php

    r2008431 r2015524  
    124124        ob_start();
    125125        $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>";
    128128        print( $res );
    129129
  • zotero-notes/trunk/css/plugin.css

    r2008431 r2015524  
    2626}
    2727
     28.sup-ref-note {
     29    font-size:8px;
     30    border: none;
     31}
    2832
     33a.sup-ref-note {
     34    text-decoration: none;
     35    border: none;
     36}
     37
  • zotero-notes/trunk/readme.txt

    r2008496 r2015524  
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    99
    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).
     10This plugin adds references and citations functionalities (in a wikipedia-like style) from a Zotero account.
    1111
    1212== Description ==
Note: See TracChangeset for help on using the changeset viewer.