* * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ // No direct access defined('_HZEXEC_') or die; $database = \App::get('db'); // Get version authors $pa = new \Components\Publications\Tables\Author($database); ?> <ul class="mypubs"> <?php foreach ($this->results as $row) { // Get version authors $authors = $pa->getAuthors($row->version_id); $info = array(); $info[] = Date::of($row->published_up)->toLocal('d M Y'); $info[] = $row->cat_name; $info[] = Lang::txt('COM_PUBLICATIONS_CONTRIBUTORS') . ': ' . \Components\Publications\Helpers\Html::showContributors($authors, false, true); // Display List of items $this->view('_item')->set('option', 'com_publications')->set('row', $row)->set('info', $info)->display(); } ?> </ul>
<section class="main section upperpane"> <div class="subject"> <div class="grid overviewcontainer"> <div class="col span8"> <header> <?php echo \Components\Publications\Helpers\Html::title($this->publication); ?> </headeR> <?php if ($this->publication->params->get('show_authors') && $this->publication->_authors) { ?> <div id="authorslist"> <?php echo \Components\Publications\Helpers\Html::showContributors($this->publication->_authors, true, false, false, false, $this->publication->params->get('format_authors', 0)); ?> </div> <?php } ?> <p class="ataglance"><?php echo $this->publication->description ? \Hubzero\Utility\String::truncate(stripslashes($this->publication->description), 250) : ''; ?> </p> <?php echo \Components\Publications\Helpers\Html::showSubInfo($this->publication); // Show published date and category ?>
/** * Static method for formatting results * * @param object $row Database row * @return string HTML */ public static function out($row) { $database = App::get('db'); $thedate = Date::of($row->published_up)->toLocal('d M Y'); // Get version authors $pa = new \Components\Publications\Tables\Author($database); $authors = $pa->getAuthors($row->version_id); $html = "\t" . '<li class="resource">' . "\n"; $html .= "\t\t" . '<p class="title"><a href="' . $row->href . '">' . stripslashes($row->title) . '</a></p>' . "\n"; $html .= "\t\t" . '<p class="details">' . $thedate . ' <span>|</span> ' . stripslashes($row->cat_name); if ($authors) { $html .= ' <span>|</span>' . Lang::txt('PLG_MEMBERS_IMPACT_CONTRIBUTORS') . ': ' . \Components\Publications\Helpers\Html::showContributors($authors, false, true) . "\n"; } if ($row->doi) { $html .= ' <span>|</span> doi:' . $row->doi . "\n"; } if (!$row->project_provisioned && (isset($row->project_private) && $row->project_private != 1 || $row->author == true)) { $url = 'index.php?option=com_projects&alias=' . $row->project_alias; $url .= $row->author == true ? '&active=publications&pid=' . $row->id : ''; $html .= ' <span>|</span> Project: '; $html .= '<a href="'; $html .= Route::url($url) . '">'; $html .= $row->project_title; $html .= '</a>'; $html .= "\n"; } $html .= '</p>' . "\n"; if ($row->text) { $html .= "\t\t<p>" . \Hubzero\Utility\String::truncate(strip_tags(stripslashes($row->text)), 300) . "</p>\n"; } $html .= "\t" . '</li>' . "\n"; return $html; }
/** * Static method for formatting results * * @param object $row Database row * @return string HTML */ public static function out($row) { include_once Component::path('com_publications') . DS . 'tables' . DS . 'author.php'; require_once Component::path('com_publications') . DS . 'helpers' . DS . 'html.php'; $row->href = Route::url('index.php?option=com_publications&id=' . $row->id); $database = App::get('db'); // Get version authors $pa = new \Components\Publications\Tables\Author($database); $authors = $pa->getAuthors($row->ftext); // Get the component params $config = Component::params('com_publications'); $row->rating = $row->rcount; $row->category = $row->data1; $row->area = $row->data2; $row->ranking = $row->data3; // Set the display date switch ($config->get('show_date')) { case 0: $thedate = ''; break; case 1: $thedate = Date::of($row->created)->toLocal(Lang::txt('DATE_FORMAT_HZ1')); break; case 2: $thedate = Date::of($row->modified)->toLocal(Lang::txt('DATE_FORMAT_HZ1')); break; case 3: $thedate = Date::of($row->publish_up)->toLocal(Lang::txt('DATE_FORMAT_HZ1')); break; } if (strstr($row->href, 'index.php')) { $row->href = Route::url($row->href); } // Start building the HTML $html = "\t" . '<li class="'; $html .= 'publication">' . "\n"; $html .= "\t\t" . '<p class="title"><a href="' . $row->href . '/?v=' . $row->alias . '">' . stripslashes($row->title) . '</a></p>' . "\n"; $html .= "\t\t" . '<p class="details">' . $thedate . ' <span>|</span> ' . $row->area; if ($authors) { $html .= ' <span>|</span> ' . Lang::txt('PLG_TAGS_PUBLICATIONS_CONTRIBUTORS') . ' ' . stripslashes(\Components\Publications\Helpers\Html::showContributors($authors, true, false)); } $html .= '</p>' . "\n"; if ($row->itext) { $html .= "\t\t" . '<p>' . \Hubzero\Utility\String::truncate(\Hubzero\Utility\Sanitize::stripAll(stripslashes($row->itext)), 200) . '</p>' . "\n"; } $html .= "\t\t" . '<p class="href">' . Request::base() . trim($row->href . '/?v=' . $row->alias, '/') . '</p>' . "\n"; $html .= "\t" . '</li>' . "\n"; // Return output return $html; }
/** * Special formatting for results * * @param object $row Database row * @param string $period Time period * @return string */ public static function out($row, $period) { $database = App::get('db'); $config = Component::params('com_publications'); // Get version authors $pa = new \Components\Publications\Tables\Author($database); $authors = $pa->getAuthors($row->version_id); // Start building HTML $html = "\t" . '<li class="publication">' . "\n"; $html .= "\t\t" . '<p><span class="pub-thumb"><img src="' . Route::url('index.php?option=com_publications&id=' . $row->id . '&v=' . $row->version_id) . '/Image:thumb' . '" alt="" /></span>'; $html .= '<span class="pub-details"><a href="' . $row->href . '">' . stripslashes($row->title) . '</a>' . "\n"; $html .= "\t\t" . '<span class="block details">' . Date::of($row->published_up)->toLocal('d M Y') . ' <span>|</span> ' . $row->cat_name; if ($authors) { $html .= ' <span>|</span> ' . Lang::txt('PLG_WHATSNEW_PUBLICATIONS_CONTRIBUTORS') . ' ' . \Components\Publications\Helpers\Html::showContributors($authors, false, true); } $html .= '</span></span></p>' . "\n"; if ($row->text) { $html .= "\t\t" . '<p>' . \Hubzero\Utility\String::truncate(\Hubzero\Utility\Sanitize::stripAll(stripslashes($row->text)), 200) . '</p>' . "\n"; } $html .= "\t\t" . '<p class="href">' . Request::base() . trim($row->href, '/') . '</p>' . "\n"; $html .= "\t" . '</li>' . "\n"; // Return output return $html; }
?> <table class="related-publications"> <tbody> <?php foreach ($this->related as $line) { if ($line->section == 'Topic') { if ($line->group != '' && $line->scope != '') { $sef = Route::url('index.php?option=com_groups&scope=' . $line->scope . '&pagename=' . $line->alias); } else { $sef = Route::url('index.php?option=com_topics&scope=' . $line->scope . '&pagename=' . $line->alias); } } else { $class = \Components\Publications\Helpers\Html::getRatingClass($line->rating); // Get version authors $authors = $pa->getAuthors($line->version); $authorlist = \Components\Publications\Helpers\Html::showContributors($authors, false, true); // If the user is logged in, get their rating for this publication if (!User::isGuest()) { $mr = new \Components\Publications\Tables\Review($database); $myrating = $mr->loadUserRating($line->id, User::get('id'), $line->version); } else { $myrating = 0; } $myclass = \Components\Publications\Helpers\Html::getRatingClass($myrating); // Get the SEF for the publication if ($line->alias) { $sef = Route::url('index.php?option=' . $this->option . '&alias=' . $line->alias); } else { $sef = Route::url('index.php?option=' . $this->option . '&id=' . $line->id); } }
<div class="col span6"> <div class="launcher-inside-wrap"> <?php // Show published date and category echo \Components\Publications\Helpers\Html::showSubInfo($this->publication); ?> <h3><?php echo \Hubzero\Utility\String::truncate(stripslashes($this->publication->title), 150); ?> </h3> <?php // Display authors if ($this->publication->params->get('show_authors')) { if ($this->publication->_authors) { $html = '<div id="authorslist">' . "\n"; $html .= \Components\Publications\Helpers\Html::showContributors($this->publication->_authors, true, false) . "\n"; $html .= '</div>' . "\n"; echo $html; } } ?> <?php // Display mini abstract if ($this->publication->abstract) { ?> <p class="ataglance"><?php echo \Hubzero\Utility\String::truncate(stripslashes($this->publication->abstract), 250); ?> </p> <?php
echo implode(' <span>-</span> ', $info); ?> </span> --> <span class="item-wrap"> <?php echo $item->get('title'); ?> <br /> <span class="item-info"><?php echo implode(' <span>-</span> ', $info); ?> </span> </span> <span class="item-fullinfo"> <?php echo $description; ?> <p class="details"> <?php if ($authors) { echo Lang::txt('PLG_PROJECTS_PUBLICATIONS_PUBLICATION_AUTHORS_LIST') . ': ' . \Components\Publications\Helpers\Html::showContributors($authors, false, true); } ?> </p> </span> </li> <?php } ?> </ul>