當前位置: 首頁>>代碼示例>>PHP>>正文


PHP t3lib_div::implodeArrayForUrl方法代碼示例

本文整理匯總了PHP中t3lib_div::implodeArrayForUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP t3lib_div::implodeArrayForUrl方法的具體用法?PHP t3lib_div::implodeArrayForUrl怎麽用?PHP t3lib_div::implodeArrayForUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在t3lib_div的用法示例。


在下文中一共展示了t3lib_div::implodeArrayForUrl方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: generateWorkspacePreviewLink

 /**
  * Generates a workspace preview link.
  *
  * @param integer $uid The ID of the record to be linked
  * @return string the full domain including the protocol http:// or https://, but without the trailing '/'
  */
 public function generateWorkspacePreviewLink($uid)
 {
     $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
     $ttlHours = ($ttlHours ? $ttlHours : 24 * 2) * 3600;
     $linkParams = array('ADMCMD_prev' => t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], $ttlHours, $this->getCurrentWorkspace()), 'id' => $uid);
     return t3lib_BEfunc::getViewDomain($uid) . '/index.php?' . t3lib_div::implodeArrayForUrl('', $linkParams);
 }
開發者ID:NaveedWebdeveloper,項目名稱:Test,代碼行數:13,代碼來源:ActionHandler.php

示例2: getPagePath

 /**
  * Creates URL to page using page id and parameters
  *
  * @param int $pageId
  * @param string $parameters
  * @return	string	Path to page or empty string
  */
 public static function getPagePath($pageId, $parameters = '')
 {
     if (is_array($parameters)) {
         $parameters = t3lib_div::implodeArrayForUrl('', $parameters);
     }
     $data = array('id' => intval($pageId));
     if ($parameters != '' && $parameters[0] == '&') {
         $data['parameters'] = $parameters;
     }
     $siteUrl = self::getSiteUrl($pageId);
     if ($siteUrl) {
         $url = $siteUrl . 'index.php?eID=pagepath&data=' . base64_encode(serialize($data));
         // Send TYPO3 cookies as this may affect path generation
         $headers = array('Cookie: fe_typo_user=' . $_COOKIE['fe_typo_user']);
         $result = t3lib_div::getURL($url, false, $headers);
         $urlParts = parse_url($result);
         if (!is_array($urlParts)) {
             // filter_var is too strict (for example, underscore characters make it fail). So we use parse_url here for a quick check.
             $result = '';
         } elseif ($result) {
             // See if we need to prepend domain part
             if ($urlParts['host'] == '') {
                 $result = rtrim($siteUrl, '/') . '/' . ltrim($result, '/');
             }
         }
     } else {
         $result = '';
     }
     return $result;
 }
開發者ID:educo-adymorz,項目名稱:typo3-pagepath,代碼行數:37,代碼來源:class.tx_pagepath_api.php

示例3: getTypoLink

 /**
  * Returns a linked string made from typoLink parameters.
  *
  * This function takes $label as a string, wraps it in a link-tag based on the $params string, which should contain data like that you would normally pass to the popular <LINK>-tag in the TSFE.
  * Optionally you can supply $urlParameters which is an array with key/value pairs that are rawurlencoded and appended to the resulting url.
  *
  * @param	object		cObject
  * @param	string		Text string being wrapped by the link.
  * @param	string		Link parameter; eg. "123" for page id, "kasperYYYY@typo3.com" for email address, "http://...." for URL, "fileadmin/blabla.txt" for file.
  * @param	array		An array with key/value pairs representing URL parameters to set. Values NOT URL-encoded yet.
  * @param	string		Specific target set, if any. (Default is using the current)
  * @param	array		Configuration
  * @return	string		The wrapped $label-text string
  * @see getTypoLink_URL()
  */
 public static function getTypoLink($cObj, $label, $params, $urlParameters = array(), $target = '', $conf = array())
 {
     $result = FALSE;
     if (is_object($cObj)) {
         $conf['parameter'] = $params;
         if ($target) {
             if (!isset($conf['target'])) {
                 $conf['target'] = $target;
             }
             if (!isset($conf['extTarget'])) {
                 $conf['extTarget'] = $target;
             }
         }
         if (is_array($urlParameters)) {
             if (count($urlParameters)) {
                 $conf['additionalParams'] .= t3lib_div::implodeArrayForUrl('', $urlParameters);
             }
         } else {
             $conf['additionalParams'] .= $urlParameters;
         }
         $result = $cObj->typolink($label, $conf);
     } else {
         $out = 'error in call of tx_div2007_alpha5::getTypoLink: parameter $cObj is not an object';
         debug($out, '$out');
         // keep this
     }
     return $result;
 }
開發者ID:raimundlandig,項目名稱:winkel.de-DEV,代碼行數:43,代碼來源:UrlUtility.php

