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


PHP content::getByPermalink方法代码示例

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


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

示例1: content

$cObj = new content($db);
require_once PATH_CORE . '/classes/template.class.php';
$templateObj = new template($db);
require_once PATH_CORE . '/classes/utilities.class.php';
$utilObj = new utilities($db);
require_once PATH_PHP . '/classes/comments.class.php';
$commentsObj = new comments($db);
/* process request variables */
if (isset($_GET['permalink'])) {
    $permalink = $_GET['permalink'];
} else {
    // go to 404 error page
    header("Location: " . URL_ROOT);
    exit;
}
$story = $cObj->getByPermalink($permalink);
// record story read by this user
if ($db->ui->isLoggedIn) {
    require_once PATH_CORE . '/classes/log.class.php';
    $logObj = new log(&$db);
    $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');
开发者ID:smbale,项目名称:open-social-media-toolkit,代码行数:31,代码来源:readStory.php

示例2: content

$cObj = new content($db);
require_once PATH_CORE . '/classes/template.class.php';
$templateObj = new template($db);
require_once PATH_CORE . '/classes/utilities.class.php';
$utilObj = new utilities($db);
require_once PATH_PHP . '/classes/comments.class.php';
$commentsObj = new comments($db);
/* process request variables */
if (isset($_GET['permalink'])) {
    $permalink = $_GET['permalink'];
} else {
    // go to 404 error page
    header("Location: " . URL_ROOT);
    exit;
}
$story = $cObj->getByPermalink($permalink);
// record story read by this user
/*	if ($db->ui->isLoggedIn) {
		require_once(PATH_CORE.'/classes/log.class.php');
		$logObj=new log(&$db);
		$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('');
$code = buildTop($story->url);
$page->addToFooter('');
//$page->addRSSFeed(URL_HOME.'?p=rss');
开发者ID:smbale,项目名称:open-social-media-toolkit,代码行数:31,代码来源:rf.php


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