index.html000060400000000054152456640660006552 0ustar00weblinks.php000060400000021210152456640660007101 0ustar00option; } public function getList() { return ''; } public function getLinks($args) { $wf = WFEditorPlugin::getInstance(); $items = array(); $version = new Joomla\CMS\Version(); if (!$version->isCompatible('4.0')) { require_once JPATH_SITE . '/includes/application.php'; } require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php'; $language = ''; switch ($args->view) { // Get all WebLink categories default: case 'categories': $categories = WFLinkBrowser::getCategory('com_weblinks', 1, $wf->getParam('links.joomlalinks.category_alias', 1)); foreach ($categories as $category) { $url = ''; if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) { // language if (isset($category->language)) { $language = $category->language; } $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language); if (strpos($id, 'index.php?Itemid=') !== false) { $url = $id; $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id; } } else { $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id)); $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid; } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder weblink', ); } break; // Get all links in the category case 'category': $categories = WFLinkBrowser::getCategory('com_weblinks', $args->id, $wf->getParam('links.joomlalinks.category_alias', 1)); if (count($categories)) { foreach ($categories as $category) { $children = WFLinkBrowser::getCategory('com_weblinks', $category->id, $wf->getParam('links.joomlalinks.category_alias', 1)); $url = ''; if ($children) { $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id; } else { if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) { // language if (isset($category->language)) { $language = $category->language; } $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language); if (strpos($id, 'index.php?Itemid=') !== false) { $url = $id; $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id; } } else { $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id)); $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid; } } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder weblink', ); } } $weblinks = self::getWeblinks($args->id); foreach ($weblinks as $weblink) { // language if (isset($weblink->language)) { $language = $weblink->language; } $id = WeblinksHelperRoute::getWeblinkRoute($weblink->slug, $weblink->catslug, $language); // Joomla 4/5/6 if ($version->isCompatible('4.0')) { $id .= '&task=weblink.go'; } $items[] = array( 'id' => self::route($id), 'name' => $weblink->title . ' / ' . $weblink->alias, 'class' => 'file', ); } break; } return $items; } public static function getWeblinks($id) { $wf = WFEditorPlugin::getInstance(); $db = Factory::getDBO(); $user = Factory::getUser(); $query = $db->getQuery(true); $section = Text::_('Web Links'); $query = $db->getQuery(true); $case = ''; if ((int) $wf->getParam('links.joomlalinks.weblinks_alias', 0)) { //sqlsrv changes $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('a.alias', '!=', '0'); $case_when1 .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $a_id . ' END as slug'; $case_when2 = ' CASE WHEN '; $case_when2 .= $query->charLength('b.alias', '!=', '0'); $case_when2 .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $c_id = $query->castAsChar('b.id'); } else { $c_id = $query->castAs('CHAR', 'b.id'); } $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':'); $case_when2 .= ' ELSE '; $case_when2 .= $c_id . ' END as catslug'; $case .= ',' . $case_when1 . ',' . $case_when2; } $query->select('a.id AS slug, b.id AS catslug, a.title AS title, a.description AS text, a.url, a.alias, a.language' . $case); $query->from('#__weblinks AS a'); $query->innerJoin('#__categories AS b ON b.id = ' . (int) $id); $query->where('a.catid = ' . (int) $id); $query->where('a.state = 1'); if (!$user->authorise('core.admin')) { $query->where('b.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'); } $query->where('b.published = 1'); $query->order('a.title'); $db->setQuery($query, 0); return $db->loadObjectList(); } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ($wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkHelper::route($url); } // remove Itemid if "home" $url = WFLinkHelper::removeHomeItemId($url); // remove Itemid if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) { $url = WFLinkHelper::removeItemId($url); } return $url; } } content.php000060400000026216152456640660006750 0ustar00option; } public function getList() { return ''; } public function getLinks($args) { $items = array(); $view = isset($args->view) ? $args->view : ''; $language = ''; // create a new RouteHelper instance $router = new RouteHelper(); switch ($view) { // get top-level categories default: $articles = array(); if (!isset($args->id)) { $args->id = 1; } $categories = WFLinkBrowser::getCategory('com_content', $args->id); // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles) $articles = self::getArticles($args->id); foreach ($categories as $category) { $url = ''; if (isset($category->language)) { $language = $category->language; } $id = RouteHelper::getCategoryRoute($category->id, $language, 'com_content'); $url = $id; if (strpos($id, 'index.php?Itemid=') !== false) { $url = self::getMenuLink($id); $id = 'index.php?option=com_content&view=category&id=' . $category->id; } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder content', ); } if (!empty($articles)) { // output article links foreach ($articles as $article) { if (isset($article->language)) { $language = $article->language; } $id = $router->getRoute($article->slug, 'com_content.article', '', $language, $article->catslug); $id = self::route($id); $items[] = array( 'id' => $id, 'name' => $article->title . ' / ' . $article->alias, 'class' => 'file', ); $anchors = self::getAnchors($article->content); foreach ($anchors as $anchor) { $items[] = array( 'id' => $id . '#' . $anchor, 'name' => '#' . $anchor, 'class' => 'file anchor', ); } } } break; // get articles and / or sub-categories case 'category': // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles) $articles = self::getArticles($args->id); // get sub-categories $categories = WFLinkBrowser::getCategory('com_content', $args->id); if (count($categories)) { foreach ($categories as $category) { // check for sub-categories $sub = WFLinkBrowser::getCategory('com_content', $category->id); // language if (isset($category->language)) { $language = $category->language; } $id = RouteHelper::getCategoryRoute($category->id, $language, 'com_content'); $url = $id; // get sub-categories if (count($sub)) { $url = $id; $id = 'index.php?option=com_content&view=section&id=' . $category->id; // no sub-categories, get articles for category } else { // no com_content, might be link like index.php?ItemId=1 if (strpos($id, 'index.php?Itemid=') !== false) { $url = $id; $id = 'index.php?option=com_content&view=category&id=' . $category->id; } } if (strpos($url, 'index.php?Itemid=') !== false) { $url = self::getMenuLink($url); } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder content', ); } } // output article links foreach ($articles as $article) { // language if (isset($article->language)) { $language = $article->language; } $id = $router->getRoute($article->slug, 'com_content.article', '', $language, $article->catslug); $id = self::route($id); $items[] = array( 'id' => $id, 'name' => $article->title . ' / ' . $article->alias, 'class' => 'file' . ($article->state ? '' : ' unpublished uk-text-muted'), ); $anchors = self::getAnchors($article->content); foreach ($anchors as $anchor) { $items[] = array( 'id' => $id . '#' . $anchor, 'name' => '#' . $anchor, 'class' => 'file anchor', ); } } break; } return $items; } private static function getMenuLink($url) { $wf = WFEditorPlugin::getInstance(); // resolve the url from the menu link if ($wf->getParam('links.joomlalinks.article_resolve_alias', 1)) { // get itemid preg_match('#Itemid=([\d]+)#', $url, $matches); // get link from menu if (count($matches) > 1) { $menu = Table::getInstance('menu'); $menu->load($matches[1]); if ($menu->link) { return $menu->link . '&Itemid=' . $menu->id; } } } return $url; } private function getArticles($id) { $db = Factory::getDBO(); $user = Factory::getUser(); $wf = WFEditorPlugin::getInstance(); $query = $db->getQuery(true); $case = ''; if ($wf->getParam('links.joomlalinks.article_alias', 0)) { //sqlsrv changes $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('a.alias', '!=', '0'); $case_when1 .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $a_id . ' END as slug'; $case_when2 = ' CASE WHEN '; $case_when2 .= $query->charLength('b.alias', '!=', '0'); $case_when2 .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $c_id = $query->castAsChar('b.id'); } else { $c_id = $query->castAs('CHAR', 'b.id'); } $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':'); $case_when2 .= ' ELSE '; $case_when2 .= $c_id . ' END as catslug'; $case = ',' . $case_when1 . ',' . $case_when2; } $groups = implode(',', $user->getAuthorisedViewLevels()); $query->select('a.id AS slug, b.id AS catslug, a.alias, a.state, a.title AS title, a.access, ' . $query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS content, a.language' . $case); $query->from('#__content AS a'); $query->innerJoin('#__categories AS b ON b.id = ' . (int) $id); $query->where('a.catid = ' . (int) $id); if ($wf->getParam('links.joomlalinks.article_unpublished', 0) == 1) { $query->where('(a.state = 0 OR a.state = 1)'); } else { $query->where('a.state = 1'); } if (!$user->authorise('core.admin')) { $query->where('a.access IN (' . $groups . ')'); $query->where('b.access IN (' . $groups . ')'); } $query->order('a.title'); $db->setQuery($query, 0); return $db->loadObjectList(); } private static function getAnchors($content) { preg_match_all('#]+)(name|id)="([a-z]+[\w\-\:\.]*)"([^>]*)>#i', $content, $matches, PREG_SET_ORDER); $anchors = array(); if (!empty($matches)) { foreach ($matches as $match) { if (strpos($match[0], 'href') === false) { $anchors[] = $match[3]; } } } return $anchors; } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkHelper::route($url); } // remove Itemid if "home" $url = WFLinkHelper::removeHomeItemId($url); // remove Itemid if set if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) { $url = WFLinkHelper::removeItemId($url); } return $url; } } contact.php000060400000012325152456640660006725 0ustar00option; } public function getList() { return ''; } public function getLinks($args) { $items = array(); $view = isset($args->view) ? $args->view : ''; $language = ''; // create a new RouteHelper instance $router = new RouteHelper(); switch ($view) { default: $categories = WFLinkBrowser::getCategory('com_contact', 1, $this->get('category_alias', 1)); foreach ($categories as $category) { // language if (isset($category->language)) { $language = $category->language; } $url = RouteHelper::getCategoryRoute($category->id, $language, 'com_contact'); // convert to SEF $url = self::route($url); $items[] = array( 'id' => 'index.php?option=com_contact&view=category&id=' . $category->id, 'url' => $url, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder contact', ); } break; case 'category': $categories = WFLinkBrowser::getCategory('com_contact', $args->id, $this->get('category_alias', 1)); foreach ($categories as $category) { $children = WFLinkBrowser::getCategory('com_contact', $category->id, $this->get('category_alias', 1)); // language if (isset($category->language)) { $language = $category->language; } if ($children) { $id = RouteHelper::getCategoryRoute($category->id, $language, 'com_contact'); } else { $id = RouteHelper::getCategoryRoute($category->slug, $language, 'com_contact'); } // convert to SEF $url = self::route($id); $items[] = array( 'url' => $url, 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder content', ); } $contacts = self::getContacts($args->id); foreach ($contacts as $contact) { // language if (isset($contact->language)) { $language = $contact->language; } $id = $router->getRoute($contact->id, 'com_contact.contact', '', $language, $args->id); $id = self::route($id); $items[] = array( 'id' => $id, 'name' => $contact->name . ' / ' . $contact->alias, 'class' => 'file', ); } break; } return $items; } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkHelper::route($url); } // remove Itemid if "home" $url = WFLinkHelper::removeHomeItemId($url); // remove Itemid if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) { $url = WFLinkHelper::removeItemId($url); } return $url; } private static function getContacts($id) { $db = Factory::getDBO(); $user = Factory::getUser(); $query = $db->getQuery(true); $query->select('id, name, alias, language')->from('#__contact_details')->where(array('catid=' . (int) $id, 'published = 1')); if (!$user->authorise('core.admin')) { $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'); } $db->setQuery($query); return $db->loadObjectList(); } } css/joomlalinks.css000060400000000056152456640660010403 0ustar00.unpublished .uk-icon::before{content:"\e99d"}css/index.html000060400000000054152456640660007342 0ustar00menu.php000060400000024121152456640660006233 0ustar00option; } public function getList() { return ''; } public function getLinks($args) { $items = array(); $view = isset($args->view) ? $args->view : ''; switch ($view) { // create top-level (non-linkable) menu types default: $types = self::getMenuTypes(); foreach ($types as $type) { $items[] = array( 'id' => 'index.php?option=com_menu&view=menu&type=' . $type->id, 'name' => $type->title, 'class' => 'folder menu nolink', ); } break; // get menus and sub-menus case 'menu': $type = isset($args->type) ? $args->type : 0; $id = $type ? 0 : $args->id; $menus = self::getMenu($id, $type); foreach ($menus as $menu) { $class = array(); // bypass errors in menu parameters syntax try { $params = new Registry($menu->params); } catch (Exception $e) { $params = new Registry(); } switch ($menu->type) { case 'separator': if (!$menu->link) { $class[] = 'nolink'; } $link = ''; break; case 'alias': // If this is an alias use the item id stored in the parameters to make the link. $link = 'index.php?Itemid=' . $params->get('aliasoptions'); break; default: // resolve link $link = $this->resolveLink($menu); break; } $children = (int) self::getChildren($menu->id); $title = isset($menu->name) ? $menu->name : $menu->title; if ($children) { $class = array_merge($class, array('folder', 'menu')); } else { $class[] = 'file'; } if ($params->get('secure')) { $link = self::toSSL($link); } // language if (isset($menu->language)) { $link .= $this->getLangauge($menu->language); } $items[] = array( 'id' => $children ? 'index.php?option=com_menu&view=menu&id=' . $menu->id : $link, 'url' => self::route($link), 'name' => $title . ' / ' . $menu->alias, 'class' => implode(' ', $class), ); } break; // get menu items case 'submenu': $menus = self::getMenu($args->id); foreach ($menus as $menu) { if ($menu->type == 'menulink') { //$menu = AdvlinkMenu::_alias($menu->id); } $children = (int) self::getChildren($menu->id); $title = isset($menu->name) ? $menu->name : $menu->title; // get params $params = new Registry($menu->params); // resolve link $link = $this->resolveLink($menu); // language if (isset($menu->language)) { $link .= $this->getLangauge($menu->language); } if ($params->get('secure')) { $link = self::toSSL($link); } $items[] = array( 'id' => self::route($link), 'name' => $title . ' / ' . $menu->alias, 'class' => $children ? 'folder menu' : 'file', ); } break; } return $items; } /** * Convert link to SSL. * * @param type $link * * @return string */ private static function toSSL($link) { if (strcasecmp(substr($link, 0, 4), 'http') && (strpos($link, 'index.php?') !== false)) { $uri = Uri::getInstance(); // Get prefix $prefix = $uri->toString(array('host', 'port')); // trim slashes $link = trim($link, '/'); // Build the URL. $link = 'https://' . $prefix . '/' . $link; } return $link; } private function resolveLink($menu) { $wf = WFEditorPlugin::getInstance(); // get link from menu object $link = $menu->link; // internal link if ($link && strpos($link, 'index.php') === 0) { if ((bool) $wf->getParam('links.joomlalinks.menu_resolve_alias', 0)) { // no Itemid if (strpos($link, 'Itemid=') === false) { $link .= '&Itemid=' . $menu->id; } // short link } else { $link = 'index.php?Itemid=' . $menu->id; } } return $link; } private static function getMenuTypes() { $db = Factory::getDBO(); $query = $db->getQuery(true); $query->select('*')->from('#__menu_types')->where('client_id = 0')->order('title'); $db->setQuery($query, 0); return $db->loadObjectList(); } private static function getAlias($id) { $db = Factory::getDBO(); $user = Factory::getUser(); $query = $db->getQuery(true); $query->select('params')->from('#__menu')->where('id = ' . (int) $id); $db->setQuery($query, 0); $params = new Registry($db->loadResult()); $query->clear(); $query->select('id, name, link, alias')->from('#__menu')->where(array('published = 1', 'id = ' . (int) $params->get('menu_item'))); if (!$user->authorise('core.admin')) { $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'); } $query->order('name'); $db->setQuery($query, 0); return $db->loadObject(); } private static function getChildren($id) { $db = Factory::getDBO(); $user = Factory::getUser(); $query = $db->getQuery(true); $query->select('COUNT(id)')->from('#__menu')->where(array('published = 1', 'client_id = 0')); if (!$user->authorise('core.admin')) { $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'); } if ($id) { $query->where('parent_id = ' . (int) $id); } $db->setQuery($query, 0); return $db->loadResult(); } private static function getMenu($parent = 0, $type = 0) { $db = Factory::getDBO(); $user = Factory::getUser(); $query = $db->getQuery(true); $query->select('m.*')->from('#__menu AS m'); if ($type) { $query->innerJoin('#__menu_types AS s ON s.id = ' . (int) $type); $query->where('m.menutype = s.menutype'); } if ($parent == 0) { $parent = 1; } $query->where(array('m.published = 1', 'm.parent_id = ' . (int) $parent)); if (!$user->authorise('core.admin')) { $query->where('m.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'); } // only site menu items $query->where('m.client_id = 0'); $query->order('m.lft ASC'); $db->setQuery($query, 0); return $db->loadObjectList(); } private function getLangauge($language) { $db = Factory::getDBO(); $query = $db->getQuery(true); $link = ''; $query->select('a.sef AS sef'); $query->select('a.lang_code AS lang_code'); $query->from('#__languages AS a'); $db->setQuery($query); $langs = $db->loadObjectList(); foreach ($langs as $lang) { if ($language == $lang->lang_code) { $language = $lang->sef; $link .= '&lang=' . $language; } } return $link; } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkHelper::route($url); } // remove Itemid if "home" $url = WFLinkHelper::removeHomeItemId($url); // remove Itemid if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) { $url = WFLinkHelper::removeItemId($url); } return $url; } } img/icons.png000060400000012330152456640660007152 0ustar00PNG  IHDR iCCPICC Profile(TOA-b""6l1)4 FA$z$l 7`z1d!ԍ:55wO:zi c l,2qd#>("ⶬ^a;5'F" iZ+*Zqޤ 'QX\qQL8q-jʃ_ym1) ɝv KDHjrG ` *u{븕޲@˪g3\g0laS,+@5?eϚ漯ն~4<ع_}R Adobe Fireworks CS5 11.0.0.484 Macintosh Ifn=IDATh{p\}?ܻ+I~,ٵȎ)$Ly4LBGԙv $L@3a6褍)L3ngq1㗂L?aڕ֫ݽ{.+ݕCf읽|s֚3䇊4 'k7lX)qf7?iFp7gvbʞ능糯\##ax+lVa>1ovw38<\lxWļyalV =t]y%{f0q`"ÇJ0%8U t-X+r.<\<+ҵ`ppBn8)v:-]]@M 3gd|r@MM0Mt03d4;xOvvRWWwd$cC2~ =֤ۖ-#$йhH'\k{^϶RFֲ8{{c VcXLo l: 9G|؏> H/3?|rJZ[G(ʑ#Gx|׮kKlݼDi_ߔm 9eM%J1::>v՚N ! `MSJ$ ~S\x#ok׮]`D"׽7hrZ$_֚H$Ž}R3{G:DWW1;nD? Dc1gb?}'wx7j)9:f$n"oTLZ_[_u$!qV%z0'OSԘfQ##&R+i R 9sPJP6M X4v])>bxF)R˗c66q:bC:L&!HX+R__O<'"pyk+P)%(5&ZWahRh /F)*0 -%Hsj*:-E֚z2 3cb߼;׋$,]kv9RPLOkZfO2BK&5)9 'JƆϞZ~ KS_H])cpYYxcݩ2%~qWL=Fۣp\uT)aS>1=Y69HiH~9ri>wRJˮc,iHi璆:i/SJZ!x)ޡwϟ "~y c2cWneeJK$уhϞW{Y>eʽc:Vbì%T%0L];קʱί\MTghavc#--4aҬR_ XW]?[΂FĻ'I=łK5! rE%jfb{')'%ΜL $v\ 1[[vv۶],+ _ߺuk_rkmiiYYXVqZb!G~xF`jRʨeY {{{q]kRpΝuSN4Mjժm}%㦔ZsNT~Bttt܌\.gTlѣ,_@ @2 T¸L&YlNeV\G?с|F2;nB}gΜy<9]~z,c|?ȸr9öqV0Lr+Pu*1 [aa܄ujR%Klm"EMQ8Lɣ>*(S(غiӉRGb՚;)(Ǐub\NJ!xСq)(y2@/~]j)lf*<ʄkG)jZv~bblEy_@;ĭBu)d˕Am(}}}Ez4b,֧&ty.0,G_OgVK >99üG)a"@)EdXSXűC<醰B@CC؆Hy7J&I_H|h OoWN\H5 |eBH,HƋ_`&;nXtl 6+2 D`[*([V̊ K-y_hM[O84 )"0D"pⴊj@&hCͷCd{Z%4BZS)!D=0mf9uz"/{e鳙>J wΝ烕?B&Ǿa1AƗ?zjŅ?Ļ{9ӱuܯu.7i <ٻ8R7O)L'{q|_}} WS W8ݗckrBR̼hV^{˒OoeX!DeMIfz^ҕ5pObc8YFU\M9~FĦ(mιMD+hO5e,.>OZdZ'y@J\ɧϰO+_E|/C7_0yʕ|*AEI(RB-DbOrwrRbHia򵔼)cXէHRׇ-[ ? #ml~C;T)Zko۾}g۷oooZI#ȷiH$j'T*Ύ;~ǎR;U;LXyX <8xG{6 50Eh Ø8@[[7Zv] 0ru'=U^z饾x(2PJe vcVXѶdɒ|Svضm[߬Y֭cK&97d2#ݱe֬Ym۶mst]hkh[z7soFL)f4TG[7n7W^@[[GbM.>DF|ug'LӼw3ivv.{^ԥ"ȺIτBwӝKڱUٹݻP(3~.P:v,ˡ6mBlf/vy2$ZabS0[ǗK(`Te(0&ƴ"`\!DyV8 je/vQBSIENDB`img/index.html000060400000000054152456640660007326 0ustar00tags.php000060400000010754152456640660006234 0ustar00option; } public function getList() { return ''; } public function getLinks($args) { require_once JPATH_SITE . '/components/com_tags/helpers/route.php'; $items = array(); $view = isset($args->view) ? $args->view : ''; $language = ''; // create a new RouteHelper instance $router = new RouteHelper(); $tags = array(); if (!isset($args->id)) { $args->id = 1; } // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles) $tags = self::getTags($args->id); if (!empty($tags)) { // output article links foreach ($tags as $tag) { if (isset($tag->language)) { $language = $tag->language; } $id = $router->getRoute($tag->slug ?? $tag->id, 'com_tags.tag', '', $language); $id = $this->route($id); $items[] = array( 'id' => $id, 'name' => $tag->title . ' / ' . $tag->alias, 'class' => 'file', ); } } return $items; } private static function getTags($id) { $db = Factory::getDBO(); $user = Factory::getUser(); $wf = WFEditorPlugin::getInstance(); $query = $db->getQuery(true); $query->select('a.id, a.title, a.alias'); if ($wf->getParam('links.joomlalinks.tag_alias', 0)) { $case_when_item_alias = ' CASE WHEN '; $case_when_item_alias .= $query->charLength('a.alias', '!=', '0'); $case_when_item_alias .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when_item_alias .= ' ELSE '; $case_when_item_alias .= $a_id . ' END as slug'; $query->select($case_when_item_alias); } $query->from('#__tags AS a'); $query->where('a.alias <> ' . $db->quote('root')); $query->where($db->qn('a.published') . ' = 1'); if (!$user->authorise('core.admin')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } if (Multilanguage::isEnabled()) { $tag = Factory::getLanguage()->getTag(); $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')'); } $query->order('a.title'); $db->setQuery($query, 0); return $db->loadObjectList(); } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkHelper::route($url); } // remove Itemid if "home" $url = WFLinkHelper::removeHomeItemId($url); // remove Itemid if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) { $url = WFLinkHelper::removeItemId($url); } return $url; } }