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


PHP comments::setupLibraries方法代码示例

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


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

示例1: array

    $logItem = $logObj->serialize(0, $db->ui->userid, 'readStory', $story->siteContentId);
    // note this is the local contentid
    $logObj->update($logItem);
}
/* begin building the page */
$page->setTitle($story->title);
$page->pkgStyles(CACHE_PREFIX . 'nrStory', array(PATH_PHP_STYLES . '/newsroom.css', PATH_PHP_STYLES . '/tabs.css'));
$page->pkgScripts(CACHE_PREFIX . 'nrStory', array(PATH_PHP_SCRIPTS . '/comments.js', PATH_PHP_SCRIPTS . '/voting.js', PATH_PHP_SCRIPTS . '/journal.js'));
$page->addToHeader($common->buildHeader() . $common->buildNavigation('Read Story'));
$page->addToFooter($common->buildFooter());
$page->addRSSFeed(URL_HOME . '?p=rss');
$code = '';
$code .= '<div id="pageBody">';
$code .= '<div id="pageContent">';
$templateObj->registerTemplates('PHP');
/* fetch story */
$templateObj->db->result = $cObj->getByPermalink($permalink, true);
$templateObj->db->setTemplateCallback('time_since', array($utilObj, 'time_since'), 'date');
$templateObj->db->setTemplateCallback('caption', array($templateObj, 'cleanEllipsis'), 'caption');
$templateObj->db->setTemplateCallback('cmdVote', array($templateObj, 'commandVote'), 'siteContentId');
$templateObj->db->setTemplateCallback('cmdAdd', array($templateObj, 'commandAdd'), 'siteContentId');
$templateObj->db->setTemplateCallback('cmdRead', array($templateObj, 'commandRead'), 'permalink');
$templateObj->db->setTemplateCallback('storyImage', array($templateObj, 'getLargeStoryImage'), 'imageid');
$code .= $templateObj->mergeTemplate($templateObj->templates['readStoryContainer'], $templateObj->templates['readStoryContent']);
// display comments
$commentsObj->setupLibraries();
$code .= $commentsObj->buildComments(true, $story);
$code .= '</div><!-- end pageContent -->';
$code .= '</div><!-- end pageBody -->';
$page->addToContent($code);
$page->display();
开发者ID:smbale,项目名称:open-social-media-toolkit,代码行数:31,代码来源:readStory.php

示例2: comments

                     $code = 'Your comment has been posted!';
                 } else {
                     $error = true;
                     $errorMsg = 'Please enter a valid comment.';
                 }
             } else {
                 $error = true;
                 $errorMsg = 'There was a problem posting your comment.';
             }
             break;
         case 'refreshComments':
             if (isset($_GET['siteContentId'])) {
                 $siteContentId = $_GET['siteContentId'];
                 require_once PATH_PHP . 'classes/comments.class.php';
                 $comObj = new comments($db);
                 $comObj->setupLibraries();
                 $story = $comObj->contentObj->getById($siteContentId);
                 $code = $comObj->buildComments(false, $story);
             } else {
                 $code = 'Error finding comment thread';
             }
             break;
     }
     break;
 case 'common':
     define("INIT_SESSION", true);
     include_once 'initialize.php';
     switch ($cmd) {
         case 'recordVote':
             if (isset($_GET['siteContentId'])) {
                 $siteContentId = $_GET['siteContentId'];
开发者ID:smbale,项目名称:open-social-media-toolkit,代码行数:31,代码来源:ajax.php


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