本文整理汇总了PHP中NewsStory::getAllPublishedByAuthor方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsStory::getAllPublishedByAuthor方法的具体用法?PHP NewsStory::getAllPublishedByAuthor怎么用?PHP NewsStory::getAllPublishedByAuthor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsStory
的用法示例。
在下文中一共展示了NewsStory::getAllPublishedByAuthor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
$xoopsTpl->assign('lang_news_by_this_author', _MI_NEWSBYTHISAUTHOR);
$xoopsTpl->assign('author_id', $uid);
$xoopsTpl->assign('user_avatarurl', XOOPS_URL . '/uploads/' . $thisuser->getVar('user_avatar'));
$xoopsTpl->assign('author_name', $authname);
$xoopsTpl->assign('lang_date', _NW_DATE);
$xoopsTpl->assign('lang_hits', _NW_VIEWS);
$xoopsTpl->assign('lang_title', _NW_TITLE);
$xoopsTpl->assign('news_rating', news_getmoduleoption('ratenews'));
$xoopsTpl->assign('lang_rating', _NW_RATING);
$xoopsTpl->assign('author_name_with_link', sprintf("<a href='%s'>%s</a>", XOOPS_URL . '/userinfo.php?uid=' . $uid, $authname));
$oldtopic = -1;
$oldtopictitle = '';
$oldtopiccolor = '';
$articlelist = array();
$articlestpl = array();
$articlelist = $articles->getAllPublishedByAuthor($uid, $xoopsModuleConfig['restrictindex'], false);
$articlescount = count($articlelist);
$xoopsTpl->assign('articles_count', $articlescount);
$count_articles = $count_reads = 0;
if ($articlescount > 0) {
foreach ($articlelist as $article) {
if ($oldtopic != $article['topicid']) {
if (count($articlestpl) > 0) {
$topic_link = sprintf("<a href='%s'>%s</a>", XOOPS_URL . '/modules/news/index.php?storytopic=' . $oldtopic, $oldtopictitle);
$xoopsTpl->append('topics', array('topic_id' => $oldtopic, 'topic_count_articles' => sprintf(_AM_NEWS_TOTAL, $count_articles), 'topic_count_reads' => $count_reads, 'topic_color' => $oldtopiccolor, 'topic_title' => $oldtopictitle, 'topic_link' => $topic_link, 'news' => $articlestpl));
}
$oldtopic = $article['topicid'];
$oldtopictitle = $article['topic_title'];
$oldtopiccolor = '#' . $myts->displayTarea($article['topic_color']);
$articlestpl = array();
$count_articles = $count_reads = 0;