本文整理汇总了PHP中Sh404sefFactory::getPConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Sh404sefFactory::getPConfig方法的具体用法?PHP Sh404sefFactory::getPConfig怎么用?PHP Sh404sefFactory::getPConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sh404sefFactory
的用法示例。
在下文中一共展示了Sh404sefFactory::getPConfig方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: empty
<?php
echo '<input type="hidden" name="metaid[' . $url->id . ']" value="' . (empty($url->metaid) ? 0 : $url->metaid) . '" />';
echo '<input type="hidden" name="newurls[' . $url->id . ']" value="' . (empty($url->nonsefurl) ? '' : $this->escape($url->nonsefurl)) . '" />';
// link to full meta edit
$anchor = empty($url->oldurl) ? '(-)' : $this->escape($url->oldurl);
$anchor .= '<br/><i>(' . $this->escape($url->nonsefurl) . ')</i>';
$params = array();
$linkData = array('c' => 'editurl', 'task' => 'edit', 'view' => 'editurl', 'startOffset' => '1', 'cid[]' => $url->id, 'tmpl' => 'component');
$targetUrl = Sh404sefHelperGeneral::buildUrl($linkData);
$displayedUrl = empty($url->oldurl) ? $url->nonsefurl : $url->oldurl;
$params['linkTitle'] = JText::_('COM_SH404SEF_MODIFY_META_TITLE') . ' ' . $this->escape($displayedUrl);
$modalTitle = '';
$params['linkClass'] = 'shl-list-sef';
$params['linkType'] = 'a';
$name = '-editurl-' . $url->id;
echo ShlHtmlModal_helper::modalLink($name, $anchor, $targetUrl, Sh404sefFactory::getPConfig()->windowSizes['editurl']['x'], Sh404sefFactory::getPConfig()->windowSizes['editurl']['y'], $top = 0, $left = 0, $onClose = '', $modalTitle, $params);
// small preview icon
$sefConfig =& Sh404sefFactory::getConfig();
$link = JURI::root() . ltrim($sefConfig->shRewriteStrings[$sefConfig->shRewriteMode], '/') . (empty($url->oldurl) ? $url->nonsefurl : $url->oldurl);
echo ' <a href="' . $this->escape($link) . '" target="_blank" title="' . JText::_('COM_SH404SEF_PREVIEW') . ' ' . $this->escape($url->oldurl) . '">';
echo '<img src=\'components/com_sh404sef/assets/images/external-black.png\' border=\'0\' alt=\'' . JText::_('COM_SH404SEF_PREVIEW') . '\' />';
echo '</a>';
?>
</td>
<td class="shl-list-icon">
<?php
echo $custom;
?>
</td>
示例2: _makeToolbarView404J3
/**
* Create toolbar for 404 pages template
*
* @param midxed $params
*/
private function _makeToolbarView404J3($params = null)
{
// separator
JToolBarHelper::divider();
// add title
JToolbarHelper::title('sh404SEF: ' . JText::_('COM_SH404SEF_404_MANAGER'), 'sh404sef-toolbar-title');
// add "New url" button
$bar = JToolBar::getInstance('toolbar');
// prepare configuration button
$bar->addButtonPath(SHLIB_ROOT_PATH . 'toolbarbutton');
// add edit button
$params = array();
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['editurl'];
$params['buttonClass'] = 'btn btn-small btn-primary';
$params['iconClass'] = 'icon-edit';
$params['checkListSelection'] = true;
$url = 'index.php?option=com_sh404sef&c=editurl&task=edit&tmpl=component';
$bar->appendButton('J3popuptoolbarbutton', 'edit', JText::_('JTOOLBAR_EDIT'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = '', $params);
// add delete button
$params = array();
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['confirm'];
$params['buttonClass'] = 'btn btn-small';
$params['iconClass'] = 'icon-trash';
$params['checkListSelection'] = true;
$url = 'index.php?option=com_sh404sef&c=editurl&task=confirmdelete404&tmpl=component';
$bar->appendButton('J3popuptoolbarbutton', 'delete', JText::_('JTOOLBAR_DELETE'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = JText::_('COM_SH404SEF_CONFIRM_TITLE'), $params);
// separator
JToolBarHelper::spacer(20);
// add export button
$params = array();
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['export'];
$params['buttonClass'] = 'btn btn-small';
$params['iconClass'] = 'icon-download';
$params['checkListSelection'] = false;
$url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=export&opsubject=view404';
$bar->appendButton('J3popuptoolbarbutton', 'export', JText::_('COM_SH404SEF_EXPORT_BUTTON'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = JText::_('COM_SH404SEF_EXPORTING_TITLE'), $params);
// separator
JToolBarHelper::spacer(20);
// add purge buttons
$params = array();
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['confirm'];
$params['buttonClass'] = 'btn btn-small btn-danger';
$params['iconClass'] = 'shl-icon-remove-sign';
$params['checkListSelection'] = false;
$url = 'index.php?option=com_sh404sef&c=urls&task=confirmpurge404&tmpl=component';
$bar->appendButton('J3popuptoolbarbutton', 'purge', JText::_('COM_SH404SEF_PURGE404'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = JText::_('COM_SH404SEF_CONFIRM_TITLE'), $params);
}
示例3: _makeToolbarDefaultJ3
/**
* Create toolbar for default layout view
*
* @param midxed $params
*/
private function _makeToolbarDefaultJ3($params = null)
{
// add title
JToolbarHelper::title('sh404SEF: ' . JText::_('COM_SH404SEF_PAGEIDS_MANAGER'), 'sh404sef-toolbar-title');
// add "New url" button
$bar = JToolBar::getInstance('toolbar');
// prepare configuration button
$bar->addButtonPath(SHLIB_ROOT_PATH . 'toolbarbutton');
$params = array();
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['import'];
$params['buttonClass'] = 'btn btn-small';
$params['iconClass'] = 'icon-upload';
$params['checkListSelection'] = false;
$url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=import&opsubject=pageids';
$bar->appendButton('J3popuptoolbarbutton', 'import', JText::_('COM_SH404SEF_IMPORT_BUTTON'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = JText::_('COM_SH404SEF_IMPORTING_TITLE'), $params);
// add import button
$params = array();
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['export'];
$params['buttonClass'] = 'btn btn-small';
$params['iconClass'] = 'icon-download';
$params['checkListSelection'] = false;
$url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=export&opsubject=pageids';
$bar->appendButton('J3popuptoolbarbutton', 'export', JText::_('COM_SH404SEF_EXPORT_BUTTON'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = JText::_('COM_SH404SEF_EXPORTING_TITLE'), $params);
// separator
JToolBarHelper::spacer(20);
// add delete button
$params = array();
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['confirm'];
$params['buttonClass'] = 'btn btn-small';
$params['iconClass'] = 'icon-trash';
$params['checkListSelection'] = true;
$url = 'index.php?option=com_sh404sef&c=pageids&task=confirmdelete&tmpl=component';
$bar->appendButton('J3popuptoolbarbutton', 'delete', JText::_('JTOOLBAR_DELETE'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = JText::_('COM_SH404SEF_CONFIRM_TITLE'), $params);
}
示例4: _getTrackingVars
protected static function _getTrackingVars()
{
$trackingVars = Sh404sefFactory::getPConfig()->trackingVars;
return $trackingVars;
}
示例5:
</tr>
</thead>
<tfoot>
<tr>
<td colspan="6">
<?php
echo '<div id="shl-bottom-pagination-container">' . $this->pagination->getListFooter() . '</div>';
?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
if ($this->itemCount > 0) {
$sizes = Sh404sefFactory::getPConfig()->windowSizes;
for ($i = 0; $i < $this->itemCount; $i++) {
$url =& $this->items[$i];
$checked = JHtml::_('grid.id', $i, $url->id);
$custom = ' ';
?>
<tr>
<td class="shl-list-id">
<?php
echo $this->pagination->getRowOffset($i);
?>
</td>
<td class="shl-list-check">
<?php
echo $checked;
示例6: shIsSearchEngine
function shIsSearchEngine()
{
// return true if user agant is a search engine
static $isSearchEngine = null;
//return true;
if (!is_null($isSearchEngine)) {
return $isSearchEngine;
} else {
$isSearchEngine = false;
$useragent = empty($_SERVER['HTTP_USER_AGENT']) ? '' : strtolower($_SERVER['HTTP_USER_AGENT']);
if (!empty($useragent)) {
$remoteConfig = Sh404sefHelperUpdates::getRemoteConfig($forced = false);
$remotes = empty($remoteConfig->config['searchenginesagents']) ? array() : $remoteConfig->config['searchenginesagents'];
$agents = array_unique(array_merge(Sh404sefFactory::getPConfig()->searchEnginesAgents, $remotes));
foreach ($agents as $agent) {
if (strpos($useragent, strtolower($agent)) !== false) {
$isSearchEngine = true;
return true;
}
}
}
return $isSearchEngine;
}
}
示例7: ltrim
$targetUrl = Sh404sefHelperGeneral::buildUrl($linkData);
$params['linkTitle'] = Sh404sefHelperHtml::abridge(JText::_('COM_SH404SEF_MODIFY_LINK_TITLE') . ' ' . $this->escape($url->oldurl), 'editurl');
$modalTitle = '';
$name = '-editurl-' . $url->id;
$params['linkClass'] = 'shl-list-sef';
$params['linkType'] = 'a';
echo ShlHtmlModal_helper::modalLink($name, $anchor, $targetUrl, Sh404sefFactory::getPConfig()->windowSizes['editurl']['x'], Sh404sefFactory::getPConfig()->windowSizes['editurl']['y'], $top = 0, $left = 0, $onClose = '', $modalTitle, $params);
// small preview icon
$sefConfig =& Sh404sefFactory::getConfig();
$link = JURI::root() . ltrim($sefConfig->shRewriteStrings[$sefConfig->shRewriteMode], '/') . (empty($url->oldurl) ? $nonSefUrl : $url->oldurl);
echo ' <a href="' . $this->escape($link) . '" target="_blank" title="' . JText::_('COM_SH404SEF_PREVIEW') . ' ' . $this->escape($link) . '">';
echo '<img src=\'components/com_sh404sef/assets/images/external-black.png\' border=\'0\' alt=\'' . JText::_('COM_SH404SEF_PREVIEW') . '\' />';
echo '</a>';
// attach an input counter to the title input boxes
echo ShlHtmlBs_Helper::renderInputCounter('metatitle' . $url->id, Sh404sefFactory::getPConfig()->metaDataSpecs['metatitle']);
echo ShlHtmlBs_Helper::renderInputCounter('metadesc' . $url->id, Sh404sefFactory::getPConfig()->metaDataSpecs['metadesc']);
?>
</td>
<td class="center">
<textarea class="text_area" id="metatitle<?php
echo $url->id;
?>
" name="metatitle[<?php
echo $url->id;
?>
]" cols="40" rows="5"><?php
echo $this->escape($url->metatitle);
?>
</textarea>
</td>
示例8: _makeViewDefault
/**
* Attach css, js and create toolbar for default view
*
* @param midxed $params
*/
private function _makeViewDefault($params = null)
{
// prepare database stats, etc
$this->_prepareControlPanelData();
// Get the JComponent instance of JToolBar
$bar = JToolBar::getInstance('toolbar');
if (version_compare(JVERSION, '3.0', 'ge')) {
$document = JFactory::getDocument();
// render submenu sidebar
$this->sidebar = JHtmlSidebar::render();
// add modal css and js
ShlHtmlBs_helper::addBootstrapCss(JFactory::getDocument());
ShlHtmlBs_helper::addBootstrapJs(JFactory::getDocument());
// add title
JToolbarHelper::title('sh404SEF: ' . JText::_('COM_SH404SEF_CONTROL_PANEL'), 'sh404sef-toolbar-title');
// prepare configuration button
$bar->addButtonPath(SHLIB_ROOT_PATH . 'toolbarbutton');
$params = array();
$params['class'] = 'modaltoolbar btn-success';
$params['size'] = Sh404sefFactory::getPConfig()->windowSizes['configuration'];
$params['buttonClass'] = 'btn-success btn btn-small modal';
$params['iconClass'] = 'icon-options';
$url = 'index.php?option=com_sh404sef&tmpl=component&c=configuration&view=configuration&component=com_sh404sef&hidemainmenu=1';
$bar->appendButton('J3popuptoolbarbutton', 'configj3', JText::_('COM_SH404SEF_CONFIGURATION'), $url, $params['size']['x'], $params['size']['y'], $top = 0, $left = 0, $onClose = '', $title = '', $params);
$html = '<div id="sh-progress-cpprogress"></div>';
$bar->appendButton('custom', $html, 'sh-progress-button-cpprogress');
// add analytics and other ajax calls loader
$sefConfig = Sh404sefFactory::getConfig();
$analyticsBootstrap = $sefConfig->analyticsReportsEnabled ? 'shSetupAnalytics({report:"dashboard",showFilters:"no"});' : '';
$js = 'jQuery(document).ready(function(){ ' . $analyticsBootstrap . ' shSetupQuickControl(); shSetupSecStats(); shSetupUpdates();});';
$document = JFactory::getDocument();
$document->addScriptDeclaration($js);
} else {
// add behaviors and styles as needed
$modalSelector = 'a.modalediturl';
$js = '\\function(){window.parent.shAlreadySqueezed = false;if(window.parent.shReloadModal) {parent.window.location=\'index.php?option=com_sh404sef\';window.parent.shReloadModal=true}}';
$params = array('overlayOpacity' => 0, 'classWindow' => 'sh404sef-popup', 'classOverlay' => 'sh404sef-popup', 'onClose' => $js);
Sh404sefHelperHtml::modal($modalSelector, $params);
// import tabs
jimport('joomla.html.pane');
// add tooltips handler
JHTML::_('behavior.tooltip');
// add title
$title = Sh404sefHelperGeneral::makeToolbarTitle(JText::_('COM_SH404SEF_CONTROL_PANEL'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title');
JFactory::getApplication()->JComponentTitle = $title;
// add a div to display our ajax-call-in-progress indicator
$bar->addButtonPath(JPATH_COMPONENT . '/' . 'classes');
$html = '<div id="sh-progress-cpprogress"></div>';
$bar->appendButton('custom', $html, 'sh-progress-button-cpprogress');
// add modal handler for configuration
JHTML::_('behavior.modal');
$configbtn = '<a class="modal" href="index.php?option=com_sh404sef&tmpl=component&c=configuration&view=configuration&component=com_sh404sef&hidemainmenu=1" rel="{handler: \'iframe\', size: {x: window.getSize().x*0.90, y: window.getSize().y*0.90}, onClose: function() {}}"><span class="icon-32-options"></span>' . JText::_('COM_SH404SEF_CONFIGURATION') . '</a>';
$bar->appendButton('custom', $configbtn, 'sh-configbutton-button');
// add analytics and other ajax calls loader
$sefConfig = Sh404sefFactory::getConfig();
$analyticsBootstrap = $sefConfig->analyticsReportsEnabled ? 'shSetupAnalytics({report:"dashboard",showFilters:"no"});' : '';
$js = 'window.addEvent(\'domready\', function(){ ' . $analyticsBootstrap . ' shSetupQuickControl(); shSetupSecStats(); shSetupUpdates();});';
$document = JFactory::getDocument();
$document->addScriptDeclaration($js);
}
// add our javascript
JHTML::script(Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/' . $this->joomlaVersionPrefix . '_cp.js');
// add our own css
JHtml::styleSheet(Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/' . $this->joomlaVersionPrefix . '_cp.css');
}
示例9: abridge
/**
* Shorten a text string, using sizes predefined in the program configuration
*
* @param string $text the text to be shorteb
* @param string $type index of shortening dimensions in modalTitleSizes program config array
* @return string
*/
public static function abridge($text, $type)
{
return JHtml::_('string.abridge', $text, Sh404sefFactory::getPConfig()->modalTitleSizes[$type]['l'], Sh404sefFactory::getPConfig()->modalTitleSizes[$type]['i']);
}