示例4: main

 /**
  * Main function
  *
  * @return	void
  */
 function main()
 {
     global $LANG, $TCA, $BACK_PATH;
     $content = '';
     $param = t3lib_div::_GP('edit');
     $table = key($param);
     $uid = (string) key($param[$table]);
     $cmd = $param[$table][$uid];
     if (is_array($TCA[$table]) and $cmd == 'new') {
         $this->defaultPid = tx_dam_db::getPid();
         $getArray['edit'][$table][$this->defaultPid] = 'new';
         $getArray['defVals'] = t3lib_div::_GP('defVals');
         $getArray['defVals'][$table]['pid'] = $this->defaultPid;
         $getArray['returnUrl'] = $this->pObj->returnUrl;
         $getArray['redirect'] = $this->pObj->redirect;
         $getArray = t3lib_div::compileSelectedGetVarsFromArray('returnUrl,redirect,edit,defVals,overrideVals,columnsOnly,disHelp,noView,editRegularContentFromId', $getArray);
         $getUrl = t3lib_div::implodeArrayForUrl('', $getArray);
         header('Location: ' . $BACK_PATH . 'alt_doc.php?id=' . $this->defaultPid . $getUrl);
         exit;
     } else {
         $content .= 'wrong comand!';
     }
     #TODO do it always this way (with if)
     if ($this->pObj->returnUrl) {
         $content .= '<br /><br />' . $this->pObj->btn_back('', $this->pObj->returnUrl);
     }
     // todo csh
     #		$content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH'],'<br/>');
     return $content;
 }
開發者ID:NaveedWebdeveloper,項目名稱:Test,代碼行數:35,代碼來源:class.tx_damcatedit_cmd_new.php

示例5: getEntry

 /**
  * Renders entry for one page of the current document.
  *
  * @access	protected
  *
  * @param	integer		$number: The page to render
  * @param	string		$template: Parsed template subpart
  *
  * @return	string		The rendered entry ready for output
  */
 protected function getEntry($number, $template)
 {
     // Set current page if applicable.
     if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) {
         $markerArray['###STATE###'] = 'cur';
     } else {
         $markerArray['###STATE###'] = 'no';
     }
     // Set page number.
     $markerArray['###NUMBER###'] = $number;
     // Set pagination.
     $markerArray['###PAGINATION###'] = $this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['label'];
     // Get thumbnail or placeholder.
     if (!empty($this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['files'][$this->conf['fileGrpThumbs']])) {
         $thumbnailFile = $this->doc->getFileLocation($this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['files'][$this->conf['fileGrpThumbs']]);
     } elseif (!empty($this->conf['placeholder'])) {
         $thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']);
     } else {
         $thumbnailFile = t3lib_extMgm::siteRelPath($this->extKey) . 'plugins/pagegrid/placeholder.jpg';
     }
     $thumbnail = '<img alt="' . $markerArray['###PAGINATION###'] . '" src="' . $thumbnailFile . '" />';
     // Get new plugin variables for typolink.
     $piVars = $this->piVars;
     // Unset no longer needed plugin variables.
     // unset($piVars['pagegrid']) is for DFG Viewer compatibility!
     unset($piVars['pointer'], $piVars['DATA'], $piVars['pagegrid']);
     $piVars['page'] = $number;
     $linkConf = array('useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => t3lib_div::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), 'title' => $markerArray['###PAGINATION###']);
     $markerArray['###THUMBNAIL###'] = $this->cObj->typoLink($thumbnail, $linkConf);
     return $this->cObj->substituteMarkerArray($template, $markerArray);
 }
開發者ID:CalanthaC,項目名稱:goobi-presentation,代碼行數:41,代碼來源:class.tx_dlf_pagegrid.php

示例6: processDatamap_afterDatabaseOperations

 /**
  * Generate a different preview link
  *
  * @param string $status status
  * @param string $table table name
  * @param integer $recordUid id of the record
  * @param array $fields fieldArray
  * @param t3lib_TCEmain $parentObject parent Object
  * @return void
  */
 public function processDatamap_afterDatabaseOperations($status, $table, $recordUid, array $fields, t3lib_TCEmain $parentObject)
 {
     // Clear category cache
     if ($table === 'tx_news_domain_model_category') {
         $cache = t3lib_div::makeInstance('Tx_News_Service_CacheService', 'news_categorycache');
         $cache->flush();
     }
     // Preview link
     if ($table === 'tx_news_domain_model_news') {
         // direct preview
         if (!is_numeric($recordUid)) {
             $recordUid = $parentObject->substNEWwithIDs[$recordUid];
         }
         if (isset($GLOBALS['_POST']['_savedokview_x']) && !$fields['type']) {
             // If "savedokview" has been pressed and current article has "type" 0 (= normal news article)
             $pagesTsConfig = t3lib_BEfunc::getPagesTSconfig($GLOBALS['_POST']['popViewId']);
             if ($pagesTsConfig['tx_news.']['singlePid']) {
                 $record = t3lib_BEfunc::getRecord('tx_news_domain_model_news', $recordUid);
                 $parameters = array('no_cache' => 1, 'tx_news_pi1[controller]' => 'News', 'tx_news_pi1[action]' => 'detail', 'tx_news_pi1[news_preview]' => $record['uid']);
                 if ($record['sys_language_uid'] > 0) {
                     if ($record['l10n_parent'] > 0) {
                         $parameters['tx_news_pi1[news_preview]'] = $record['l10n_parent'];
                     }
                     $parameters['L'] = $record['sys_language_uid'];
                 }
                 $GLOBALS['_POST']['popViewId_addParams'] = t3lib_div::implodeArrayForUrl('', $parameters, '', FALSE, TRUE);
                 $GLOBALS['_POST']['popViewId'] = $pagesTsConfig['tx_news.']['singlePid'];
             }
         }
     }
 }
