本文整理汇总了PHP中NewsStory::setTopicdisplay方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsStory::setTopicdisplay方法的具体用法?PHP NewsStory::setTopicdisplay怎么用?PHP NewsStory::setTopicdisplay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsStory
的用法示例。
在下文中一共展示了NewsStory::setTopicdisplay方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtotime
}
if (!empty($_POST['autoexpdate']) && $approveprivilege) {
$expiry_date = $_POST['expiry_date'];
$expiry_date = strtotime($expiry_date['date']) + $expiry_date['time'];
$offset = $xoopsUser->timezone() - $xoopsConfig['server_TZ'];
$expiry_date = $expiry_date - $offset * 3600;
$story->setExpired($expiry_date);
} else {
$story->setExpired(0);
}
if ($approveprivilege) {
if (news_getmoduleoption('metadata')) {
$story->Setdescription($_POST['description']);
$story->Setkeywords($_POST['keywords']);
}
$story->setTopicdisplay($_POST['topicdisplay']);
// Display Topic Image ? (Yes or No)
$story->setTopicalign($_POST['topicalign']);
// Topic Align, 'Right' or 'Left'
$story->setIhome($_POST['ihome']);
// Publish in home ? (Yes or No)
if (isset($_POST['bodytext'])) {
$story->setBodytext($_POST['bodytext']);
} else {
$story->setBodytext(' ');
}
$approve = isset($_POST['approve']) ? intval($_POST['approve']) : 0;
if (!$story->published() && $approve) {
$story->setPublished(time());
}
if (!$story->expired()) {
示例2: empty
$expdate = $expdate - $offset * 3600;
$story->setExpired($expdate);
}
}
$story->setApproved($approve);
$story->setTopicId($topicid);
$story->setTitle($title);
$story->setHometext($hometext);
$story->setBodytext($bodytext);
$nohtml = empty($nohtml) ? 0 : 1;
$nosmiley = empty($nosmiley) ? 0 : 1;
$story->setNohtml($nohtml);
$story->setNosmiley($nosmiley);
$story->setIhome($ihome);
$story->setTopicalign($topicalign);
$story->setTopicdisplay($topicdisplay);
$story->store();
$notification_handler =& xoops_gethandler('notification');
$tags = array();
$tags['STORY_NAME'] = $story->title();
$tags['STORY_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/article.php?storyid=' . $story->storyid();
if (!empty($isnew)) {
$notification_handler->triggerEvent('story', $story->storyid(), 'approve', $tags);
}
$notification_handler->triggerEvent('global', 0, 'new_story', $tags);
/*
$poster = new XoopsUser($story->uid());
$subject = _AM_ARTPUBLISHED;
$message = sprintf(_AM_HELLO,$poster->uname());
$message .= "\n\n"._AM_YOURARTPUB."\n\n";
$message .= _AM_TITLEC.$story->title()."\n"._AM_URLC.XOOPS_URL."/modules/".$xoopsModule->dirname()."/article.php?storyid=".$story->storyid()."\n"._AM_PUBLISHEDC.formatTimestamp($story->published(),"m",0)."\n\n";
示例3: empty
$story->setTopicId(1);
/**/
$story->setHostname(xoops_getenv('REMOTE_ADDR'));
/**/
$dohtml = $post->getVar('dohtml');
$nohtml = empty($dohtml) ? 1 : 0;
$story->setNohtml($nohtml);
/**/
$story->setNosmiley(0);
/**/
$story->setNotifyPub(0);
/**/
$story->setType('admin');
$story->setExpired(0);
/**/
$story->setTopicdisplay(0);
/**/
$story->setTopicalign('R');
/**/
$story->setIhome(0);
/**/
$story->setBodytext(' ');
/**/
$story->setExpired(0);
/**/
$story->setPublished(0);
/**/
$story->setApproved(0);
/**/
//save the story
$result = $story->store();
示例4: while
$news->created = $article['created'];
$news->setPublished($article['published']);
$news->setExpired($article['expired']);
$news->setHostname($article['hostname']);
$news->setNohtml($article['nohtml']);
$news->setNosmiley($article['nosmiley']);
$news->setHometext($text_lastversion['hometext']);
$news->setBodytext($text_lastversion['bodytext'] . $links . $forum);
$news->Setkeywords('');
$news->Setdescription('');
$news->counter = $article['counter'];
$news->setTopicId($news_topicid);
$news->setIhome($article['ihome']);
$news->setNotifyPub($article['notifypub']);
$news->story_type = $article['story_type'];
$news->setTopicdisplay($article['topicdisplay']);
$news->setTopicalign($article['topicalign']);
$news->setComments($article['comments']);
$news->rating = $article['rating'];
$news->votes = $votes['cpt'];
$approved = $article['published'] > 0 ? true : false;
$news->approved = $approved;
$news->store($approved);
echo '<br> This story was imported : ' . $news->title();
$news_newsid = $news->storyid();
// ********************
// The files
$result4 = $db->query('SELECT * FROM ' . $ams_files . ' WHERE storyid=' . $ams_newsid);
while ($file = $db->fetchArray($result4)) {
$sfile = new sFiles();
$sfile->setFileRealName($file['filerealname']);