Plugin Directory

Changeset 2479969


Ignore:
Timestamp:
02/23/2021 03:45:03 PM (5 years ago)
Author:
frier
Message:

2021-02-23 update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • books-papers/trunk/books-n-papers.php

    r2469506 r2479969  
    33Plugin Name: Books & Papers
    44Plugin URI:
    5 Version: 0.20210205
     5Version: 0.20210223
    66Author: Research in Theory of Magnetism Department of Taras Shevchenko National University of Kyiv
    77Author_URI: http://ritm.knu.ua/
     
    690690        }catch (Exception $e) {}
    691691        include(bnpp_plugin_dir . "./pages/import-data-page.php");
     692        if(isset($_POST["absManUpload"]) && sanitize_text_field($_POST["absManUpload"]) != "" && check_admin_referer('bnp_get_abstract') && current_user_can('publish_pages'))
     693        {
     694            $result = $this->bridge->requestAbstractByDOI(sanitize_text_field($_POST["absManUpload"]));
     695            //echo "<script>window.onload = function() { if(document.getElementById(\"loadAnimWrapper\")){ document.getElementById(\"loadAnimWrapper\").style = \"display:none;\"; }; document.getElementById('abstractInputHide').outerHTML = '';document.getElementById('abstractInputFields').innerHTML = '" . $result . "';}</script>";
     696            if(strpos($result, "abstract")){
     697                $result = (explode("abstract", $result)[1]);
     698                $result = substr($result, strpos($result, ">") + 1, strrpos($result, "<") - strpos($result, ">") - 1);
     699                $text = strip_tags($result);
     700                $result = "<h3>Abstract:</h3><p>$text</p>";
     701                //echo "<script>window.onload = function() { if(document.getElementById(\"loadAnimWrapper\")){ document.getElementById(\"loadAnimWrapper\").style = \"display:none;\"; }; document.getElementById('abstractInputHide').outerHTML = '';document.getElementById('abstractInputFields').innerHTML = '" . $result . "';}</script>";
     702            } else {
     703                $result = "Abstract not found.";
     704                //echo "<script>window.onload = function() { document.getElementById('abstractInputFields').innerHTML = '" . $result . "';}</script>";
     705            }
     706            echo $result;
     707        }
    692708        if(isset($_POST["doiUpload"]) && sanitize_text_field($_POST["doiUpload"]) != ""&& check_admin_referer('bnp_doi_upload') && current_user_can('publish_pages'))
    693709        {
Note: See TracChangeset for help on using the changeset viewer.