開發者ID:rafu1987,項目名稱:t3bootstrap-project,代碼行數:41,代碼來源:Tcemain.php

示例7: __construct

 /**
  * Creates an isntance of this class.
  *
  * @return void
  */
 public function __construct()
 {
     $urlParameters = tx_realurl::array_merge_recursive_overrule($_GET, $_POST);
     $this->currentPage = max(1, intval($urlParameters['page']));
     unset($urlParameters['page']);
     unset($urlParameters['cmd']);
     $this->baseURL = t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT') . '?' . t3lib_div::implodeArrayForUrl('', $urlParameters);
     $this->resultsPerPage = self::RESULTS_PER_PAGE_DEFAULT;
 }
開發者ID:hacksch,項目名稱:Realurl,代碼行數:14,代碼來源:class.tx_realurl_pagebrowser.php

示例8: orderParameters

function orderParameters($vars)	{

	$all = explode('&',$vars);
	$collect = array();
	foreach($all as $v)	{
		list($p,$val) = explode('=',$v,2);
		if (strlen($val))		$collect[rawurldecode($p)] = rawurldecode($val);
	}

	ksort($collect);
	return t3lib_div::implodeArrayForUrl('', $collect);
}
開發者ID:blumenbach,項目名稱:blumenbach-online.de,代碼行數:12,代碼來源:index.php

示例9: execute

 /**
  * Creates a link to a given page with a given link text with the current
  * tx_solr parameters appended to the URL
  *
  * @param	array	Array of arguments, [0] is the link text, [1] is the (optional) page Id to link to (otherwise TSFE->id), [2] are additional URL parameters, [3] use cache, defaults to FALSE
  * @return	string	complete anchor tag with URL and link text
  */
 public function execute(array $arguments = array())
 {
     $linkText = $arguments[0];
     $pageId = $arguments[1] ? intval($arguments[1]) : $GLOBALS['TSFE']->id;
     $additionalParameters = $arguments[2] ? $arguments[2] : '';
     $useCache = $arguments[3] ? TRUE : FALSE;
     $query = $this->search->getQuery();
     $prefix = 'tx_solr';
     $getParameters = t3lib_div::_GET($prefix);
     $piVars = is_array($getParameters) ? $getParameters : array();
     $queryParameters = array_merge($piVars, array('q' => $query->getKeywords()));
     $queryParameters = $query->removeUnwantedUrlParameters($queryParameters);
     $linkConfiguration = array('useCacheHash' => $useCache, 'no_cache' => FALSE, 'parameter' => $pageId, 'additionalParams' => t3lib_div::implodeArrayForUrl('', array($prefix => $queryParameters), '', TRUE) . $additionalParameters);
     return $this->contentObject->typoLink($linkText, $linkConfiguration);
 }
開發者ID:hkremer,項目名稱:Publieke-Omroep-Typo3,代碼行數:22,代碼來源:class.tx_solr_viewhelper_solrlink.php

