本文整理汇总了PHP中NNFrameworkFunctions::isFeed方法的典型用法代码示例。如果您正苦于以下问题:PHP NNFrameworkFunctions::isFeed方法的具体用法?PHP NNFrameworkFunctions::isFeed怎么用?PHP NNFrameworkFunctions::isFeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NNFrameworkFunctions
的用法示例。
在下文中一共展示了NNFrameworkFunctions::isFeed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processModules
function processModules(&$string, $area = 'articles', $context = '')
{
// Check if tags are in the text snippet used for the search component
if (strpos($context, 'com_search.') === 0) {
$limit = explode('.', $context, 2);
$limit = (int) array_pop($limit);
$string_check = substr($string, 0, $limit);
if (!NNText::stringContains($string_check, $this->params->start_tags)) {
return;
}
}
if (!NNText::stringContains($string, $this->params->start_tags)) {
return;
}
jimport('joomla.application.module.helper');
if (!NNFrameworkFunctions::isFeed()) {
JPluginHelper::importPlugin('content');
}
$this->replace($string, $area);
}
示例2: replaceInTheRest
function replaceInTheRest(&$string)
{
if (!is_string($string) || $string == '') {
return;
}
list($pre_string, $string, $post_string) = NNText::getContentContainingSearches($string, array('{' . $this->src_params->syntax_word), array('{/' . $this->src_params->syntax_word . '}'));
if ($string == '') {
$string = $pre_string . $string . $post_string;
return;
}
// COMPONENT
if (NNFrameworkFunctions::isFeed()) {
$s = '#(<item[^>]*>)#s';
$string = preg_replace($s, '\\1<!-- START: SRC_COMPONENT -->', $string);
$string = str_replace('</item>', '<!-- END: SRC_COMPONENT --></item>', $string);
}
if (strpos($string, '<!-- START: SRC_COMPONENT -->') === false) {
$this->tagArea($string, 'SRC', 'component');
}
$components = $this->getTagArea($string, 'SRC', 'component');
foreach ($components as $component) {
$this->replace($component['1'], 'components', '');
$string = str_replace($component['0'], $component['1'], $string);
}
// EVERYWHERE
$this->replace($string, 'other');
$string = $pre_string . $string . $post_string;
}