当前位置: 首页>>代码示例>>PHP>>正文


PHP t3lib_div::getUrl方法代码示例

本文整理汇总了PHP中t3lib_div::getUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::getUrl方法的具体用法?PHP t3lib_div::getUrl怎么用?PHP t3lib_div::getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t3lib_div的用法示例。


在下文中一共展示了t3lib_div::getUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

 /**
  * Main function, returning the HTML content of the module
  *
  * @return	string		HTML
  */
 function main()
 {
     $content = '';
     $content .= '<br />Update the Static Info Tables with new language labels.';
     $content .= '<br />';
     if (t3lib_div::_GP('import')) {
         $destEncoding = t3lib_div::_GP('dest_encoding');
         $extPath = t3lib_extMgm::extPath('static_info_tables_it');
         $fileContent = explode("\n", t3lib_div::getUrl($extPath . 'ext_tables_static_update.sql'));
         foreach ($fileContent as $line) {
             if ($line = trim($line) and preg_match('#^UPDATE#i', $line)) {
                 $query = $this->getUpdateEncoded($line, $destEncoding);
                 $res = $GLOBALS['TYPO3_DB']->admin_query($query);
             }
         }
         $content .= '<br />';
         $content .= '<p>Encoding: ' . htmlspecialchars($destEncoding) . '</p>';
         $content .= '<p>Done.</p>';
     } elseif (t3lib_extMgm::isLoaded('static_info_tables_it')) {
         $content .= '</form>';
         $content .= '<form action="' . htmlspecialchars(t3lib_div::linkThisScript()) . '" method="post">';
         $content .= '<br />Destination character encoding:';
         $content .= '<br />' . tx_staticinfotables_encoding::getEncodingSelect('dest_encoding', '', 'utf-8');
         $content .= '<br />(The character encoding must match the encoding of the existing tables data. By default this is UTF-8.)';
         $content .= '<br /><br />';
         $content .= '<input type="submit" name="import" value="Import" />';
         $content .= '</form>';
     } else {
         $content .= '<br /><strong>The extension needs to be installed first!</strong>';
     }
     return $content;
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:37,代码来源:class.ext_update.php

示例2: getAddressFromGeo

	/**
	 * Get Address from geo coordinates
	 *
	 * @param float $lat
	 * @param float $lng
	 * @return array all location infos
	 * 		['street_number'] = 12;
	 * 		['route'] = 'Kunstmuehlstr.';
	 * 		['locality'] = 'Rosenheim';
	 * 		['country'] = 'Germany';
	 * 		['postal_code'] = '83026';
	 */
	protected function getAddressFromGeo($lat, $lng) {
		$result = array();
		$json = t3lib_div::getUrl('https://maps.googleapis.com/maps/api/geocode/json?sensor=false&region=de&latlng=' . urlencode($lat . ',' . $lng));
		$jsonDecoded = json_decode($json, true);
		if (!empty($jsonDecoded['results'])) {
			foreach ((array) $jsonDecoded['results'][0]['address_components'] as $values) {
				$result[$values['types'][0]] = $values['long_name'];
			}
		}
		return $result;
	}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:23,代码来源:EidGetLocation.php

示例3: parseAndCheckXMLFile

 function parseAndCheckXMLFile()
 {
     global $LANG;
     $fileContent = t3lib_div::getUrl($this->file);
     $this->xmlNodes = t3lib_div::xml2tree(str_replace('&nbsp;', ' ', $fileContent), 3);
     // For some reason PHP chokes on incoming &nbsp; in XML!
     if (!is_array($this->xmlNodes)) {
         $this->_errorMsg[] = $LANG->getLL('import.manager.error.parsing.xml2tree.message') . $this->xmlNodes;
         return false;
     }
     $headerInformationNodes = $this->xmlNodes['TYPO3L10N'][0]['ch']['head'][0]['ch'];
     if (!is_array($headerInformationNodes)) {
         $this->_errorMsg[] = $LANG->getLL('import.manager.error.missing.head.message');
         return false;
     }
     $this->_setHeaderData($headerInformationNodes);
     if ($this->_isIncorrectXMLFile()) {
         return false;
     }
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:20,代码来源:class.tx_l10nmgr_CATXMLImportManager.php

示例4: main

 /**
  * Manipulating the input array, $params, adding new selectorbox items.
  * 
  * @param	array	array of select field options (reference)
  * @param	object	parent object (reference)
  * @return	void
  */
 function main(&$params, &$pObj)
 {
     // get the current page ID
     $thePageId = $params['row']['pid'];
     $template = t3lib_div::makeInstance('t3lib_tsparser_ext');
     // do not log time-performance information
     $template->tt_track = 0;
     $template->init();
     $sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
     $rootLine = $sys_page->getRootLine($thePageId);
     // generate the constants/config + hierarchy info for the template.
     $template->runThroughTemplates($rootLine);
     $template->generateConfig();
     // get value for the path containing the template files
     $readPath = t3lib_div::getFileAbsFileName($template->setup['plugin.']['tx_ttaddress_pi1.']['templatePath']);
     // if that direcotry is valid and is a directory then select files in it
     if (@is_dir($readPath)) {
         $template_files = t3lib_div::getFilesInDir($readPath, 'tmpl,html,htm', 1, 1);
         $parseHTML = t3lib_div::makeInstance('t3lib_parseHTML');
         foreach ($template_files as $htmlFilePath) {
             // reset vars
             $selectorBoxItem_title = '';
             $selectorBoxItem_icon = '';
             // read template content
             $content = t3lib_div::getUrl($htmlFilePath);
             // ... and extract content of the title-tags
             $parts = $parseHTML->splitIntoBlock('title', $content);
             $titleTagContent = $parseHTML->removeFirstAndLastTag($parts[1]);
             // set the item label
             $selectorBoxItem_title = trim($titleTagContent . ' (' . basename($htmlFilePath) . ')');
             // try to look up an image icon for the template
             $fI = t3lib_div::split_fileref($htmlFilePath);
             $testImageFilename = $readPath . $fI['filebody'] . '.gif';
             if (@is_file($testImageFilename)) {
                 $selectorBoxItem_icon = '../' . substr($testImageFilename, strlen(PATH_site));
             }
             // finally add the new item
             $params['items'][] = array($selectorBoxItem_title, basename($htmlFilePath), $selectorBoxItem_icon);
         }
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:48,代码来源:class.tx_ttaddress_addfilestosel.php

示例5: getTemplateHtml

 function getTemplateHtml()
 {
     if ($this->sTemplateHtml === FALSE) {
         $mHtml = "";
         $sPath = $this->getTemplatePath();
         if (!empty($sPath)) {
             if (!file_exists($sPath)) {
                 $this->oForm->mayday("RENDERER TEMPLATE - Template file does not exist <b>" . $sPath . "</b>");
             }
             if (($sSubpart = $this->getTemplateSubpart()) !== FALSE) {
                 $mHtml = t3lib_parsehtml::getSubpart(t3lib_div::getUrl($sPath), $sSubpart);
                 if (trim($mHtml) == "") {
                     $this->oForm->mayday("RENDERER TEMPLATE - The given template <b>'" . $sPath . "'</b> with subpart marker " . $sSubpart . " <b>returned an empty string</b> - Check your template");
                 }
             } else {
                 $mHtml = t3lib_div::getUrl($sPath);
                 if (trim($mHtml) == "") {
                     $this->oForm->mayday("RENDERER TEMPLATE - The given template <b>'" . $sPath . "'</b> with no subpart marker <b>returned an empty string</b> - Check your template");
                 }
             }
         } elseif (($mHtml = $this->_navConf("/html")) !== FALSE) {
             if (is_array($mHtml)) {
                 if (tx_ameosformidable::isRunneable($mHtml)) {
                     $mHtml = $this->callRunneable($mHtml);
                 } else {
                     $mHtml = $mHtml["__value"];
                 }
             }
             if (trim($mHtml) == "") {
                 $this->oForm->mayday("RENDERER TEMPLATE - The given <b>/html</b> provides an empty string</b> - Check your template");
             }
         } else {
             $this->oForm->mayday("RENDERER TEMPLATE - You have to provide either <b>/template/path</b> or <b>/html</b>");
         }
         $this->sTemplateHtml = $mHtml;
     }
     return $this->sTemplateHtml;
 }
开发者ID:preinboth,项目名称:formidable,代码行数:38,代码来源:class.tx_rdrtemplate.php

示例6: execute

 /**
  * This is the main method that is called when a task is executed
  * It MUST be implemented by all classes inheriting from this one
  * Note that there is no error handling, errors and failures are expected
  * to be handled and logged by the client implementations.
  * Should return true on successful execution, false on error.
  *
  * @return boolean Returns true on successful execution, false on error
  */
 public function execute()
 {
     $success = false;
     $this->init();
     $content = t3lib_div::getUrl($this->config['masterUrl']);
     if ($content) {
         $response = json_decode($content, true);
         if ($response['success']) {
             $key = $this->config['preSharedKey'];
             $encrypted = $response['data'];
             $data = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($encrypted), MCRYPT_MODE_CBC, md5(md5($key))), "");
             $records = json_decode($data, true);
             if (count($records)) {
                 $this->synchronizeUsers($records);
                 $success = true;
             } else {
                 t3lib_div::sysLog('No users to be synchronized', self::$extKey, 3);
             }
         } else {
             t3lib_div::sysLog($response['errors'][0], self::$extKey, 3);
         }
     }
     return $success;
 }
开发者ID:sruegg,项目名称:t3ext-causal_accounts,代码行数:33,代码来源:class.tx_causalaccounts_synchronizationtask.php

示例7: indexExternalUrl

 /**
  * Index External URLs HTML content
  *
  * @param	string		URL, eg. "http://typo3.org/"
  * @return	void
  * @see indexRegularDocument()
  */
 function indexExternalUrl($externalUrl)
 {
     // Parse External URL:
     $qParts = parse_url($externalUrl);
     $fI = pathinfo($qParts['path']);
     $ext = strtolower($fI['extension']);
     // Get headers:
     $urlHeaders = $this->getUrlHeaders($externalUrl);
     if (stristr($urlHeaders['Content-Type'], 'text/html')) {
         $content = $this->indexExternalUrl_content = t3lib_div::getUrl($externalUrl);
         if (strlen($content)) {
             // Create temporary file:
             $tmpFile = t3lib_div::tempnam('EXTERNAL_URL');
             if ($tmpFile) {
                 t3lib_div::writeFile($tmpFile, $content);
                 // Index that file:
                 $this->indexRegularDocument($externalUrl, TRUE, $tmpFile, 'html');
                 // Using "TRUE" for second parameter to force indexing of external URLs (mtime doesn't make sense, does it?)
                 unlink($tmpFile);
             }
         }
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:30,代码来源:class.indexer.php

示例8: checkIncludeLines

 /**
  * Checks the input string (un-parsed TypoScript) for include-commands ("<INCLUDE_TYPOSCRIPT: ....")
  * Use: t3lib_TSparser::checkIncludeLines()
  *
  * @param	string		Unparsed TypoScript
  * @param	integer		Counter for detecting endless loops
  * @param	boolean		When set an array containing the resulting typoscript and all included files will get returned
  * @return	string		Complete TypoScript with includes added.
  * @static
  */
 function checkIncludeLines($string, $cycle_counter = 1, $returnFiles = false)
 {
     $includedFiles = array();
     if ($cycle_counter > 100) {
         t3lib_div::sysLog('It appears like TypoScript code is looping over itself. Check your templates for "&lt;INCLUDE_TYPOSCRIPT: ..." tags', 'Core', 2);
         if ($returnFiles) {
             return array('typoscript' => '', 'files' => $includedFiles);
         }
         return '';
     }
     $splitStr = '<INCLUDE_TYPOSCRIPT:';
     if (strstr($string, $splitStr)) {
         $newString = '';
         $allParts = explode($splitStr, LF . $string . LF);
         // adds line break char before/after
         foreach ($allParts as $c => $v) {
             if (!$c) {
                 // first goes through
                 $newString .= $v;
             } elseif (preg_match('/\\r?\\n\\s*$/', $allParts[$c - 1])) {
                 // There must be a line-break char before.
                 $subparts = explode('>', $v, 2);
                 if (preg_match('/^\\s*\\r?\\n/', $subparts[1])) {
                     // There must be a line-break char after
                     // SO, the include was positively recognized:
                     $newString .= '### ' . $splitStr . $subparts[0] . '> BEGIN:' . LF;
                     $params = t3lib_div::get_tag_attributes($subparts[0]);
                     if ($params['source']) {
                         $sourceParts = explode(':', $params['source'], 2);
                         switch (strtolower(trim($sourceParts[0]))) {
                             case 'file':
                                 $filename = t3lib_div::getFileAbsFileName(trim($sourceParts[1]));
                                 if (strcmp($filename, '')) {
                                     // Must exist and must not contain '..' and must be relative
                                     if (@is_file($filename) && filesize($filename) < 100000) {
                                         // Max. 100 KB include files!
                                         // check for includes in included text
                                         $includedFiles[] = $filename;
                                         $included_text = self::checkIncludeLines(t3lib_div::getUrl($filename), $cycle_counter + 1, $returnFiles);
                                         // If the method also has to return all included files, merge currently included
                                         // files with files included by recursively calling itself
                                         if ($returnFiles && is_array($included_text)) {
                                             $includedFiles = array_merge($includedFiles, $included_text['files']);
                                             $included_text = $included_text['typoscript'];
                                         }
                                         $newString .= $included_text . LF;
                                     }
                                 }
                                 break;
                         }
                     }
                     $newString .= '### ' . $splitStr . $subparts[0] . '> END:' . LF;
                     $newString .= $subparts[1];
                 } else {
                     $newString .= $splitStr . $v;
                 }
             } else {
                 $newString .= $splitStr . $v;
             }
         }
         $string = substr($newString, 1, -1);
         // not the first/last linebreak char.
     }
     // When all included files should get returned, simply return an compound array containing
     // the TypoScript with all "includes" processed and the files which got included
     if ($returnFiles) {
         return array('typoscript' => $string, 'files' => $includedFiles);
     }
     return $string;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:80,代码来源:class.t3lib_tsparser.php

示例9: readFileContent

 /**
  * Reads the content of an external file being indexed.
  *
  * @param	string		File extension, eg. "pdf", "doc" etc.
  * @param	string		Absolute filename of file (must exist and be validated OK before calling function)
  * @param	string		Pointer to section (zero for all other than PDF which will have an indication of pages into which the document should be splitted.)
  * @return	array		Standard content array (title, description, keywords, body keys)
  */
 function readFileContent($ext, $absFile, $cPKey)
 {
     unset($contentArr);
     // Return immediately if initialization didn't set support up:
     if (!$this->supportedExtensions[$ext]) {
         return FALSE;
     }
     // Switch by file extension
     switch ($ext) {
         case 'pdf':
             if ($this->app['pdfinfo']) {
                 // Getting pdf-info:
                 $cmd = $this->app['pdfinfo'] . ' ' . escapeshellarg($absFile);
                 exec($cmd, $res);
                 $pdfInfo = $this->splitPdfInfo($res);
                 unset($res);
                 if (intval($pdfInfo['pages'])) {
                     list($low, $high) = explode('-', $cPKey);
                     // Get pdf content:
                     $tempFileName = t3lib_div::tempnam('Typo3_indexer');
                     // Create temporary name
                     @unlink($tempFileName);
                     // Delete if exists, just to be safe.
                     $cmd = $this->app['pdftotext'] . ' -f ' . $low . ' -l ' . $high . ' -enc UTF-8 -q ' . escapeshellarg($absFile) . ' ' . $tempFileName;
                     exec($cmd);
                     if (@is_file($tempFileName)) {
                         $content = t3lib_div::getUrl($tempFileName);
                         unlink($tempFileName);
                     } else {
                         $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsFailed'), $absFile), 2);
                     }
                     if (strlen($content)) {
                         $contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
                     }
                 }
             }
             break;
         case 'doc':
             if ($this->app['catdoc']) {
                 $cmd = $this->app['catdoc'] . ' -d utf-8 ' . escapeshellarg($absFile);
                 exec($cmd, $res);
                 $content = implode(LF, $res);
                 unset($res);
                 $contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
             }
             break;
         case 'pps':
         case 'ppt':
             if ($this->app['ppthtml']) {
                 $cmd = $this->app['ppthtml'] . ' ' . escapeshellarg($absFile);
                 exec($cmd, $res);
                 $content = implode(LF, $res);
                 unset($res);
                 $content = $this->pObj->convertHTMLToUtf8($content);
                 $contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
                 $contentArr['title'] = basename($absFile);
                 // Make sure the title doesn't expose the absolute path!
             }
             break;
         case 'xls':
             if ($this->app['xlhtml']) {
                 $cmd = $this->app['xlhtml'] . ' -nc -te ' . escapeshellarg($absFile);
                 exec($cmd, $res);
                 $content = implode(LF, $res);
                 unset($res);
                 $content = $this->pObj->convertHTMLToUtf8($content);
                 $contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
                 $contentArr['title'] = basename($absFile);
                 // Make sure the title doesn't expose the absolute path!
             }
             break;
         case 'sxi':
         case 'sxc':
         case 'sxw':
         case 'ods':
         case 'odp':
         case 'odt':
             if ($this->app['unzip']) {
                 // Read content.xml:
                 $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' content.xml';
                 exec($cmd, $res);
                 $content_xml = implode(LF, $res);
                 unset($res);
                 // Read meta.xml:
                 $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' meta.xml';
                 exec($cmd, $res);
                 $meta_xml = implode(LF, $res);
                 unset($res);
                 $utf8_content = trim(strip_tags(str_replace('<', ' <', $content_xml)));
                 $contentArr = $this->pObj->splitRegularContent($utf8_content);
                 $contentArr['title'] = basename($absFile);
                 // Make sure the title doesn't expose the absolute path!
//.........这里部分代码省略.........
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:class.external_parser.php

示例10: getDataStructures

 /**
  * Retrieve data structures
  *
  * @return	array
  */
 function getDataStructures()
 {
     // Select all Data Structures in the PID and put into an array:
     $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_templavoila_datastructure', 'pid>=0' . t3lib_BEfunc::deleteClause('tx_templavoila_datastructure'), '', 'title');
     $dsRecords = array();
     while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
         $row['_languageMode'] = $this->DSlanguageMode($row['dataprot']);
         if ($row['_languageMode'] != 'Disabled') {
             $dsRecords[$row['scope']][] = $row;
         }
     }
     // Select all static Data Structures and add to array:
     if (is_array($GLOBALS['TBE_MODULES_EXT']['xMOD_tx_templavoila_cm1']['staticDataStructures'])) {
         foreach ($GLOBALS['TBE_MODULES_EXT']['xMOD_tx_templavoila_cm1']['staticDataStructures'] as $staticDS) {
             $staticDS['_STATIC'] = 1;
             $fileReference = t3lib_div::getFileAbsFileName($staticDS['path']);
             if (@is_file($fileReference)) {
                 $staticDS['_languageMode'] = $this->DSlanguageMode(t3lib_div::getUrl($fileReference));
             } else {
                 $staticDS['_languageMode'] = 'ERROR: File not found';
             }
             if ($row['_languageMode'] != 'Disabled') {
                 $dsRecords[$staticDS['scope']][] = $staticDS;
             }
         }
     }
     return $dsRecords;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:33,代码来源:class.tx_templavoila_extdeveval.php

示例11: getJqueryBootstrapConfiguration

 /**
  * Returns the configuration of jQuery Bootstrap
  * @return array
  */
 function getJqueryBootstrapConfiguration($version = NULL)
 {
     if ($version === NULL) {
         $confArr = tx_t3jquery::getConf();
         $version = $confArr['jQueryBootstrapVersion'];
     }
     $configuration = t3lib_div::xml2array(t3lib_div::getUrl(t3lib_div::getFileAbsFileName('EXT:t3jquery/res/jquery/bootstrap/' . $version . '/jquery.xml')));
     return $configuration;
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:13,代码来源:class.tx_t3jquery.php

示例12:

    tx_dam::register_indexingRule('tx_damindex_rule_devel', 'EXT:dam/components/class.tx_dam_index_rules.php:&tx_dam_index_rule_devel');
}
// register navigation tree and select rule for nav tree.
tx_dam::register_selection('txdamFolder', 'EXT:dam/components/class.tx_dam_selectionFolder.php:&tx_dam_selectionFolder');
tx_dam::register_selection('txdamCat', 'EXT:dam/components/class.tx_dam_selectionCategory.php:&tx_dam_selectionCategory');
tx_dam::register_selection('txdamMedia', 'EXT:dam/components/class.tx_dam_selectionMeTypes.php:&tx_dam_selectionMeTypes');
tx_dam::register_selection('txdamStatus', 'EXT:dam/components/class.tx_dam_selectionStatus.php:&tx_dam_selectionStatus');
tx_dam::register_selection('txdamIndexRun', 'EXT:dam/components/class.tx_dam_selectionIndexRun.php:&tx_dam_selectionIndexRun');
tx_dam::register_selection('txdamStrSearch', 'EXT:dam/components/class.tx_dam_selectionStringSearch.php:&tx_dam_selectionStringSearch');
tx_dam::register_selection('txdamRecords', 'EXT:dam/components/class.tx_dam_selectionRecords.php:&tx_dam_selectionRecords');
// register DAM internal db change trigger
tx_dam::register_dbTrigger('tx_dam_dbTriggerMediaTypes', 'EXT:dam/components/class.tx_dam_dbTriggerMediaTypes.php:&tx_dam_dbTriggerMediaTypes');
// register special TCE tx_dam processing
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = 'EXT:dam/binding/tce/class.tx_dam_tce_process.php:&tx_dam_tce_process';
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:dam/binding/tce/class.tx_dam_tce_process.php:&tx_dam_tce_process';
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:dam/binding/tce/class.tx_dam_tce_filetracking.php:&tx_dam_tce_filetracking';
// <media> tag for BE and FE
if ($TYPO3_CONF_VARS['EXTCONF']['dam']['setup']['mediatag']) {
    require_once PATH_txdam . 'binding/mediatag/ext_localconf.php';
}
// user-defined soft reference parsers
require_once PATH_txdam . 'binding/softref/ext_localconf.php';
// txdam attribute on img tag for FE
require_once PATH_txdam . 'binding/imgtag/ext_localconf.php';
// FE stuff
$pluginContent = t3lib_div::getUrl(PATH_txdam . 'pi/setup.txt');
t3lib_extMgm::addTypoScript('dam', 'setup', '
# Setting dam plugin TypoScript
' . $pluginContent);
unset($pluginContent);
$TYPO3_CONF_VARS['BE']['AJAX']['TYPO3_tcefile::process'] = PATH_txdam . 'lib/class.tx_dam_tce_file.php:tx_dam_tce_file->processAjaxRequest';
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:ext_localconf.php

示例13: getXMLFileHead

 /**
  * Extracts the header of a CATXML file
  *
  * @param string $filepath Path to the file
  * @return bool
  */
 protected function getXMLFileHead($filepath)
 {
     $fileContent = t3lib_div::getUrl($filepath);
     // For some reason PHP chokes on incoming &nbsp; in XML!
     $xmlNodes = t3lib_div::xml2tree(str_replace('&nbsp;', ' ', $fileContent), 3);
     if (!is_array($xmlNodes)) {
         throw new Exception($GLOBALS['LANG']->getLL('import.manager.error.parsing.xml2tree.message') . $xmlNodes, 1322480030);
     }
     $headerInformationNodes = $xmlNodes['TYPO3L10N'][0]['ch']['head'][0]['ch'];
     if (!is_array($headerInformationNodes)) {
         throw new Exception($GLOBALS['LANG']->getLL('import.manager.error.missing.head.message'), 1322480056);
     }
     return $headerInformationNodes;
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:20,代码来源:cli.import.php

示例14: makeFilesArray


//.........这里部分代码省略.........
     * @return    void
     */
    function makeFilesArray($extKey)
    {
        $this->ext_localconf = array();
        $this->ext_tables = array();
        $this->fileArray = array();
        foreach ($this->wizArray as $catID => $catData) {
            if ($this->sections[$catID]) {
                $path = t3lib_div::getFileAbsFileName($this->sections[$catID]['filepath']);
                if (is_file($path)) {
                    require_once $path;
                    $section = t3lib_div::makeInstance($this->sections[$catID]['classname']);
                    $section->wizard =& $this;
                    foreach ($catData as $k => $config) {
                        $section->render_extPart($k, $config, $extKey);
                    }
                }
            }
        }
        if (is_array($this->wizArray['sv'])) {
            reset($this->wizArray['sv']);
            while (list($k, $config) = each($this->wizArray['sv'])) {
                $this->EM_CONF_presets['clearCacheOnLoad'] = 1;
            }
        }
        // Write the ext_localconf.php file:
        if (count($this->ext_localconf)) {
            $this->addFileToFileArray('ext_localconf.php', trim($this->wrapBody('
										<?php
										if (!defined(\'TYPO3_MODE\')) {
											die (\'Access denied.\');
										}

											', implode(chr(10), $this->ext_localconf), '?>
					', 0)));
        }
        // Write the ext_tables.php file:
        if (count($this->ext_tables)) {
            $this->addFileToFileArray('ext_tables.php', trim($this->wrapBody('
										<?php
										if (!defined(\'TYPO3_MODE\')) {
											die (\'Access denied.\');
										}

										', implode(chr(10), $this->ext_tables), '
				?>
			', 0)));
        }
        // Write the tca.php file:
        if (count($this->ext_tca)) {
            $this->addFileToFileArray('tca.php', trim($this->wrapBody('
										<?php
										if (!defined(\'TYPO3_MODE\')) {
											die (\'Access denied.\');
										}

										', implode(chr(10), $this->ext_tca), '
				?>
			', 0)));
        }
        // Write the ext_tables.sql file:
        if (count($this->ext_tables_sql)) {
            $this->addFileToFileArray('ext_tables.sql', trim($this->sPS(implode(chr(10), $this->ext_tables_sql))));
        }
        // Local lang file:
        if (count($this->ext_locallang)) {
            $this->addLocalLangFile($this->ext_locallang, 'locallang.xml', 'Language labels for extension \'' . $extKey . '\'');
        }
        // Local lang DB file:
        if (count($this->ext_locallang_db)) {
            $this->addLocalLangFile($this->ext_locallang_db, 'locallang_db.xml', 'Language labels for database tables/fields belonging to extension \'' . $extKey . '\'', 'database');
        }
        // The form used to generate the extension:
        $this->dontPrintImages = 1;
        $this->addFileToFileArray('doc/wizard_form.html', trim($this->sPS('
								<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

								<html>
								<head>
									<title>Untitled</title>
								</head>

								<body>

									' . $this->totalForm() . '
			</body>
			</html>
		')));
        $this->addFileToFileArray('doc/wizard_form.dat', serialize($this->wizArray));
        $this->addFileToFileArray('ChangeLog', date('Y-m-d') . '  ' . $this->userField('name') . '  <' . $this->userField('email') . '>

	* Initial code generated with kickstarter
');
        $this->addFileToFileArray('README.txt', '
Feel free to add some documentation or simply add a link to the online manual.
');
        // icon:
        $this->addFileToFileArray('ext_icon.gif', t3lib_div::getUrl(t3lib_extMgm::extPath('kickstarter') . 'res/notfound.gif'));
    }
开发者ID:jaguerra,项目名称:TYPO3-Kickstarter,代码行数:101,代码来源:class.tx_kickstarter_compilefiles.php

示例15: print_r

        print_r($TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']);
        echo LF;
        exit;
    }
}
// **********************
// Check Hardcoded lock on BE:
// **********************
if ($TYPO3_CONF_VARS['BE']['adminOnly'] < 0) {
    throw new RuntimeException('TYPO3 Backend locked: Backend and Install Tool are locked for maintenance. [BE][adminOnly] is set to "' . intval($TYPO3_CONF_VARS['BE']['adminOnly']) . '".');
}
if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) && @is_file(PATH_typo3conf . 'LOCK_BACKEND')) {
    if (TYPO3_PROCEED_IF_NO_USER == 2) {
        // ajax poll for login, let him pass
    } else {
        $fContent = t3lib_div::getUrl(PATH_typo3conf . 'LOCK_BACKEND');
        if ($fContent) {
            header('Location: ' . $fContent);
            // Redirect
        } else {
            throw new RuntimeException('TYPO3 Backend locked: Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.');
        }
        exit;
    }
}
// **********************
// Check IP
// **********************
if (trim($TYPO3_CONF_VARS['BE']['IPmaskList']) && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
    if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $TYPO3_CONF_VARS['BE']['IPmaskList'])) {
        header('Status: 404 Not Found');
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:init.php


注:本文中的t3lib_div::getUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。