本文整理汇总了PHP中JText16::_方法的典型用法代码示例。如果您正苦于以下问题:PHP JText16::_方法的具体用法?PHP JText16::_怎么用?PHP JText16::_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JText16
的用法示例。
在下文中一共展示了JText16::_方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: selectnfredirect
public function selectnfredirect()
{
// collect input data : which url needs to be redirected ?
$notFoundUrlId = JRequest::getInt('notfound_url_id');
// which URL to redirect to?
$cid = JRequest::getVar('cid', array(0), 'default', 'array');
JArrayHelper::toInteger($cid);
if (count($cid) > 1) {
// more than one target url selected, display error
$this->setError(JText16::_('COM_SH404SEF_SELECT_ONLY_ONE_URL_TO_REDIRECT'));
$this->display();
return;
}
// only one url, use it
$targetUrlId = $cid[0];
if (empty($targetUrlId)) {
// bad url, probably not an integer was passed
$this->setError(JText16::_('COM_SH404SEF_INVALID_REDIRECT_TARGET_ID'));
$this->display();
return;
}
// get model and ask it to do the job
$model =& $this->getModel($this->_defaultModel);
$model->redirectNotFoundUrl($notFoundUrlId, $targetUrlId);
// check errors
$error = $model->getError();
if (!empty($error)) {
$this->setError($error);
}
// standard display
$this->display();
}
示例2: fetchAnalytics
public function fetchAnalytics($config, $options)
{
// store parameters
$this->_config = $config;
$this->_options = $options;
// prepare a default response object
$response = new stdClass();
$response->status = true;
$response->statusMessage = JText16::_('COM_SH404SEF_CLICK_TO_CHECK_ANALYTICS');
$response->note = '';
// connect to server and fetch data
try {
$rawResponse = $this->_fetchData();
} catch (Exception $e) {
$response->status = false;
$response->statusMessage = $e->getMessage();
return $response;
}
// return response
$response->analyticsData = $rawResponse;
// attach html select list or input boxes to response, to allow user to filter the data viewed
$response->filters = $this->_prepareFilters();
// update date/time display
$response->statusMessage = JText16::sprintf('COM_SH404SEF_UPDATED_ON', strftime('%c'));
return $response;
}
示例3: display
public function display($tpl = null)
{
// get model and update context with current
$model =& $this->getModel();
$context = $model->updateContext($this->_context . '.' . $this->getLayout());
// get url id
$notFoundUrlId = JRequest::getInt('notfound_url_id');
// read url data from model
$url =& $model->getUrl($notFoundUrlId);
// and push url into the template for display
$this->assign('url', $url);
// build the toolbar
$toolBar = $this->_makeToolbar();
$this->assignRef('toolbar', $toolBar);
// add title.
$this->assign('toolbarTitle', Sh404sefHelperGeneral::makeToolbarTitle(JText16::_('COM_SH404SEF_NOT_FOUND_ENTER_REDIRECT'), $icon = 'addedit.png', $class = 'header'));
// insert needed css files
$this->_addCss();
// link to custom javascript
JHtml::script('edit.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/');
// add domready event
$document =& JFactory::getDocument();
// add tooltips
JHTML::_('behavior.tooltip');
// now display normally
parent::display($tpl);
}
示例4: save
/**
* Save configuration to disk
* from POST data or input array of data
*
* When config will be saved to db, most of the code in this
* model will be removed and basemodel should handle everything
*
* @param array $dataArray an array holding data to save. If empty, $_POST is used
* @return integer id of created or updated record
*/
public function save($dataArray = null)
{
// get current configuration object
$sefConfig =& shRouter::shGetConfig();
// call the appropriate method for each
// configuration settings set
$methodName = '_save' . ucfirst($this->_layout);
if (is_callable(array($this, $methodName))) {
$status = true;
$this->{$methodName}();
} else {
$status = false;
$this->setError('Internal error : method not defined : _save' . ucfirst($params['layout']));
}
if ($status && !empty($_POST)) {
foreach ($_POST as $key => $value) {
$sefConfig->set($key, $value);
$this->_advancedConfig($key, $value);
}
}
// ask config class to save itself
$status = $status && $sefConfig->saveConfig();
// store any error
if (!$status) {
$this->setError(JText16::_('COM_SH404SEF_ERR_CONFIGURATION_NOT_SAVED'));
}
return $status;
}
示例5: confirmed
public function confirmed($deleteDuplicates = false)
{
// Check for request forgeries
JRequest::checkToken() or jexit('Invalid Token');
// find and store edited item id
$cid = JRequest::getVar('cid', array(0), 'default', 'array');
// check invalid data
if (!is_array($cid) || count($cid) < 1 || $cid[0] == 0) {
$this->setRedirect($this->_getDefaultRedirect(), JText16::_('COM_SH404SEF_SELECT_ONE_URL'));
}
// now perform url deletion
// get the model to do it, actually
// Get/Create the model
if ($model =& $this->getModel($this->_defaultModel, 'Sh404sefModel')) {
// store initial context in model
$model->setContext($this->_context);
// call the delete method on our list
if ($deleteDuplicates) {
$model->deleteByIdsWithDuplicates($cid);
} else {
$model->deleteByIds($cid);
}
// check errors and enqueue them for display if any
$errors = $model->getErrors();
if (!empty($errors)) {
$this->enqueuemessages($errors, 'error');
// clear success message, as we have just queued some error messages
$status = '';
}
}
// send back response through default view
$this->display();
}
示例6: makemainurl
public function makemainurl()
{
// Check for request forgeries
JRequest::checkToken() or jexit('Invalid Token');
// find and store edited item id
$cid = JRequest::getVar('cid', array(0), 'default', 'array');
// check invalid data
if (!is_array($cid) || count($cid) != 1 || intval($cid[0]) == 0) {
$redirect = array('c' => "duplicates", 'tmpl' => 'component', 'cid[]' => JRequest::getInt('mainurl_id'));
$this->setRedirect($this->_getDefaultRedirect($redirect), JText16::_('COM_SH404SEF_SELECT_ONE_URL'), 'error');
// send back response through default view
$this->display();
}
// now make that url the main url
// while also setting the previous
// with this url current rank
// get the model to do it, actually
// Get/Create the model
if ($model =& $this->getModel($this->_defaultModel, 'Sh404sefModel')) {
// store initial context in model
$model->setContext($this->_context);
// call the delete method on our list
$model->makeMainUrl(intval($cid[0]));
// check errors and enqueue them for display if any
$errors = $model->getErrors();
if (!empty($errors)) {
$this > enqueuemessages($errors, 'error');
}
}
// send back response through default view
$this->display();
}
示例7: display
/**
* Display the view
*/
public function display($cachable = false)
{
// catch up any result message coming from an
// ajax save for instance, and push that into
// the application message queue
$messageCode = JRequest::getCmd('sh404sefMsg');
if (!empty($messageCode)) {
$msg = JText16::_($messageCode);
if ($msg != $messageCode) {
// if no language string exists, JText16 will
// return the input string, so only display if
// we have something to display
$app =& JFactory::getApplication();
$app->enqueuemessage($msg);
}
}
// get/create the view
$document =& JFactory::getDocument();
$viewType = $document->getType();
$view =& $this->getView($this->_adapter->_stepsMap[$this->_adapter->_step]['view'], $viewType, '', array('base_path' => $this->_basePath));
// Set the layout
$view->setLayout($this->_adapter->_stepsMap[$this->_adapter->_step]['layout']);
// push button list into the view
$view->assign('buttonsList', $this->_adapter->_buttonsList);
$view->assign('visibleButtonsList', $this->_adapter->_visibleButtonsList);
// push list of steps in to the view
foreach ($this->_adapter->_buttonsList as $button) {
$view->assign($button, $this->_adapter->_steps[$button]);
}
// push controller name into view
$view->assign('actionController', $this->_defaultController);
// push operation type and subject into the view
$view->assign('opType', $this->_opType);
$view->assign('opSubject', $this->_opSubject);
// push title, main and hidden text
$view->assign('pageTitle', $this->_pageTitle);
$view->assign('mainText', $this->_mainText);
$view->assign('hiddenText', $this->_hiddenText);
$view->assign('setFormEncType', $this->_setFormEncType);
// check if we are done, and need to set a redirect
if (!empty($this->_redirectTo)) {
$view->assign('redirectTo', $this->_redirectTo);
}
// check if we are continuein to another step, and need to set a redirect
if (!empty($this->_continue)) {
$view->assign('continue', $this->_continue);
}
if (!empty($this->_nextStart)) {
$view->assign('nextstart', $this->_nextStart);
}
// push controller errors in the view
$error = $this->getError();
if (!empty($error)) {
$view->setError($error);
}
// Display the view
$view->display();
}
示例8: _makeViewInfo
/**
* Attach css, js and create toolbar for Info view
*
* @param midxed $params
*/
private function _makeViewInfo($params = null)
{
global $mainframe;
// add our own css
JHtml::styleSheet('list.css', Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/');
// add title
$title = Sh404sefHelperGeneral::makeToolbarTitle(JText16::_('COM_SH404SEF_TITLE_SUPPORT'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title');
$mainframe->set('JComponentTitle', $title);
}
示例9: display
/**
* Display the view
*/
public function display($cachable = false)
{
// catch up any result message coming from an
// ajax save for instance, and push that into
// the application message queue
$messageCode = JRequest::getCmd('sh404sefMsg');
if (!empty($messageCode)) {
$msg = JText16::_($messageCode);
if ($msg != $messageCode) {
// if no language string exists, JText16 will
// return the input string, so only display if
// we have something to display
$app =& JFactory::getApplication();
$app->enqueuemessage($msg);
}
}
// Set the default view name in case it's missing
$viewName = JRequest::getWord('view');
if (empty($viewName)) {
JRequest::setVar('view', $this->_defaultView);
}
$document =& JFactory::getDocument();
$viewType = $document->getType();
$viewName = JRequest::getCmd('view', $this->_defaultView);
$viewLayout = JRequest::getCmd('layout', $this->_defaultLayout);
$view =& $this->getView($viewName, $viewType, '', array('base_path' => $this->_basePath));
// Get/Create the model
if ($model =& $this->getModel($viewName)) {
// store initial context in model
$model->setContext($this->_context);
// Push the model into the view (as default)
$view->setModel($model, true);
// and push also the default redirect
$view->assign('defaultRedirectUrl', $this->_getDefaultRedirect(array('layout' => $viewLayout)));
}
// Set the layout
$view->setLayout($viewLayout);
// push controller errors in the view
$error = $this->getError();
if (!empty($error)) {
$view->setError($error);
}
// Display the view
$view->display();
}
示例10: _makeToolbar
/**
* Create toolbar for current view
*
* @param midxed $params
*/
private function _makeToolbar($params = null)
{
// if redirect is set, no toolbar
if (!empty($this->redirectTo)) {
return;
}
// Get the JComponent instance of JToolBar
$bar =& JToolBar::getInstance('toolbar');
// add path to our custom buttons
$bar->addButtonPath(JPATH_COMPONENT . DS . 'classes');
// display all buttons we are supposed to display
foreach ($this->visibleButtonsList as $button) {
// we cannot use Joomla's buttons from a popup, as they use href="#" which causes the page to load in parallel with
// closing of the popup. Need use href="javascript: void(0);"
$bar->appendButton('Shpopupstandardbutton', $button, JText16::_($button), $task = $button, $list = false);
}
return $bar;
}
示例11: _getMessage
protected function _getMessage($type)
{
switch ($type) {
case 'success':
$msg = JText16::_('COM_SH404SEF_ELEMENT_SAVED');
break;
case 'failure':
$msg = JText16::_('COM_SH404SEF_ELEMENT_NOT_SAVED');
break;
case 'cancel':
$msg = JText16::_('COM_SH404SEF_CANCELLED');
break;
default:
$msg = '';
break;
}
return $msg;
}
示例12:
<input type="text" name="search_all" id="search_all" value="<?php
echo $this->escape($this->options->search_all);
?>
" size="35" maxlength="255" class="text_area" onchange="document.adminForm.limitstart.value=0;document.adminForm.submit();" />
<button onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_('Go');
?>
</button>
<button onclick="document.adminForm.limitstart.value=0;document.getElementById('search_all').value='';this.form.submit();"><?php
echo JText::_('Reset');
?>
</button>
</td>
<td align="left" nowrap="nowrap">
<?php
echo JText16::_('COM_SH404SEF_PAGE_ID');
?>
:
<input type="text" name="search_pageid" id="search_pageid" value="<?php
echo $this->escape($this->options->search_pageid);
?>
" size="20" maxlength="255" class="text_area" onchange="document.adminForm.limitstart.value=0;document.adminForm.submit();" />
<button onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_('Go');
?>
</button>
<button onclick="document.adminForm.limitstart.value=0;document.getElementById('search_pageid').value='';this.form.submit();"><?php
echo JText::_('Reset');
?>
</button>
</td>
示例13: array
$linkData = array('c' => 'editnotfound', 'notfound_url_id' => $url->id, 'task' => 'newredirect', 'tmpl' => 'component');
$urlData = array('title' => JText16::_('COM_SH404SEF_NOT_FOUND_ENTER_REDIRECT_TITLE'), 'class' => 'modalediturl', 'anchor' => JText16::_('COM_SH404SEF_NOT_FOUND_ENTER_REDIRECT'));
$modalOptions = array('size' => array('x' => '\\window.getSize().scrollSize.x*.7', 'y' => '\\window.getSize().size.y*.5'));
echo Sh404sefHelperHtml::makeLink($this, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
?>
</td>
</tr>
<?php
$k = 1 - $k;
}
} else {
?>
<tr>
<td align="center" colspan="6">
<?php
echo JText16::_('COM_SH404SEF_NO_URL');
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<input type="hidden" name="c" value="urls" />
<input type="hidden" name="view" value="urls" />
<input type="hidden" name="layout" value="view404" />
<input type="hidden" name="option" value="com_sh404sef" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php
示例14: die
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @version $Id: default_visits.php 1559 2010-08-23 10:01:15Z silianacom-svn $
*/
// Security check to ensure this file is being included by a parent file.
if (!defined('_JEXEC')) {
die('Direct Access to this location is not allowed.');
}
switch ($this->sefConfig->analyticsDashboardDataType) {
case 'ga:visits':
$title = JText16::_('COM_SH404SEF_ANALYTICS_DATA_VISITS_DESC_RAW');
break;
case 'ga:visitors':
$title = JText16::_('COM_SH404SEF_ANALYTICS_DATA_VISITORS_DESC_RAW');
break;
case 'ga:pageviews':
$title = JText16::_('COM_SH404SEF_ANALYTICS_GLOBAL_PAGEVIEWS_DESC_RAW');
break;
default:
$title = '';
break;
}
$title = Sh404sefHelperAnalytics::getDataTypeTitle() . (empty($title) ? '' : '::' . $title);
?>
<div class="hasAnalyticsTip" title="<?php
echo $title;
?>
" >
<fieldset>
示例15:
$x++;
echo Sh404sefViewHelperConfig::shYesNoParamHTML($x, JText16::_('COM_SH404SEF_CONTENT_TITLE_SHOW_CAT'), JText16::_('COM_SH404SEF_TT_CONTENT_TITLE_SHOW_CAT'), $this->lists['ContentTitleShowCat']);
$x++;
echo Sh404sefViewHelperConfig::shYesNoParamHTML($x, JText16::_('COM_SH404SEF_CONTENT_TITLE_USE_CAT_ALIAS'), JText16::_('COM_SH404SEF_TT_CONTENT_TITLE_USE_CAT_ALIAS'), $this->lists['ContentTitleUseCatAlias']);
?>
</table><?php
// end of params for meta tags management -->
echo $pane->endPanel();
echo $pane->startPanel(JText16::_('COM_SH404SEF_MOBILE_CONFIG'), 'mobileconfig');
// params for mobile template configuration -->
?>
<table class="adminlist"><tr><?php
$x++;
echo Sh404sefViewHelperConfig::shYesNoParamHTML($x, JText16::_('COM_SH404SEF_MOBILE_SWITCH_ENABLED'), JText16::_('COM_SH404SEF_TT_MOBILE_SWITCH_ENABLED'), $this->lists['mobile_switch_enabled']);
$x++;
Sh404sefViewHelperConfig::shTextParamHTML($x, JText16::_('COM_SH404SEF_MOBILE_SWITCH_TEMPLATE'), JText16::_('COM_SH404SEF_TT_MOBILE_SWITCH_TEMPLATE'), 'mobile_template', $this->lists['mobile_template'], 30, 30);
?>
</table>
<?php
echo $pane->endPanel();
echo $pane->endPane();
?>
<!-- end of configuration html -->
<input type="hidden" name="c" value="config" />
<input type="hidden" name="view" value="config" />
<input type="hidden" name="layout" value="seo" />
<input type="hidden" name="format" value="raw" />
<input type="hidden" name="option" value="com_sh404sef" />