Example #1
0
 public function _getTag($tag)
 {
     static $cache = array();
     if (!isset($cache[$tag])) {
         $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', id' : '';
         $clean_tag = Mijosef::get('utility')->cleanText($tag);
         $row = MijoDatabase::loadRow("SELECT id, title, alias, description{$joomfish} FROM #__mijosef_tags WHERE title = '{$clean_tag}'");
         $name = $this->params->get('tagid_inc', '1') != '1' ? $row[0] . ' ' : '';
         if (parent::urlPart($this->params->get('tag_part', 'global')) == 'title') {
             $name .= $row[1];
         } else {
             $name .= $row[2];
         }
         $cache[$tag]['name'] = $name;
         $cache[$tag]['meta_title'] = $row[1];
         if ($this->params->get('meta_desc_mijosef', '2') == '2') {
             $cache[$tag]['meta_desc'] = $row[3];
         }
     }
     $this->meta_title[] = $cache[$tag]['meta_title'];
     if (!empty($cache[$tag]['meta_desc'])) {
         $this->meta_desc = $cache[$tag]['meta_desc'];
     }
     return $cache[$tag]['name'];
 }
Example #2
0
 function build(&$vars, &$segments, &$do_sef, &$metadata, &$item_limitstart)
 {
     // Extract variables
     extract($vars);
     if (isset($link)) {
         if ($this->_helperExists) {
             $link = MailtoHelper::validateHash($link);
         } else {
             $link = base64_decode($link);
         }
         $link = str_replace(JURI::root(), '', $link);
         // Remove URL Suffix
         if ($this->params->get('remove_url_suffix', 0) && $this->MijosefConfig->url_suffix != '') {
             $urlSuffix = $this->MijosefConfig->url_suffix;
             if ($urlSuffix == substr($link, -strlen($urlSuffix))) {
                 $link = substr($link, 0, -strlen($urlSuffix));
             }
         }
         if (substr($link, 0, 1) == '/') {
             $link = substr($link, 1, strlen($link) - 1);
         }
         $segments[] = rtrim($link, '/');
         unset($vars['link']);
     }
     $metadata = parent::getMetaData($vars, $item_limitstart);
     unset($vars['limit']);
     unset($vars['limitstart']);
 }
Example #3
0
 function build(&$vars, &$segments, &$do_sef, &$metadata, &$item_limitstart)
 {
     // Extract variables
     extract($vars);
     if (isset($activation) || isset($return)) {
         $do_sef = false;
         return;
     }
     if (isset($view)) {
         $segments[] = $view;
         unset($vars['view']);
     }
     if (isset($task)) {
         switch ($task) {
             case 'completereset':
             case 'requestreset':
             case 'remindusername':
             case 'confirmreset':
                 $do_sef = false;
                 return;
             default:
                 $segments[] = $task;
                 break;
         }
         unset($vars['task']);
     }
     $metadata = parent::getMetaData($vars, $item_limitstart);
     unset($vars['limit']);
     unset($vars['limitstart']);
 }
Example #4
0
 function build(&$vars, &$segments, &$do_sef, &$metadata, &$item_limitstart)
 {
     // Extract variables
     extract($vars);
     unset($vars['view']);
     $metadata = parent::getMetaData($vars, $item_limitstart);
     unset($vars['limit']);
     unset($vars['limitstart']);
 }
Example #5
0
 function _getBanner($id)
 {
     static $cache = array();
     if (!isset($cache[$id])) {
         if (self::_is16()) {
             $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', id' : '';
             $row = MijoDatabase::loadRow("SELECT name, alias{$joomfish} FROM #__banners WHERE id = " . $id);
         } else {
             $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', bid' : '';
             $row = MijoDatabase::loadRow("SELECT name, alias{$joomfish} FROM #__banner WHERE bid = " . $id);
         }
         $name = $this->params->get('bannerid_inc', '1') != '1' ? $id . ' ' : '';
         if (parent::urlPart($this->params->get('banner_part', 'title')) == 'title') {
             $name .= $row[0];
         } else {
             $name .= $row[1];
         }
         $cache[$id]['name'] = $name;
         $cache[$id]['meta_title'] = $row[0];
     }
     $this->meta_title[] = $cache[$id]['meta_title'];
     return $cache[$id]['name'];
 }
