</th> </tr> </thead> <tbody> <?php $counter = 0; ?> <?php foreach ($citations_require_attention as $c) { ?> <?php //load the duplicate citation $cc = new \Components\Citations\Tables\Citation($database); $cc->load($c['duplicate']); //get the type $ct = new \Components\Citations\Tables\Type($database); $type = $ct->getType($cc->type); $type_title = $type[0]['type_title']; //get citations tags $th = new \Components\Citations\Tables\Tags($cc->id); $tags = $th->render('string'); $badges = $th->render('string', array('label' => 'badges'), true); ?> <tr> <!--<td> </td>--> <td> <span class="citation-title"><u><?php echo Lang::txt('PLG_GROUPS_CITATIONS_IMPORT_DUPLICATE'); ?> </u>: <?php echo html_entity_decode($c['title']);
* @package hubzero-cms * @author Shawn Rice <*****@*****.**> * @copyright Copyright 2005-2015 HUBzero Foundation, LLC. * @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)));
/** * Edit citation view * * @return string */ public function editcite() { // Incoming $cid = Request::getInt('cid', 0); $pid = Request::getInt('pid', 0); $vid = Request::getInt('vid', 0); // Output HTML $view = new \Hubzero\Plugin\View(array('folder' => 'projects', 'element' => 'links', 'name' => 'selector', 'layout' => 'edit')); // Load classes $objP = new \Components\Publications\Tables\Publication($this->_database); $view->version = new \Components\Publications\Tables\Version($this->_database); // Load publication version $view->version->load($vid); if (!$view->version->id) { $this->setError(Lang::txt('PLG_PROJECTS_LINKS_SELECTOR_ERROR_NO_PUBID')); } // Get publication $view->publication = $objP->getPublication($view->version->publication_id, $view->version->version_number, $this->model->get('id')); if (!$view->publication) { $this->setError(Lang::txt('PLG_PROJECTS_LINKS_SELECTOR_ERROR_NO_PUBID')); } // On error if ($this->getError()) { // Output error $view = new \Hubzero\Plugin\View(array('folder' => 'projects', 'element' => 'files', 'name' => 'error')); $view->title = ''; $view->option = $this->_option; $view->setError($this->getError()); return $view->loadTemplate(); } include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'type.php'; include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'citation.php'; // Load the object $view->row = new \Components\Citations\Tables\Citation($this->_database); $view->row->load($cid); // get the citation types $ct = new \Components\Citations\Tables\Type($this->_database); $view->types = $ct->getType(); $view->option = $this->_option; $view->database = $this->_database; $view->model = $this->model; $view->uid = $this->_uid; $view->task = $this->_task; $view->ajax = Request::getInt('ajax', 0); // Get messages and errors if ($this->getError()) { $view->setError($this->getError()); } return $view->loadTemplate(); }
/** * Show the results of the import * * @return void */ private function savedAction() { // Check if they're logged in if (User::isGuest()) { return $this->loginAction(); } if (!$this->params->get('access-manage')) { throw new Exception(Lang::txt('PLG_MEMBERS_CITATIONS_NOT_AUTHORIZED'), 403); } // Get the session object $session = App::get('session'); // Get the citations $citations_saved = $session->get('citations_saved'); $citations_not_saved = $session->get('citations_not_saved'); $citations_error = $session->get('citations_error'); // Check to make sure we have citations if (!$citations_saved && !$citations_not_saved) { App::redirect(Route::url($this->member->getLink() . '&active=' . $this->_name . '&action=import'), Lang::txt('PLG_MEMBERS_CITATIONS_IMPORT_MISSING_FILE_CONTINUE'), 'error'); return; } $view = $this->view('saved', 'import'); $view->member = $this->member; $view->option = $this->option; $view->isAdmin = $this->params->get('access-manage'); $view->config = Component::params('com_citations'); $view->database = $this->database; $view->filters = array('start' => 0, 'search' => ''); $view->citations = array(); foreach ($citations_saved as $cs) { $cc = new \Components\Citations\Tables\Citation($this->database); $cc->load($cs); $view->citations[] = $cc; } $view->openurl['link'] = ''; $view->openurl['text'] = ''; $view->openurl['icon'] = ''; //take care fo type $ct = new \Components\Citations\Tables\Type($this->database); $view->types = $ct->getType(); $view->messages = Notify::messages('plg_members_citations'); return $view->loadTemplate(); }
/** * Return citation types * * @return array */ public static function getTypes() { static $types; if (isset($types)) { return $types; } require_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'type.php'; $database = App::get('db'); $ct = new \Components\Citations\Tables\Type($database); $types = $ct->getType(); return $types; }