示例10: linkData

 /**
  * The mother of all functions creating links/URLs etc in a TypoScript environment.
  * See the references below.
  * Basically this function takes care of issues such as type,id,alias and Mount Points, URL rewriting (through hooks), M5/B6 encoded parameters etc.
  * It is important to pass all links created through this function since this is the guarantee that globally configured settings for link creating are observed and that your applications will conform to the various/many configuration options in TypoScript Templates regarding this.
  *
  * @param	array		The page record of the page to which we are creating a link. Needed due to fields like uid, alias, target, no_cache, title and sectionIndex_uid.
  * @param	string		Default target string to use IF not $page['target'] is set.
  * @param	boolean		If set, then the "&no_cache=1" parameter is included in the URL.
  * @param	string		Alternative script name if you don't want to use $GLOBALS['TSFE']->config['mainScript'] (normally set to "index.php")
  * @param	array		Array with overriding values for the $page array.
  * @param	string		Additional URL parameters to set in the URL. Syntax is "&foo=bar&foo2=bar2" etc. Also used internally to add parameters if needed.
  * @param	string		If you set this value to something else than a blank string, then the typeNumber used in the link will be forced to this value. Normally the typeNum is based on the target set OR on $GLOBALS['TSFE']->config['config']['forceTypeValue'] if found.
  * @param	string		The target Doamin, if any was detected in typolink
  * @return	array		Contains keys like "totalURL", "url", "sectionIndex", "linkVars", "no_cache", "type", "target" of which "totalURL" is normally the value you would use while the other keys contains various parts that was used to construct "totalURL"
  * @see tslib_frameset::frameParams(), tslib_cObj::typoLink(), tslib_cObj::SEARCHRESULT(), TSpagegen::pagegenInit(), tslib_menu::link()
  */
 function linkData($page, $oTarget, $no_cache, $script, $overrideArray = '', $addParams = '', $typeOverride = '', $targetDomain = '')
 {
     global $TYPO3_CONF_VARS;
     $LD = array();
     // Overriding some fields in the page record and still preserves the values by adding them as parameters. Little strange function.
     if (is_array($overrideArray)) {
         foreach ($overrideArray as $theKey => $theNewVal) {
             $addParams .= '&real_' . $theKey . '=' . rawurlencode($page[$theKey]);
             $page[$theKey] = $theNewVal;
         }
     }
     // Adding Mount Points, "&MP=", parameter for the current page if any is set:
     if (!strstr($addParams, '&MP=')) {
         if (trim($GLOBALS['TSFE']->MP_defaults[$page['uid']])) {
             // Looking for hardcoded defaults:
             $addParams .= '&MP=' . rawurlencode(trim($GLOBALS['TSFE']->MP_defaults[$page['uid']]));
         } elseif ($GLOBALS['TSFE']->config['config']['MP_mapRootPoints']) {
             // Else look in automatically created map:
             $m = $this->getFromMPmap($page['uid']);
             if ($m) {
                 $addParams .= '&MP=' . rawurlencode($m);
             }
         }
     }
     // Setting ID/alias:
     if (!$script) {
         $script = $GLOBALS['TSFE']->config['mainScript'];
     }
     if ($page['alias']) {
         $LD['url'] = $script . '?id=' . rawurlencode($page['alias']);
     } else {
         $LD['url'] = $script . '?id=' . $page['uid'];
     }
     // Setting target
     $LD['target'] = trim($page['target']) ? trim($page['target']) : $oTarget;
     // typeNum
     $typeNum = $this->setup[$LD['target'] . '.']['typeNum'];
     if (!t3lib_div::testInt($typeOverride) && intval($GLOBALS['TSFE']->config['config']['forceTypeValue'])) {
         $typeOverride = intval($GLOBALS['TSFE']->config['config']['forceTypeValue']);
     }
     if (strcmp($typeOverride, '')) {
         $typeNum = $typeOverride;
     }
     // Override...
     if ($typeNum) {
         $LD['type'] = '&type=' . intval($typeNum);
     } else {
         $LD['type'] = '';
     }
     $LD['orig_type'] = $LD['type'];
     // Preserving the type number.
     // noCache
     $LD['no_cache'] = trim($page['no_cache']) || $no_cache ? '&no_cache=1' : '';
     // linkVars
     if ($GLOBALS['TSFE']->config['config']['uniqueLinkVars']) {
         if ($addParams) {
             $LD['linkVars'] = t3lib_div::implodeArrayForUrl('', t3lib_div::explodeUrl2Array($GLOBALS['TSFE']->linkVars . $addParams));
         } else {
             $LD['linkVars'] = $GLOBALS['TSFE']->linkVars;
         }
     } else {
         $LD['linkVars'] = $GLOBALS['TSFE']->linkVars . $addParams;
     }
     // Add absRefPrefix if exists.
     $LD['url'] = $GLOBALS['TSFE']->absRefPrefix . $LD['url'];
     // If the special key 'sectionIndex_uid' (added 'manually' in tslib/menu.php to the page-record) is set, then the link jumps directly to a section on the page.
     $LD['sectionIndex'] = $page['sectionIndex_uid'] ? '#c' . $page['sectionIndex_uid'] : '';
     // Compile the normal total url
     $LD['totalURL'] = $this->removeQueryString($LD['url'] . $LD['type'] . $LD['no_cache'] . $LD['linkVars'] . $GLOBALS['TSFE']->getMethodUrlIdToken) . $LD['sectionIndex'];
     // Call post processing function for link rendering:
     if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'])) {
         $_params = array('LD' => &$LD, 'args' => array('page' => $page, 'oTarget' => $oTarget, 'no_cache' => $no_cache, 'script' => $script, 'overrideArray' => $overrideArray, 'addParams' => $addParams, 'typeOverride' => $typeOverride, 'targetDomain' => $targetDomain), 'typeNum' => $typeNum);
         foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'] as $_funcRef) {
             t3lib_div::callUserFunction($_funcRef, $_params, $this);
         }
     }
     // Return the LD-array
     return $LD;
 }
