Exemple #1
0
        if ($cite->doi) {
            $formatted = str_replace('doi:' . $cite->doi, '<a href="' . $cite->url . '" rel="external">' . 'doi:' . $cite->doi . '</a>', $formatted);
        }
        echo $formatted;
        ?>
										<?php 
        //get this citations rollover param
        $params = new \Hubzero\Config\Registry($cite->params);
        $citation_rollover = $params->get('rollover', $rollover);
        ?>
										<?php 
        if ($citation_rollover && $cite->abstract != "") {
            ?>
											<div class="citation-notes">
												<?php 
            $cs = new \Components\Citations\Tables\Sponsor($this->database);
            $sponsors = $cs->getCitationSponsor($cite->id);
            $final = "";
            if ($sponsors) {
                foreach ($sponsors as $s) {
                    $sp = $cs->getSponsor($s);
                    if ($sp) {
                        $final .= '<a rel="external" href="' . $sp[0]['link'] . '">' . $sp[0]['sponsor'] . '</a>, ';
                    }
                }
            }
            ?>
												<?php 
            if ($final != '' && $this->config->get("citation_sponsors", "yes") == 'yes') {
                ?>
													<?php 
Exemple #2
0
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$this->css()->js();
//remove $this
$config = $this->config;
$database = $this->database;
$citation = $this->citation;
//load user profile
$profile = \Hubzero\User\Profile::getInstance($citation->uid);
//get citation type
$ct = new \Components\Citations\Tables\Type($database);
$type = $ct->getType($citation->type);
//get citation sponsors
$cs = new \Components\Citations\Tables\Sponsor($database);
$sponsors = $cs->getSponsorsForCitationWithId($citation->id);
//determine the separator
$urlSeparator = PHP_EOL;
if (strstr($citation->url, " ") !== false) {
    $urlSeparator = " ";
} else {
    if (strstr($citation->url, "\t") !== false) {
        $urlSeparator = "\t";
    }
}
//get citation url
$urls = array_map("trim", explode($urlSeparator, html_entity_decode($citation->url)));
$url = filter_var($urls[0], FILTER_VALIDATE_URL) ? $urls[0] : '';
//get citation eprint
$eprints = array_map("trim", explode(PHP_EOL, html_entity_decode($citation->eprint)));