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


PHP NewsStory::keywords方法代码示例

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


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

示例1: isset

 if ($approveprivilege) {
     $nohtml = isset($_POST['nohtml']) ? intval($_POST['nohtml']) : 0;
     $story->setNohtml($nohtml);
     if (!isset($_POST['approve'])) {
         $approve = 0;
     }
 } else {
     $story->setNohtml = 1;
 }
 $title = $story->title('InForm');
 $hometext = $story->hometext('InForm');
 if ($approveprivilege) {
     $bodytext = $story->bodytext('InForm');
     $ihome = $story->ihome();
     $description = $story->description('E');
     $keywords = $story->keywords('E');
 }
 //Display post preview
 $newsauthor = $story->uid();
 $p_title = $story->title('Preview');
 $p_hometext = $story->hometext('Preview');
 if ($approveprivilege) {
     $p_bodytext = $story->bodytext('Preview');
     $p_hometext .= '<br /><br />' . $p_bodytext;
 }
 $topicalign2 = isset($story->topicalign) ? 'align="' . $story->topicalign() . '"' : '';
 $p_hometext = $xt->topic_imgurl() != '' && $topicdisplay ? '<img src="images/topics/' . $xt->topic_imgurl() . '" ' . $topicalign2 . ' alt="" />' . $p_hometext : $p_hometext;
 themecenterposts($p_title, $p_hometext);
 //Display post edit form
 $returnside = intval($_POST['returnside']);
 include_once XOOPS_ROOT_PATH . '/modules/news/include/storyform.inc.php';
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:submit.php

示例2: PrintPage

    exit;
}
// Verify permissions
$gperm_handler =& xoops_gethandler('groupperm');
if (is_object($xoopsUser)) {
    $groups = $xoopsUser->getGroups();
} else {
    $groups = XOOPS_GROUP_ANONYMOUS;
}
if (!$gperm_handler->checkRight('news_view', $story->topicid(), $groups, $xoopsModule->getVar('mid'))) {
    redirect_header(XOOPS_URL . '/modules/news/index.php', 3, _NOPERM);
    exit;
}
$xoops_meta_keywords = '';
$xoops_meta_description = '';
if (trim($story->keywords()) != '') {
    $xoops_meta_keywords = $story->keywords();
} else {
    $xoops_meta_keywords = news_createmeta_keywords($story->hometext() . ' ' . $story->bodytext());
}
if (trim($story->description()) != '') {
    $xoops_meta_description = $story->description();
} else {
    $xoops_meta_description = strip_tags($story->title());
}
function PrintPage()
{
    global $xoopsConfig, $xoopsModule, $story, $xoops_meta_keywords, $xoops_meta_description;
    $myts =& MyTextSanitizer::getInstance();
    $datetime = formatTimestamp($story->published(), news_getmoduleoption('dateformat'));
    ?>
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:print.php

示例3: sprintf

if (getmoduleoption('ratenews')) {
    $xoopsTpl->assign('rates', true);
    $xoopsTpl->assign('lang_ratingc', _NW_RATINGC);
    $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS);
    $story['rating'] = number_format($article->rating(), 2);
    if ($article->votes == 1) {
        $story['votes'] = _NW_ONEVOTE;
    } else {
        $story['votes'] = sprintf(_NW_NUMVOTES, $article->votes);
    }
} else {
    $xoopsTpl->assign('rates', false);
}
$xoopsTpl->assign('story', $story);
/**
* META Keywords and description
*
* If you have set this module's option to 'yes' and if the information was entered, then they are rendered in the page else they are computed
*/
if (trim($article->keywords()) != '') {
    $xoopsTpl->assign('xoops_meta_keywords', $article->keywords());
} else {
    $xoopsTpl->assign('xoops_meta_keywords', news_createmeta_keywords($story['text']));
}
if (trim($article->description()) != '') {
    $xoopsTpl->assign('xoops_meta_description', $article->description());
} else {
    $xoopsTpl->assign('xoops_meta_description', $article->title());
}
include_once XOOPS_ROOT_PATH . '/include/comment_view.php';
include_once XOOPS_ROOT_PATH . '/footer.php';
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:article.php


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