開發者ID:zsolt-molnar,項目名稱:TYPO3-4.5-trunk,代碼行數:96,代碼來源:class.t3lib_tstemplate.php

示例11: showCollectionList

 /**
  * Builds a collection list
  *
  * @access	protected
  *
  * @return	string		The list of collections ready to output
  */
 protected function showCollectionList()
 {
     $additionalWhere = '';
     $orderBy = 'tx_dlf_collections.label';
     // Handle collections set by configuration.
     if ($this->conf['collections']) {
         if (count(explode(',', $this->conf['collections'])) == 1 && empty($this->conf['dont_show_single'])) {
             $this->showSingleCollection(intval(trim($this->conf['collections'], ' ,')));
         }
         $additionalWhere .= ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')';
         $orderBy = 'FIELD(tx_dlf_collections.uid, ' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')';
     }
     // Should user-defined collections be shown?
     if (empty($this->conf['show_userdefined'])) {
         $additionalWhere .= ' AND tx_dlf_collections.fe_cruser_id=0';
     } elseif ($this->conf['show_userdefined'] > 0) {
         if (!empty($GLOBALS['TSFE']->fe_user->user['uid'])) {
             $additionalWhere .= ' AND tx_dlf_collections.fe_cruser_id=' . intval($GLOBALS['TSFE']->fe_user->user['uid']);
         } else {
             $additionalWhere .= ' AND NOT tx_dlf_collections.fe_cruser_id=0';
         }
     }
     // Get collections.
     $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('tx_dlf_collections.uid AS uid,tx_dlf_collections.label AS label,tx_dlf_collections.thumbnail AS thumbnail,tx_dlf_collections.description AS description,tx_dlf_collections.priority AS priority,COUNT(tx_dlf_documents.uid) AS titles', 'tx_dlf_documents', 'tx_dlf_relations', 'tx_dlf_collections', 'AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_documents.partof=0 AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . $additionalWhere . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), 'tx_dlf_collections.uid', $orderBy, '');
     $count = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
     $content = '';
     if ($count == 1 && empty($this->conf['dont_show_single'])) {
         $resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
         $this->showSingleCollection(intval($resArray['uid']));
     } elseif ($count > 0) {
         // Get number of volumes per collection.
         $resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('tx_dlf_collections.uid AS uid,COUNT(tx_dlf_documents.uid) AS volumes', 'tx_dlf_documents', 'tx_dlf_relations', 'tx_dlf_collections', 'AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . tx_dlf_helper::whereClause('tx_dlf_documents') . ') AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . $additionalWhere . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), 'tx_dlf_collections.uid', '', '');
         $volumes = array();
         while ($resArrayVolumes = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultVolumes)) {
             $volumes[$resArrayVolumes['uid']] = $resArrayVolumes['volumes'];
         }
         // Process results.
         while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
             // Generate random but unique array key taking priority into account.
             do {
                 $_key = $resArray['priority'] * 1000 + mt_rand(0, 1000);
             } while (!empty($markerArray[$_key]));
             // Merge plugin variables with new set of values.
             $additionalParams = array('collection' => $resArray['uid']);
             if (is_array($this->piVars)) {
                 $piVars = $this->piVars;
                 unset($piVars['DATA']);
                 $additionalParams = tx_dlf_helper::array_merge_recursive_overrule($piVars, $additionalParams);
             }
             // Build typolink configuration array.
             $conf = array('useCacheHash' => 1, 'parameter' => $GLOBALS['TSFE']->id, 'additionalParams' => t3lib_div::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE));
             // Link collection's title to list view.
             $markerArray[$_key]['###TITLE###'] = $this->cObj->typoLink(htmlspecialchars($resArray['label']), $conf);
             // Add feed link if applicable.
             if (!empty($this->conf['targetFeed'])) {
                 $img = '<img src="' . t3lib_extMgm::siteRelPath($this->extKey) . 'res/icons/txdlffeeds.png" alt="' . $this->pi_getLL('feedAlt', '', TRUE) . '" title="' . $this->pi_getLL('feedTitle', '', TRUE) . '" />';
                 $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array($this->prefixId => array('collection' => $resArray['uid'])), FALSE, $this->conf['targetFeed']);
             } else {
                 $markerArray[$_key]['###FEED###'] = '';
             }
             // Add thumbnail.
             if (!empty($resArray['thumbnail'])) {
                 $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="' . htmlspecialchars($resArray['label']) . '" src="' . $resArray['thumbnail'] . '" />';
             } else {
                 $markerArray[$_key]['###THUMBNAIL###'] = '';
             }
             // Add description.
             $markerArray[$_key]['###DESCRIPTION###'] = $this->pi_RTEcssText($resArray['description']);
             // Build statistic's output.
             $labelTitles = $this->pi_getLL($resArray['titles'] > 1 ? 'titles' : 'title', '', FALSE);
             $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars($resArray['titles'] . $labelTitles);
             $labelVolumes = $this->pi_getLL($volumes[$resArray['uid']] > 1 ? 'volumes' : 'volume', '', FALSE);
             $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars($volumes[$resArray['uid']] . $labelVolumes);
         }
         // Randomize sorting?
         if (!empty($this->conf['randomize'])) {
             ksort($markerArray, SORT_NUMERIC);
             // Don't cache the output.
             $this->setCache(FALSE);
         }
         $entry = $this->cObj->getSubpart($this->template, '###ENTRY###');
         foreach ($markerArray as $marker) {
             $content .= $this->cObj->substituteMarkerArray($entry, $marker);
         }
         // Hook for getting custom collection hierarchies/subentries (requested by SBB).
         foreach ($this->hookObjects as $hookObj) {
             if (method_exists($hookObj, 'showCollectionList_getCustomCollectionList')) {
                 $hookObj->showCollectionList_getCustomCollectionList($this, $this->conf['templateFile'], $content, $markerArray);
             }
         }
         return $this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, TRUE);
     }
     return $content;
