本文整理汇总了PHP中NewsStory::setComments方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsStory::setComments方法的具体用法?PHP NewsStory::setComments怎么用?PHP NewsStory::setComments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsStory
的用法示例。
在下文中一共展示了NewsStory::setComments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$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']);
$sfile->setStoryid($news_newsid);
$sfile->date = $file['date'];