本文整理汇总了PHP中shGetComponentPrefix函数的典型用法代码示例。如果您正苦于以下问题:PHP shGetComponentPrefix函数的具体用法?PHP shGetComponentPrefix怎么用?PHP shGetComponentPrefix使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了shGetComponentPrefix函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: shAkeebasubsMenuName
function shAkeebasubsMenuName($task, $Itemid, $option, $shLangName)
{
$sefConfig =& shRouter::shGetConfig();
$shArsDownloadName = shGetComponentPrefix($option);
if (empty($shArsDownloadName)) {
$shArsDownloadName = getMenuTitle($option, $task, $Itemid, null, $shLangName);
}
if (empty($shArsDownloadName) || $shArsDownloadName == '/') {
$shArsDownloadName = 'AkeebaReleaseSystem';
}
return str_replace('.', $sefConfig->replacement, $shArsDownloadName);
}
示例2: create
function create($string, &$vars, &$shAppendString, $shLanguage, $shSaveString = '', &$originalUri)
{
$sefConfig =& shRouter::shGetConfig();
// get DB
$database =& JFactory::getDBO();
_log('Calling sef404 create function with ' . $string);
if ($sefConfig->shInsertGlobalItemidIfNone && !empty($GLOBALS['Itemid'])) {
// V 1.2.4.t
$shCurrentItemid = $GLOBALS['Itemid'];
} else {
$shCurrentItemid = null;
}
_log('CurrentItemid = ' . $shCurrentItemid);
$index = str_replace($GLOBALS['shConfigLiveSite'], '', $_SERVER['PHP_SELF']);
$base = dirname($index);
$base .= $base == '/' ? '' : '/';
_log('Extracting $vars:', $vars);
extract($vars);
if (isset($title)) {
// V 1.2.4.r : protect against components using 'title' as GET vars (com_jim for instance)
$sh404SEF_title = $title;
}
// means that $sh404SEF_title has to be used in plugins or extensions
$title = array();
// V 1.2.4.r
// get extension plugin
$extPlugin =& Sh404sefFactory::getExtensionPlugin($option);
// which plugin file are we supposed to use?
$extPluginPath = $extPlugin->getSefPluginPath($vars);
$pluginType = $extPlugin->getPluginType();
// use Joomla router.php file in extension dir
switch ($pluginType) {
case Sh404sefClassBaseextplugin::TYPE_JOOMLA_ROUTER:
// Load the plug-in file.
_log('Loading component own router.php file');
$functionName = ucfirst(str_replace('com_', '', $option)) . 'BuildRoute';
if (!function_exists($functionName)) {
include JPATH_ROOT . DS . 'components' . DS . $option . DS . 'router.php';
}
$originalVars = empty($originalUri) ? $vars : $originalUri->getQuery($asArray = true);
$title = $functionName($originalVars);
//$title = shRemoveSlugs( $title, $removeWhat = 'removeId');
global $mainframe;
$router =& $mainframe->getRouter();
$title = $router->_encodeSegments($title);
// manage GET var lists ourselves, as Joomla router.php does not do it
if (!empty($vars)) {
// there are some unused GET vars, we must transfer them to our mechanism, so
// that they are eventually appended to the sef url
foreach ($vars as $k => $v) {
switch ($k) {
case 'option':
case 'Itemid':
shRemoveFromGETVarsList($k);
break;
default:
// if variable has not been used in sef url, add it to list of variables to be
// appended to the url as query string elements
if (array_key_exists($k, $originalVars)) {
shAddToGETVarsList($k, $v);
} else {
shRemoveFromGETVarsList($k);
}
break;
}
}
}
// special case for search component, as router.php encode the search word in the url
// wa can't do that, as we are storing each url in the db
if (isset($originalVars['option']) && $originalVars['option'] == 'com_search' && !empty($vars['searchword'])) {
// router.php has encoded that in the url, we need to undo
$title = array();
$originalVars['searchword'] = $vars['searchword'];
shAddToGETVarsList('searchword', $vars['searchword']);
if (!empty($vars['view'])) {
$vars['view'] = $vars['view'];
shAddToGETVarsList('view', $vars['view']);
}
}
// handle menu items, having only a single Itemid in the url
// (router.php will return an empty array in that case, even if we have restored
// the full non-sef url, as we already did)
/*
* Build the application route
*/
$tmp = '';
if (empty($title) && isset($vars['Itemid']) && !empty($vars['Itemid'])) {
$menu =& shRouter::shGetMenu();
$item = $menu->getItem($vars['Itemid']);
if (is_object($item) && $vars['option'] == $item->component) {
$title[] = $item->route;
}
}
if (empty($title)) {
//$title[] = 'comp';
$title[] = substr($vars['option'], 4);
}
// add user defined prefix
$prefix = shGetComponentPrefix($option);
if (!empty($prefix)) {
//.........这里部分代码省略.........
示例3: shRemoveFromGETVarsList
}
if (!empty($lang)) {
shRemoveFromGETVarsList('lang');
}
if (!empty($Itemid)) {
shRemoveFromGETVarsList('Itemid');
}
// start IJoomla specific stuff
$func = isset($func) ? @$func : null;
if (!empty($func)) {
shRemoveFromGETVarsList('func');
}
$task = isset($task) ? @$task : null;
$Itemid = isset($Itemid) ? @$Itemid : null;
// shumisha : insert magazine name from menu
$shIJoomlaMagName = shGetComponentPrefix($option);
$shIJoomlaMagName = empty($shIJoomlaMagName) ? getMenuTitle($option, isset($task) ? @$task : null, $Itemid, '', $shLangName) : $shIJoomlaMagName;
$shIJoomlaMagName = empty($shIJoomlaMagName) || $shIJoomlaMagName == '/' ? 'Magazine' : $shIJoomlaMagName;
// V 1.2.4.t
switch ($func) {
case 'author_articles':
if ($sefConfig->shInsertIJoomlaMagName) {
$title[] = $shIJoomlaMagName;
}
if (!empty($authorid)) {
try {
$result = ShlDbHelper::selectObject('#__users', array('id', 'name'), array('id' => $authorid));
$shRef = empty($result) ? $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_AUTHOR'] . $sefConfig->replacement . $authorid : ($sefConfig->shInsertAuthorId ? $authorid . $sefConfig->replacement : '');
// if name, put ID only if requested
$title[] = $shRef . (empty($result) ? '' : $result->name);
shRemoveFromGETVarsList('authorid');
示例4: shRemoveFromGETVarsList
shRemoveFromGETVarsList('order_by');
$texpricemax = isset($texpricemax) ? @$texpricemax : null;
$texpricemin = isset($texpricemin) ? @$texpricemin : null;
$payment_method_id = isset($payment_method_id) ? @$payment_method_id : null;
$shipping_rate_id = isset($shipping_rate_id) ? @$shipping_rate_id : null;
$sql = "SELECT * FROM #__menu WHERE id = '{$Itemid}' AND link like '%option=com_redshop%' AND link like '%view={$view}%'";
$db->setQuery($sql);
$menu = $db->loadObject();
if (count($menu) == 0) {
$menu = new stdClass();
$menu->params = '';
$menu->title = '';
}
$myparams = new JRegistry($menu->params);
// Set redSHOP prefix
$component_prefix = shGetComponentPrefix('com_redshop');
if (trim($component_prefix) != "") {
$title[] = $component_prefix;
}
switch ($view) {
case 'category':
// If link set From Manufacturer detail Page
if ($manufacturer_id) {
$sql = "SELECT sef_url,manufacturer_name FROM #__redshop_manufacturer WHERE manufacturer_id = '{$manufacturer_id}'";
$db->setQuery($sql);
$manufacturer = $db->loadObject();
$title[] = JFilterOutput::stringURLSafe($manufacturer->manufacturer_name);
}
if (!$cid) {
$cid = $myparams->get('categoryid');
}
示例5: shRemoveFromGETVarsList
// remove common URL from GET vars list, so that they don't show up as query string in the URL
shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('lang');
if (!empty($Itemid)) {
shRemoveFromGETVarsList('Itemid');
}
if (!empty($limit)) {
shRemoveFromGETVarsList('limit');
}
if (isset($limitstart)) {
shRemoveFromGETVarsList('limitstart');
}
// start by inserting the menu element title (just an idea, this is not required at all)
$task = isset($task) ? $task : null;
$Itemid = isset($Itemid) ? $Itemid : null;
$shJCommentsName = shGetComponentPrefix($option);
$shJCommentsName = empty($shJCommentsName) ? getMenuTitle($option, null, $Itemid, null, $shLangName) : $shJCommentsName;
$shJCommentsName = empty($shJCommentsName) || $shJCommentsName == '/' ? 'Comments' : $shJCommentsName;
switch ($task) {
case 'captcha':
$title[] = $shJCommentsName;
$title[] = 'captcha';
break;
case 'rss':
$title[] = $shJCommentsName;
$title[] = 'rss';
break;
case 'rss_full':
$title[] = $shJCommentsName;
$title[] = 'feed';
$title[] = 'full';
示例6: isset
return false;
}
}
}
# Include the config file
require_once sh404SEF_ABS_PATH . 'components/com_mtree/mtree.class.php';
# Inlcude back-end class
require_once sh404SEF_ABS_PATH . 'administrator/components/com_mtree/admin.mtree.class.php';
$task = isset($task) ? $task : null;
$Itemid = isset($Itemid) ? $Itemid : null;
// V 1.2.4.t
$link_id = isset($link_id) ? $link_id : null;
$cat_id = isset($cat_id) ? $cat_id : null;
$user_id = isset($user_id) ? $user_id : null;
// shumisha : insert component name from menu
$shMTreeName = shGetComponentPrefix($option);
$shMTreeName = empty($shMTreeName) ? getMenuTitle($option, null, $Itemid, null, $shLangName) : $shMTreeName;
$shMTreeName = empty($shMTreeName) || $shMTreeName == '/' ? 'Directory' : $shMTreeName;
// V 1.2.4.t
if ($sefConfig->shInsertMTreeName && !empty($shMTreeName)) {
$title[] = $shMTreeName;
}
switch ($task) {
# List Categories (listcats)
case 'listcats':
if ($cat_id == 0) {
// V 1.2.4.t 23/08/2007 18:20:20
if (empty($title)) {
$title[] = $shMTreeName;
}
shRemoveFromGETVarsList('cat_id');
示例7: array
$shLangName = '';
$shLangIso = '';
$title = array();
$shItemidString = '';
$dosef = shInitializePlugin($lang, $shLangName, $shLangIso, $option);
if ($dosef == false) {
return;
}
// ------------------ standard plugin initialize function - don't change ---------------------------
// ------------------ load language file - adjust as needed ----------------------------------------
$shLangIso = shLoadPluginLanguage('', $shLangIso, '');
// ------------------ load language file - adjust as needed ----------------------------------------
// shumisha : insert component name from menu
$task = isset($task) ? @$task : null;
$Itemid = isset($Itemid) ? @$Itemid : null;
$shRsGallery2Name = shGetComponentPrefix($option);
$shRsGallery2Name = empty($shRsGallery2Name) ? getMenuTitle($option, $task, $Itemid, null, $shLangName) : $shRsGallery2Name;
$shRsGallery2Name = empty($shRsGallery2Name) || $shRsGallery2Name == '/' ? 'RSGallery1' : $shRsGallery2Name;
if ($sefConfig->shInsertRsGallery2Name && !empty($shRsGallery2Name)) {
$title[] = $shRsGallery2Name;
}
//load gallery name
if (isset($catid)) {
$query_gal = "\r\n\t\tSELECT `name`\r\n\t\tFROM `#__rsgallery2_galleries`\r\n\t\tWHERE `id` = '{$catid}'\r\n\t\t";
$database->setQuery($query_gal);
$gallery = $database->loadResult();
}
//load imagename
if (isset($limitstart)) {
$order = $limitstart + 1;
}
示例8: shRemoveFromGETVarsList
shRemoveFromGETVarsList('view');
}
if (!empty($Itemid)) {
shRemoveFromGETVarsList('Itemid');
}
if (!empty($limit)) {
shRemoveFromGETVarsList('limit');
}
if (isset($limitstart)) {
shRemoveFromGETVarsList('limitstart');
}
// limitstart can be zero
// start by inserting the menu element title (just an idea, this is not required at all)
$view = isset($view) ? @$view : null;
$Itemid = isset($Itemid) ? @$Itemid : null;
$shName = shGetComponentPrefix($option);
$shName = empty($shName) ? getMenuTitle($option, '', $Itemid, null, $shLangName) : $shName;
$shName = empty($shName) || $shName == '/' ? 'jea' : $shName;
switch ($view) {
case 'properties':
if (!empty($id)) {
shRemoveFromGETVarsList('id');
}
$title[] = $shName;
if (!empty($id)) {
$q = 'SELECT p.id AS id, ttype.value AS type, ttown.value AS town FROM #__jea_properties AS p' . PHP_EOL . 'LEFT JOIN #__jea_types as ttype ON ttype.id = p.type_id' . PHP_EOL . 'LEFT JOIN #__jea_towns as ttown ON ttown.id = p.town_id' . PHP_EOL . 'WHERE p.id = ' . intval($id);
$database->setQuery($q);
$property = $database->loadObject();
$title[] = $id . '-' . $property->type . '--' . $property->town;
}
break;
示例9: shAddToGETVarsList
case 'tags':
$idname = EasyBlogRouter::getTagPermalink($id);
break;
case 'teamblog':
$idname = EasyBlogRouter::getTeamBlogPermalink($id);
break;
default:
$idname = '';
}
}
if (empty($Itemid)) {
$Itemid = EasyBlogRouter::getItemId($view);
shAddToGETVarsList('Itemid', $Itemid);
}
}
$easyblogName = shGetComponentPrefix($option);
$easyblogName = empty($easyblogName) ? getMenuTitle($option, $task, $Itemid, null, $shLangName) : $easyblogName;
$easyblogName = empty($easyblogName) || $easyblogName == '/' ? 'EasyBlog' : $easyblogName;
$title[] = $easyblogName;
$validViews = array('archive', 'blogger', 'categories', 'dashboard', 'entry', 'featured', 'images', 'latest', 'login', 'myblog', 'ratings', 'search', 'subscription', 'tags', 'teamblog', 'trackback');
$add_idname = true;
if (isset($view) && $view == 'entry') {
unset($view);
shRemoveFromGETVarsList('view');
}
if (isset($view)) {
if ($config->get('main_sef') != 'simple' || $view != 'entry') {
if (in_array($view, $validViews)) {
$title[] = JText::_('COM_EASYBLOG_SH404_VIEW_' . JString::strtoupper($view));
}
}
示例10: array_unshift
array_unshift($title, $menuRoute);
}
}
}
}
}
}
}
}
if (!empty($title)) {
// add shop menu item, if asked to
if ($sefConfig->shVmInsertShopName) {
array_unshift($title, $shopName);
}
// add user defined prefix
$prefix = shGetComponentPrefix($option);
if (!empty($prefix)) {
array_unshift($title, $prefix);
}
$title = empty($title) ? $title : $pageInfo->router->encodeSegments($title);
}
// manage GET var lists ourselves, as Joomla router.php does not do it
if (!empty($vars)) {
// there are some unused GET vars, we must transfer them to our mechanism, so
// that they are eventually appended to the sef url
foreach ($vars as $k => $v) {
switch ($k) {
case 'option':
case 'Itemid':
case 'lang':
shRemoveFromGETVarsList($k);
示例11: isset
$catData[$shLangName][$catId]['sec'] = $sec;
}
} else {
$cat = $catData[$shLangName][$catId]['cat'];
$sec = $catData[$shLangName][$catId]['sec'];
}
return !empty($cat);
}
}
$task = isset($task) ? $task : null;
$id = isset($id) ? $id : null;
$Itemid = isset($Itemid) ? $Itemid : null;
$limit = isset($limit) ? $limit : null;
$limitstart = isset($limitstart) ? $limitstart : null;
// shumisha : insert news portal name from menu
$shNewsPortalName = shGetComponentPrefix($option);
$shNewsPortalName = empty($shNewsPortalName) ? getMenuTitle($option, @$task, $Itemid, '', $shLangName) : $shNewsPortalName;
$shNewsPortalName = empty($shNewsPortalName) || $shNewsPortalName == '/' ? 'News' : $shNewsPortalName;
// V 1.2.4.t
switch ($task) {
case 'section':
if ($sefConfig->shInsertNewsPortalName) {
$title[] = $shNewsPortalName;
}
$sectionTitle = shGetNEWSPSection($id, $option, $shLangName);
if (!empty($sectionTitle)) {
$title[] = $sectionTitle;
$title[] = '/';
shRemoveFromGETVarsList('section');
} else {
$dosef = false;
示例12: array
// ------------------ standard plugin initialize function - don't change ---------------------------
global $sh_LANG;
$sefConfig =& Sh404sefFactory::getConfig();
$shLangName = '';
$shLangIso = '';
$title = array();
$shItemidString = '';
$dosef = shInitializePlugin($lang, $shLangName, $shLangIso, $option);
if ($dosef == false) {
return;
}
// ------------------ standard plugin initialize function - don't change ---------------------------
// ------------------ load language file - adjust as needed ----------------------------------------
$shLangIso = shLoadPluginLanguage('com_newsfeeds', $shLangIso, 'COM_SH404SEF_CREATE_NEW_NEWSFEED');
// ------------------ load language file - adjust as needed ----------------------------------------
$shNewsfeedName = shGetComponentPrefix($option);
$shNewsfeedName = empty($shNewsfeedName) ? getMenuTitle($option, isset($view) ? $view : null, isset($Itemid) ? $Itemid : null, null, $shLangName) : $shNewsfeedName;
$shNewsfeedName = empty($shNewsfeedName) || $shNewsfeedName == '/' ? 'Newsfeed' : $shNewsfeedName;
if (!empty($shNewsfeedName)) {
$title[] = $shNewsfeedName;
}
// V 1.2.4.t
$view = isset($view) ? $view : null;
$slugsModel = Sh404sefModelSlugs::getInstance();
switch ($view) {
case 'newsfeed':
if (!empty($catid)) {
// V 1.2.4.q
try {
$title = $slugsModel->getCategorySlugArray('com_newsfeeds', $catid, shSEFConfig::CAT_ALL_NESTED_CAT, $useAlias = false, $insertId = false, $menuItemTitle = '', $shLangName);
} catch (Exception $e) {
示例13: create
function create($string, &$vars, &$shAppendString, $shLanguage, $shSaveString = '', &$originalUri)
{
$sefConfig =& shRouter::shGetConfig();
// get DB
$database =& JFactory::getDBO();
_log('Calling sef404 create function with ' . $string);
if ($sefConfig->shInsertGlobalItemidIfNone && !empty($GLOBALS['Itemid'])) {
// V 1.2.4.t
$shCurrentItemid = $GLOBALS['Itemid'];
} else {
$shCurrentItemid = null;
}
$index = str_replace($GLOBALS['shConfigLiveSite'], '', $_SERVER['PHP_SELF']);
$base = dirname($index);
$base .= $base == '/' ? '' : '/';
extract($vars);
if (isset($title)) {
// V 1.2.4.r : protect against components using 'title' as GET vars (com_jim for instance)
$sh404SEF_title = $title;
}
// means that $sh404SEF_title has to be used in plugins or extensions
$title = array();
// V 1.2.4.r
// Plug-in system.
$shDoNotOverride = in_array(str_replace('com_', '', $option), $sefConfig->shDoNotOverrideOwnSef);
// look first in component owndir for a joomla sef router.php file
if (shFileExists(JPATH_ROOT . DS . 'components' . DS . $option . DS . 'router.php') && ($shDoNotOverride || !$shDoNotOverride && !shFileExists(sh404SEF_ABS_PATH . 'components/com_sh404sef/sef_ext/' . $option . '.php') && !shFileExists(JPATH_ROOT . DS . 'components/' . $option . '/sef_ext/' . $option . '.php'))) {
// but we don't have a plugin
// Load the plug-in file.
_log('Loading component own router.php file');
$functionName = ucfirst(str_replace('com_', '', $option)) . 'BuildRoute';
if (!function_exists($functionName)) {
include JPATH_ROOT . DS . 'components' . DS . $option . DS . 'router.php';
}
$originalVars = empty($originalUri) ? $vars : $originalUri->getQuery($asArray = true);
$title = $functionName($originalVars);
//$title = shRemoveSlugs( $title, $removeWhat = 'removeId');
global $mainframe;
$router =& $mainframe->getRouter();
$title = $router->_encodeSegments($title);
// manage GET var lists ourselves, as Joomla router.php does not do it
if (!empty($vars)) {
// there are some unused GET vars, we must transfer them to our mechanism, so
// that they are eventually appended to the sef url
foreach ($vars as $k => $v) {
switch ($k) {
case 'option':
case 'Itemid':
shRemoveFromGETVarsList($k);
break;
default:
// if variable has not been used in sef url, add it to list of variables to be
// appended to the url as query string elements
if (array_key_exists($k, $originalVars)) {
shAddToGETVarsList($k, $v);
} else {
shRemoveFromGETVarsList($k);
}
break;
}
}
}
// special case for search component, as router.php encode the search word in the url
// wa can't do that, as we are storing each url in the db
if (isset($originalVars['option']) && $originalVars['option'] == 'com_search' && !empty($vars['searchword'])) {
// router.php has encoded that in the url, we need to undo
$title = array();
$originalVars['searchword'] = $vars['searchword'];
shAddToGETVarsList('searchword', $vars['searchword']);
if (!empty($vars['view'])) {
$vars['view'] = $vars['view'];
shAddToGETVarsList('view', $vars['view']);
}
}
// handle menu items, having only a single Itemid in the url
// (router.php will return an empty array in that case, even if we have restored
// the full non-sef url, as we already did)
/*
* Build the application route
*/
$tmp = '';
if (empty($title) && isset($vars['Itemid']) && !empty($vars['Itemid'])) {
$menu =& shRouter::shGetMenu();
$item = $menu->getItem($vars['Itemid']);
if (is_object($item) && $vars['option'] == $item->component) {
$title[] = $item->route;
}
}
if (empty($title)) {
//$title[] = 'comp';
$title[] = substr($vars['option'], 4);
}
// add user defined prefix
$prefix = shGetComponentPrefix($option);
if (!empty($prefix)) {
array_unshift($title, $prefix);
}
// now process the resulting title string
$string = shFinalizePlugin($string, $title, $shAppendString, '', isset($limit) ? @$limit : null, isset($limitstart) ? @$limitstart : null, isset($shLangName) ? @$shLangName : null, isset($showall) ? @$showall : null);
} else {
//.........这里部分代码省略.........
示例14: while
} else {
do {
// all categories and subcategories. We don't really need id, as path
$title[] = ($sefConfig->shDMInsertCategoryId ? $DMtree[$shMosConfig_locale][$category_id]->id . $sefConfig->replacement : '') . $DMtree[$shMosConfig_locale][$category_id]->title;
// will always be unique
$category_id = $DMtree[$shMosConfig_locale][$category_id]->parent_id;
} while ($category_id != 0);
}
return array_reverse($title);
}
}
$task = isset($task) ? @$task : null;
$Itemid = isset($Itemid) ? @$Itemid : null;
// V 1.2.4.t
// shumisha : insert component name from menu
$shDocmanName = shGetComponentPrefix($option);
$shDocmanName = empty($shDocmanName) ? getMenuTitle($option, null, $Itemid, null, $shLangName) : $shDocmanName;
$shDocmanName = empty($shDocmanName) || $shDocmanName == '/' ? 'Files' : $shDocmanName;
// V 1.2.4.t
if ($sefConfig->shInsertDocmanName && !empty($shDocmanName)) {
$title[] = $shDocmanName;
}
if (!empty($gid) && (strpos($task, 'doc_') !== false || $task == 'license_result')) {
$docName = shDocmanDocumentName($gid, $option, $shLangName);
} else {
$docName = '';
}
switch ($task) {
case 'cat_view':
if (!empty($gid)) {
$title = array_merge($title, dm_sef_get_category_array($gid, $option, $shLangName));
示例15: shInitializePlugin
$dosef = shInitializePlugin($lang, $shLangName, $shLangIso, $option);
if ($dosef == false) {
return;
}
// ------------------ standard plugin initialize function - don't change ---------------------------
// ------------------ load language file - adjust as needed ----------------------------------------
$shLangIso = shLoadPluginLanguage('com_weblinks', $shLangIso, 'COM_SH404SEF_CREATE_NEW_LINK');
// ------------------ load language file - adjust as needed ----------------------------------------
// collect probable url vars
$view = isset($view) ? $view : null;
$task = isset($task) ? $task : null;
$Itemid = isset($Itemid) ? $Itemid : null;
$id = isset($id) ? $id : null;
$catid = isset($catid) ? $catid : null;
// optional prefix
$shWeblinksName = shGetComponentPrefix($option);
if (!empty($shWeblinksName) && $shWeblinksName != '/') {
$title[] = $shWeblinksName;
}
// joomla content models
$slugsModel = Sh404sefModelSlugs::getInstance();
$menuItemTitle = getMenuTitle(null, $view, isset($Itemid) ? $Itemid : null, '', $shLangName);
$uncategorizedPath = $sefConfig->slugForUncategorizedWeblinks == shSEFConfig::COM_SH404SEF_UNCATEGORIZED_EMPTY ? '' : $menuItemTitle;
$slugsArray = array();
if ($task == 'weblink.go') {
// jumping to link target
if (!empty($id)) {
try {
$weblinkDetails = ShlDbHelper::selectObject('#__weblinks', array('id', 'title', 'catid'), array('id' => $id));
$slugsArray[] = $weblinkDetails->title;
} catch (Exception $e) {