//.........這裏部分代碼省略.........
開發者ID:CalanthaC,項目名稱:goobi-presentation,代碼行數:101,代碼來源:class.tx_dlf_collection.php

示例12: importData


//.........這裏部分代碼省略.........
                    $row[] = '<tr class="bgColor4">
							<td>' . $LANG->getLL('importdata_uploadStatus', 1) . '</td>
							<td>' . ($this->fileProcessor->internalUploadMap[1] ? $LANG->getLL('importdata_success', 1) . ' ' . substr($this->fileProcessor->internalUploadMap[1], strlen(PATH_site)) : '<span class="typo3-red">' . $LANG->getLL('importdata_failureNoFileUploaded', 1) . '</span>') . '</td>
						</tr>';
                }
                $menuItems[] = array('label' => $LANG->getLL('importdata_upload'), 'content' => '
						<table border="0" cellpadding="1" cellspacing="1">
							' . implode('
							', $row) . '
						</table>
					');
            }
            // Perform import or preview depending:
            $overviewContent = '';
            $extensionInstallationMessage = '';
            $emURL = '';
            $inFile = t3lib_div::getFileAbsFileName($inData['file']);
            if ($inFile && @is_file($inFile)) {
                $trow = array();
                if ($import->loadFile($inFile, 1)) {
                    // Check extension dependencies:
                    $extKeysToInstall = array();
                    if (is_array($import->dat['header']['extensionDependencies'])) {
                        foreach ($import->dat['header']['extensionDependencies'] as $extKey) {
                            if (!t3lib_extMgm::isLoaded($extKey)) {
                                $extKeysToInstall[] = $extKey;
                            }
                        }
                    }
                    if (count($extKeysToInstall)) {
                        $passParams = t3lib_div::_POST('tx_impexp');
                        unset($passParams['import_mode']);
                        unset($passParams['import_file']);
                        $thisScriptUrl = t3lib_div::getIndpEnv('REQUEST_URI') . '?M=xMOD_tximpexp&id=' . $this->id . t3lib_div::implodeArrayForUrl('tx_impexp', $passParams);
                        $emURL = $this->doc->backPath . 'mod/tools/em/index.php?CMD[requestInstallExtensions]=' . implode(',', $extKeysToInstall) . '&returnUrl=' . rawurlencode($thisScriptUrl);
                        $extensionInstallationMessage = 'Before you can install this T3D file you need to install the extensions "' . implode('", "', $extKeysToInstall) . '". Clicking Import will first take you to the Extension Manager so these dependencies can be resolved.';
                    }
                    if ($inData['import_file']) {
                        if (!count($extKeysToInstall)) {
                            $import->importData($this->id);
                            t3lib_BEfunc::setUpdateSignal('updatePageTree');
                        } else {
                            t3lib_utility_Http::redirect($emURL);
                        }
                    }
                    $import->display_import_pid_record = $this->pageinfo;
                    $overviewContent = $import->displayContentOverview();
                }
                // Meta data output:
                $trow[] = '<tr class="bgColor5">
						<td colspan="2"><strong>' . $LANG->getLL('importdata_metaData', 1) . '</strong></td>
					</tr>';
                $opt = array('');
                foreach ($filesInDir as $file) {
                    $opt[$file] = substr($file, strlen(PATH_site));
                }
                $trow[] = '<tr class="bgColor4">
					<td><strong>' . $LANG->getLL('importdata_title', 1) . '</strong></td>
					<td width="95%">' . nl2br(htmlspecialchars($import->dat['header']['meta']['title'])) . '</td>
					</tr>';
                $trow[] = '<tr class="bgColor4">
					<td><strong>' . $LANG->getLL('importdata_description', 1) . '</strong></td>
					<td width="95%">' . nl2br(htmlspecialchars($import->dat['header']['meta']['description'])) . '</td>
					</tr>';
                $trow[] = '<tr class="bgColor4">
					<td><strong>' . $LANG->getLL('importdata_notes', 1) . '</strong></td>
開發者ID:zsolt-molnar,項目名稱:TYPO3-4.5-trunk,代碼行數:67,代碼來源:index.php

示例13: getQueryArguments

 /**
  * Gets the query arguments and assembles them for URLs.
  * Arguments may be removed or set, depending on configuration.
  *
  * @param	string		Configuration
  * @param	array		Multidimensional key/value pairs that overrule incoming query arguments
  * @param	boolean		If set, key/value pairs not in the query but the overrule array will be set
  * @return	string		The URL query part (starting with a &)
  */
 public function getQueryArguments($conf, $overruleQueryArguments = array(), $forceOverruleArguments = FALSE)
 {
     switch ((string) $conf['method']) {
         case 'GET':
             $currentQueryArray = t3lib_div::_GET();
             break;
         case 'POST':
             $currentQueryArray = t3lib_div::_POST();
             break;
         case 'GET,POST':
             $currentQueryArray = array_merge(t3lib_div::_GET(), t3lib_div::_POST());
             break;
         case 'POST,GET':
             $currentQueryArray = array_merge(t3lib_div::_POST(), t3lib_div::_GET());
             break;
         default:
             $currentQueryArray = t3lib_div::explodeUrl2Array(t3lib_div::getIndpEnv('QUERY_STRING'), TRUE);
     }
     if ($conf['exclude']) {
         $exclude = str_replace(',', '&', $conf['exclude']);
         $exclude = t3lib_div::explodeUrl2Array($exclude, TRUE);
         // never repeat id
         $exclude['id'] = 0;
         $newQueryArray = t3lib_div::arrayDiffAssocRecursive($currentQueryArray, $exclude);
     } else {
         $newQueryArray = $currentQueryArray;
     }
     if ($forceOverruleArguments) {
         $newQueryArray = t3lib_div::array_merge_recursive_overrule($newQueryArray, $overruleQueryArguments);
     } else {
         $newQueryArray = t3lib_div::array_merge_recursive_overrule($newQueryArray, $overruleQueryArguments, TRUE);
     }
     return t3lib_div::implodeArrayForUrl('', $newQueryArray);
 }
開發者ID:NaveedWebdeveloper,項目名稱:Test,代碼行數:43,代碼來源:class.tslib_content.php

示例14: main


//.........這裏部分代碼省略.........
            if ($e['resources']) {
                // Upload
                $outCode = '<input type="File" name="resources"' . $this->pObj->doc->formWidth() . ' size="50">';
                $outCode .= '<input type="Hidden" name="data[resources]" value="1">';
                $outCode .= '<input type="Hidden" name="e[resources]" value="1">';
                $outCode .= '<BR>' . $GLOBALS['LANG']->getLL('allowedExtensions') . ' <strong>' . $TCA['sys_template']['columns']['resources']['config']['allowed'] . '</strong>';
                $outCode .= '<BR>' . $GLOBALS['LANG']->getLL('maxFilesize') . ' <strong>' . t3lib_div::formatSize($TCA['sys_template']['columns']['resources']['config']['max_size'] * 1024) . '</strong>';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('uploadResource'), $outCode);
                // New
                $opt = explode(',', $this->pObj->textExtensions);
                $optTags = '';
                foreach ($opt as $extVal) {
                    $optTags .= '<option value="' . $extVal . '">.' . $extVal . '</option>';
                }
                $outCode = '<input type="text" name="new_resource"' . $this->pObj->doc->formWidth(20) . '>
					<select name="new_resource_ext">' . $optTags . '</select>';
                $outCode .= '<input type="Hidden" name="data[new_resource]" value="1">';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('newTextResource'), $outCode);
                // Make copy
                $rL = $this->resourceListForCopy($this->pObj->id, $template_uid);
                if ($rL) {
                    $theOutput .= $this->pObj->doc->spacer(20);
                    $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('copyResource'), $rL);
                }
                // Update resource list
                $rL = $this->procesResources($tplRow['resources'], 1);
                if ($rL) {
                    $theOutput .= $this->pObj->doc->spacer(20);
                    $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('updateResourceList'), $rL);
                }
            }
            if ($e['constants']) {
                $outCode = '<textarea name="data[constants]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . t3lib_div::formatForTextarea($tplRow['constants']) . '</textarea>';
                $outCode .= '<input type="Hidden" name="e[constants]" value="1">';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('constants'), '');
                $theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
            }
            if ($e['file']) {
                $path = PATH_site . $TCA['sys_template']['columns']['resources']['config']['uploadfolder'] . '/' . $e[file];
                $fI = t3lib_div::split_fileref($e[file]);
                if (@is_file($path) && t3lib_div::inList($this->pObj->textExtensions, $fI['fileext'])) {
                    if (filesize($path) < $TCA['sys_template']['columns']['resources']['config']['max_size'] * 1024) {
                        $fileContent = t3lib_div::getUrl($path);
                        $outCode = $GLOBALS['LANG']->getLL('file') . ' <strong>' . $e[file] . '</strong><BR>';
                        $outCode .= '<textarea name="edit[file]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . t3lib_div::formatForTextarea($fileContent) . '</textarea>';
                        $outCode .= '<input type="Hidden" name="edit[filename]" value="' . $e[file] . '">';
                        $outCode .= '<input type="Hidden" name="e[file]" value="' . htmlspecialchars($e[file]) . '">';
                        $theOutput .= $this->pObj->doc->spacer(15);
                        $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('editResource'), '');
                        $theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
                    } else {
                        $theOutput .= $this->pObj->doc->spacer(15);
                        $fileToBig = sprintf($GLOBALS['LANG']->getLL('filesizeExceeded'), $TCA['sys_template']['columns']['resources']['config']['max_size']);
                        $filesizeNotAllowed = sprintf($GLOBALS['LANG']->getLL('notAllowed'), $TCA['sys_template']['columns']['resources']['config']['max_size']);
                        $theOutput .= $this->pObj->doc->section('<font color=red>' . $fileToBig . '</font>', $filesizeNotAllowed, 0, 0, 0, 1);
                    }
                }
            }
            if ($e['config']) {
                $outCode = '<textarea name="data[config]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, "width:98%;height:70%", "off") . ' class="fixed-font">' . t3lib_div::formatForTextarea($tplRow["config"]) . '</textarea>';
                if (t3lib_extMgm::isLoaded('tsconfig_help')) {
                    $url = $BACK_PATH . 'wizard_tsconfig.php?mode=tsref';
                    $params = array('formName' => 'editForm', 'itemName' => 'data[config]');
                    $outCode .= '<a href="#" onClick="vHWin=window.open(\'' . $url . t3lib_div::implodeArrayForUrl('', array('P' => $params)) . '\',\'popUp' . $md5ID . '\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;">' . t3lib_iconWorks::getSpriteIcon('actions-system-typoscript-documentation-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:tsRef', true))) . '</a>';
                }
                $outCode .= '<input type="Hidden" name="e[config]" value="1">';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('setup'), '');
                $theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
            }
            // Processing:
            $outCode = '';
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('title'), htmlspecialchars($tplRow['title']), 'title');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('sitetitle'), htmlspecialchars($tplRow['sitetitle']), 'sitetitle');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('description'), nl2br(htmlspecialchars($tplRow['description'])), 'description');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('resources'), $this->procesResources($tplRow['resources']), 'resources');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('constants'), sprintf($GLOBALS['LANG']->getLL('editToView'), trim($tplRow[constants]) ? count(explode(LF, $tplRow[constants])) : 0), 'constants');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('setup'), sprintf($GLOBALS['LANG']->getLL('editToView'), trim($tplRow[config]) ? count(explode(LF, $tplRow[config])) : 0), 'config');
            $outCode = '<br /><br /><table class="t3-table-info">' . $outCode . '</table>';
            // Edit all icon:
            $outCode .= '<br /><a href="#" onClick="' . t3lib_BEfunc::editOnClick(rawurlencode('&createExtension=0') . '&amp;edit[sys_template][' . $tplRow['uid'] . ']=edit', $BACK_PATH, '') . '"><strong>' . t3lib_iconWorks::getSpriteIcon('actions-document-open', array('title' => $GLOBALS['LANG']->getLL('editTemplateRecord'))) . $GLOBALS['LANG']->getLL('editTemplateRecord') . '</strong></a>';
            $theOutput .= $this->pObj->doc->section('', $outCode);
            // hook	after compiling the output
            if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postOutputProcessingHook'])) {
                $postOutputProcessingHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postOutputProcessingHook'];
                if (is_array($postOutputProcessingHook)) {
                    $hookParameters = array('theOutput' => &$theOutput, 'POST' => $POST, 'e' => $e, 'tplRow' => $tplRow, 'numberOfRows' => $numberOfRows);
                    foreach ($postOutputProcessingHook as $hookFunction) {
                        t3lib_div::callUserFunction($hookFunction, $hookParameters, $this);
                    }
                }
            }
        } else {
            $theOutput .= $this->pObj->noTemplate(1);
        }
        return $theOutput;
    }
開發者ID:zsolt-molnar,項目名稱:TYPO3-4.5-trunk,代碼行數:101,代碼來源:class.tx_tstemplateinfo.php

示例15: getFormUrl

 /**
  * @return string
  */
 protected function getFormUrl()
 {
     $urlParams = $this->pObj->MOD_SETTINGS;
     $urlParams['id'] = $this->pObj->id;
     return $this->pObj->doc->scriptID . '?' . t3lib_div::implodeArrayForUrl('', $urlParams);
 }
開發者ID:fabianlipp,項目名稱:ods_osm,代碼行數:9,代碼來源:class.tx_odsosm_geocodeWizard.php


注:本文中的t3lib_div::implodeArrayForUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。