本文整理汇总了PHP中shRemoveFromGETVarsList函数的典型用法代码示例。如果您正苦于以下问题:PHP shRemoveFromGETVarsList函数的具体用法?PHP shRemoveFromGETVarsList怎么用?PHP shRemoveFromGETVarsList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了shRemoveFromGETVarsList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: shFetchRowName
function shFetchRowName($rowid, $listid) {
if (empty($rowid) || $rowid == '-1') return null;
$database = FabrikWorker::getDbo();
$listModel = JModel::getInstance('View', 'FabrikFEModel');
$listModel->setId($listid);
$table = $listModel->getTable();
$db_primary_key = $table->db_primary_key;
$db_primary_key = explode('.', $db_primary_key);
$db_table = $db_primary_key[0];
$db_pk = $db_primary_key[1];
$sqlrow = 'SELECT title_sef, '.$db_pk.' FROM '.$db_table.' WHERE '.$db_pk.' = \''.$rowid.'\'';
$database->setQuery($sqlrow);
if (empty($shLangName))
$rowLabel = $database->loadResult('title_sef', false);
if (!empty($rowLabel)) {
shRemoveFromGETVarsList('rowid');
}
return isset($rowLabel) ? $rowLabel : '';
}
示例2: shGetJSUsernameSlug
function shGetJSUsernameSlug($id, $option, $shLangName)
{
$sefConfig =& shRouter::shGetConfig();
$slug = '';
if (empty($id)) {
return $slug;
}
$database =& JFactory::getDBO();
$query = 'SELECT id, username, name FROM #__users WHERE id =' . $id;
$database->setQuery($query);
if (!shTranslateUrl($option, $shLangName)) {
$result = $database->loadObject(false);
} else {
$result = $database->loadObject();
}
// just in case
if (empty($result)) {
return 'user' . $sefConfig->replacement . $id;
}
// what prefix ?
$prefix = $sefConfig->shJSInsertUserId ? $id : '';
// what should be use as name ?
$name = $sefConfig->shJSInsertUserFullName ? $result->name : '';
if (empty($name)) {
$name = $sefConfig->shJSInsertUsername ? $result->username : '';
}
if (!empty($name)) {
$slug = (empty($prefix) ? '' : $prefix . $sefConfig->replacement) . $name;
}
// if we added the user name or full name to sef url
// remove it from query string
if (!empty($name) && ($sefConfig->shJSInsertUsername || $sefConfig->shJSInsertUserFullName)) {
shRemoveFromGETVarsList('userid');
}
return $slug;
}
示例3: shRemoveFromGETVarsList
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;
case 'manage':
$dosef = false;
// these tasks do not require SEF URL
break;
}
// ------------------ standard plugin finalize function - don't change ---------------------------
示例4: shRemoveFromGETVarsList
$title[] = '/';
break;
default:
$dosef = false;
break;
}
shRemoveFromGETVarsList('catid');
/* get catid */
if (isset($catid) && !$shSobi2Details) {
// if task=sobi2Details, catid is NOT item category, but Current category!
shSobi2GetCatName($catid, $title);
shRemoveFromGETVarsList('catid');
}
/* and now get sobiid */
if (!empty($sobi2Id) && $shSobi2Details) {
$shTemp = shSobi2GetItemName($sobi2Id);
if (sh404SEF_SOBI2_PARAMS_ALWAYS_INCLUDE_CATS) {
// params say include cat, but there is no cat id
$shCatId = shSobi2GetItemCat($sobi2Id);
if (!empty($shCatId)) {
shSobi2GetCatName($shCatId, $title);
}
}
$title[] = empty($shTemp) ? $sh_LANG[$shLangIso]['_SH404SEF_SOBI2_ENTRY'] . $sobi2Id : $shTemp;
shRemoveFromGETVarsList('sobi2Id');
}
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef) {
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, isset($limit) ? @$limit : null, isset($limitstart) ? @$limitstart : null, isset($shLangName) ? @$shLangName : null);
}
// ------------------ standard plugin finalize function - don't change ---------------------------
示例5: shRemoveFromGETVarsList
if (isset($type)) {
shRemoveFromGETVarsList('type');
}
if (!empty($catid)) {
shRemoveFromGETVarsList('catid');
}
// V 1.2.4.m
if (isset($showall)) {
shRemoveFromGETVarsList('showall');
}
if (empty($page)) {
// remove page if not set or 0
shRemoveFromGETVarsList('page');
}
if (isset($print)) {
shRemoveFromGETVarsList('print');
}
if (isset($tmpl) && $tmpl == 'component') {
// remove if 'component', show otherwise as querystring
shRemoveFromGETVarsList('tmpl');
}
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef) {
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, isset($limit) ? $limit : null, isset($limitstart) ? $limitstart : null, isset($shLangName) ? $shLangName : null, isset($showall) ? $showall : null);
}
// ------------------ standard plugin finalize function - don't change ---------------------------
} else {
// this is multipage homepage
$title[] = '/';
$string = sef_404::sefGetLocation($string, $title, null, isset($limit) ? $limit : null, isset($limitstart) ? $limitstart : null, isset($shLangName) ? $shLangName : null, isset($showall) ? $showall : null);
}
示例6: 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)) {
//.........这里部分代码省略.........
示例7: substr
$itemId = substr($itemId, 0, $pos);
$app = JFactory::getApplication();
$menus = $app->getMenu();
$menusId = $menus->getMenu();
$title[] = $menusId[$itemId]->title;
shRemoveFromGETVarsList('id');
shMustCreatePageId('set', true);
} else {
if (isset($id)) {
$title[] = shFetchVizName($id);
shRemoveFromGETVarsList('id');
shMustCreatePageId('set', true);
}
}
break;
}
shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('calculations');
shRemoveFromGETVarsList('formid');
shRemoveFromGETVarsList('listid');
shRemoveFromGETVarsList('cid');
shRemoveFromGETVarsList('view');
shRemoveFromGETVarsList('Itemid');
shRemoveFromGETVarsList('lang');
shRemoveFromGETVarsList('calculations');
shRemoveFromGETVarsList('random');
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($doSef) {
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, isset($limit) ? @$limit : null, isset($limitStart) ? @$limitStart : null, isset($shLangName) ? @$shLangName : null);
}
// ------------------ standard plugin finalize function - don't change ---------------------------
示例8: addLayout
function addLayout(&$title, $view, $layout)
{
$title[] = JString::ucwords(JText::_('COM_EASYSOCIAL_ROUTER_' . strtoupper($view) . '_LAYOUT_' . strtoupper($layout)));
shRemoveFromGETVarsList('layout');
}
示例9: switch
}
$Itemid = $match->id;
}
}
switch ($view) {
case 'xml':
$title[] = 'sitemap-xml' . (!empty($sitemap) && $sitemap > 1 ? "-{$sitemap}" : '');
//$sefConfig->suffix='.xml';
break;
default:
$shXmapName = getMenuTitle($option, isset($view) ? @$view : null, $Itemid, '', $shLangName);
$shXmapName = empty($shXmapName) || $shXmapName == '/' ? 'Site Map' : $shXmapName;
// V 1.2.4.t
$title[] = $shXmapName . (!empty($sitemap) ? "-{$sitemap}" : '');
break;
}
shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('Itemid');
shRemoveFromGETVarsList('lang');
if (!empty($view)) {
shRemoveFromGETVarsList('view');
}
if (!empty($sitemap) && $view != 'xml') {
shRemoveFromGETVarsList('sitemap');
}
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef) {
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, isset($limit) ? @$limit : null, isset($limitstart) ? @$limitstart : null, isset($shLangName) ? @$shLangName : null);
}
// ------------------ standard plugin finalize function - don't change ---------------------------
$sefConfig->suffix = $sefSuffix;
示例10: empty
}
$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);
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;
}
}
}
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef) {
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, isset($limit) ? $limit : null, isset($limitstart) ? $limitstart : null, isset($shLangName) ? $shLangName : null, isset($showall) ? $showall : null, $suppressPagination = true);
}
// ------------------ standard plugin finalize function - don't change ---------------------------
示例11: defined
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
if (isset($view)) {
addView($title, $view);
}
if (isset($type)) {
$title[] = $type;
shRemoveFromGETVarsList('type');
}
if (isset($filter)) {
$title[] = $filter;
shRemoveFromGETVarsList('filter');
}
if (isset($listId)) {
$title[] = getListAlias($listId);
shRemoveFromGETVarsList('listId');
}
if (isset($appId)) {
$title[] = getAppAlias($appId);
shRemoveFromGETVarsList('appId');
}
if (isset($filterid)) {
$title[] = $filterid;
shRemoveFromGETVarsList('filterid');
}
if (isset($groupId)) {
$title[] = getGroupAlias($groupId);
shRemoveFromGETVarsList('groupId');
}
示例12: shRemoveFromGETVarsList
$title[] = '/';
shRemoveFromGETVarsList('section');
} else {
$dosef = false;
}
break;
case 'category':
$cat = '';
$sec = '';
if (shGetNEWSPCategories($id, $option, $shLangName, $cat, $sec)) {
$title[] = $sec;
// section
$title[] = $cat;
// category
$title[] = '/';
shRemoveFromGETVarsList('category');
} else {
$dosef = false;
}
break;
case '':
$title[] = $shNewsPortalName;
$title[] = '/';
break;
default:
$dosef = false;
break;
}
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef) {
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, isset($limit) ? @$limit : null, isset($limitstart) ? @$limitstart : null, isset($shLangName) ? @$shLangName : null);
示例13: shGetJSUsernameSlug
function shGetJSUsernameSlug($id, $option, $shLangName)
{
$sefConfig =& Sh404sefFactory::getConfig();
$slug = '';
if (empty($id)) {
return $slug;
}
try {
$result = ShlDbHelper::selectObject('#__users', array('id', 'username', 'name'), array('id' => $id));
} catch (Exception $e) {
ShlSystem_Log::error('sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $e->getMessage());
}
// just in case
if (empty($result)) {
return 'user' . $sefConfig->replacement . $id;
}
// what prefix ?
$prefix = $sefConfig->shJSInsertUserId ? $id : '';
// what should be use as name ?
$name = $sefConfig->shJSInsertUserFullName ? $result->name : '';
if (empty($name)) {
$name = $sefConfig->shJSInsertUsername ? $result->username : '';
}
if (!empty($name)) {
$slug = (empty($prefix) ? '' : $prefix . $sefConfig->replacement) . $name;
}
// if we added the user name or full name to sef url
// remove it from query string
if (!empty($name) && ($sefConfig->shJSInsertUsername || $sefConfig->shJSInsertUserFullName)) {
shRemoveFromGETVarsList('userid');
}
return $slug;
}
示例14: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Determine how is the user's current id being set.
if (isset($userid)) {
$title[] = getUserAlias($userid);
shRemoveFromGETVarsList('userid');
}
if (isset($view)) {
addView($title, $view);
}
if (isset($filter)) {
$title[] = JString::ucwords(JText::_('COM_EASYSOCIAL_ROUTER_FRIENDS_FILTER_' . strtoupper($filter)));
shRemoveFromGETVarsList('filter');
}
示例15: shRemoveFromGETVarsList
break;
case 'new':
$title[] = $sh_LANG[$shLangIso]['COM_SH404SEF_CREATE_NEW_NEWSFEED'] . $sefConfig->suffix;
break;
default:
$title[] = '/';
// V 1.2.4.s
break;
}
shRemoveFromGETVarsList('option');
if (!empty($Itemid)) {
shRemoveFromGETVarsList('Itemid');
}
shRemoveFromGETVarsList('lang');
if (!empty($catid)) {
shRemoveFromGETVarsList('catid');
}
if (isset($id)) {
shRemoveFromGETVarsList('id');
}
if (!empty($view)) {
shRemoveFromGETVarsList('view');
}
if (!empty($feedid)) {
shRemoveFromGETVarsList('feedid');
}
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef) {
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, isset($limit) ? @$limit : null, isset($limitstart) ? @$limitstart : null, isset($shLangName) ? @$shLangName : null);
}
// ------------------ standard plugin finalize function - don't change ---------------------------