Example #6
0
 function build(&$vars, &$segments, &$do_sef, &$metadata, &$item_limitstart)
 {
     extract($vars);
     if (isset($searchword)) {
         $segments[] = $searchword;
         $this->meta_desc = $this->meta_title[] = $searchword;
         unset($vars['searchword']);
     }
     if (isset($searchphrase)) {
         $segments[] = $searchphrase;
         unset($vars['searchphrase']);
     }
     if (isset($ordering)) {
         $segments[] = $ordering;
         unset($vars['ordering']);
     }
     if (isset($submit)) {
         $segments[] = $submit;
         unset($vars['submit']);
     }
     $metadata = parent::getMetaData($vars, $item_limitstart);
     unset($vars['limit']);
     unset($vars['limitstart']);
 }
Example #7
0
 function _getFeed($id)
 {
     static $cache = array();
     if (!isset($cache[$id])) {
         $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', id' : '';
         $row = MijoDatabase::loadRow("SELECT name, alias{$joomfish} FROM #__newsfeeds WHERE id = " . $id);
         $name = $this->params->get('feedid_inc', '1') != '1' ? $id . ' ' : '';
         if (parent::urlPart($this->params->get('feed_part', 'global')) == 'title') {
             $name .= $row[0];
         } else {
             $name .= $row[1];
         }
         $cache[$id]['name'] = $name;
         $cache[$id]['meta_title'] = $row[0];
     }
     array_unshift($this->meta_title, $cache[$id]['meta_title']);
     return $cache[$id]['name'];
 }
Example #8
0
 function _getContact($id)
 {
     static $cache = array();
     if (!isset($cache[$id])) {
         $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', id' : '';
         $row = MijoDatabase::loadRow("SELECT name, alias, catid{$joomfish} FROM #__contact_details WHERE id = " . $id);
         $name = $this->params->get('contactid_inc', '1') != '1' ? $id . ' ' : '';
         if (parent::urlPart($this->params->get('contact_part', 'global')) == 'title') {
             $name .= $row[0];
         } else {
             $name .= $row[1];
         }
         if ($this->params->get('category_inc', '1') == '1') {
             $cache[$id]['name'] = array($name);
         } else {
             $category = self::_getCategory($row[2]);
             array_push($category, $name);
             $cache[$id]['name'] = $category;
         }
         $cache[$id]['meta_title'] = $row[0];
     }
     array_unshift($this->meta_title, $cache[$id]['meta_title']);
     return $cache[$id]['name'];
 }
Example #9
0
 function _getArticle($id)
 {
     static $cache = array();
     if (!isset($cache[$id])) {
         $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', id' : '';
         $row = MijoDatabase::loadObject("SELECT title, alias, introtext, metadesc, sectionid{$joomfish} FROM #__content WHERE id = {$id}");
         if (!empty($row) && is_object($row)) {
             $name = $this->params->get('articleid_inc', '1') != '1' ? $id . ' ' : '';
             if (parent::urlPart($this->params->get('article_part', 'global')) == 'title') {
                 $name .= $row->title;
             } else {
                 $name .= $row->alias;
             }
             if (!empty($row->sectionid) && $this->params->get('section_inc', '1') == '2' && $this->params->get('category_inc', '2') == '1') {
                 $cache[$id]['name'] = array(self::_getSection(intval($row->sectionid)), $name);
             } else {
                 $cache[$id]['name'] = array($name);
             }
             $cache[$id]['meta_title'] = $row->title;
             if ($this->params->get('item_desc', '1') == '1') {
                 $cache[$id]['meta_desc'] = $row->introtext;
             } else {
                 $cache[$id]['meta_desc'] = $row->metadesc;
             }
         } else {
             $cache[$id]['name'] = array();
             $cache[$id]['meta_title'] = $cache[$id]['meta_desc'] = "";
         }
     }
     array_unshift($this->meta_title, $cache[$id]['meta_title']);
     $this->meta_desc = $cache[$id]['meta_desc'];
     return $cache[$id]['name'];
 }