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


PHP NewsStory::getAllSubmitted方法代码示例

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


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

示例1: newSubmissions

/**
 * Show new submissions
 *
 * This list can be view in the module's admin when you click on the tab named "Post/Edit News"
 * Submissions are news that was submit by users but who are not approved, so you need to edit
 * them to approve them.
 * Actually you can see the the story's title, the topic, the posted date, the author and a
 * link to delete the story. If you click on the story's title, you will be able to edit the news.
 * The table contains ALL the new submissions.
 * The system's block called "Waiting Contents" is listing the number of those news.
 */
function newSubmissions()
{
    global $dateformat;
    $storyarray = NewsStory::getAllSubmitted();
    if (count($storyarray) > 0) {
        news_collapsableBar('newsub', 'topnewsubicon');
        echo "<img onclick='toggle('toptable'); toggleIcon('toptableicon');' id='topnewsubicon' name='topnewsubicon' src=" . XOOPS_URL . "/modules/news/images/close12.gif alt='' /></a>&nbsp;" . _AM_NEWSUB . "</h4>";
        echo "<div id='newsub'>";
        echo "<br />";
        echo "<div style='text-align: center;'><table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><td align='center'>" . _AM_TITLE . "</td><td align='center'>" . _AM_TOPIC . "</td><td align='center'>" . _AM_POSTED . "</td><td align='center'>" . _AM_POSTER . "</td><td align='center'>" . _AM_ACTION . "</td></tr>\n";
        $class = '';
        foreach ($storyarray as $newstory) {
            $class = $class == 'even' ? 'odd' : 'even';
            echo "<tr class='" . $class . "'><td align='left'>\n";
            $title = $newstory->title();
            if (!isset($title) || $title == "") {
                echo "<a href='" . XOOPS_URL . "/modules/news/admin/index.php?op=edit&amp;returnside=1&amp;storyid=" . $newstory->storyid() . "'>" . _AD_NOSUBJECT . "</a>\n";
            } else {
                echo "&nbsp;<a href='" . XOOPS_URL . "/modules/news/submit.php?returnside=1&amp;op=edit&amp;storyid=" . $newstory->storyid() . "'>" . $title . "</a>\n";
            }
            echo "</td><td>" . $newstory->topic_title() . "</td><td align='center' class='nw'>" . formatTimestamp($newstory->created(), $dateformat) . "</td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $newstory->uid() . "'>" . $newstory->uname() . "</a></td><td align='right'><a href='" . XOOPS_URL . "/modules/news/admin/index.php?op=delete&amp;storyid=" . $newstory->storyid() . "'>" . _AM_DELETE . "</a></td></tr>\n";
        }
        echo "</table></div>";
        echo "<br /></div><br />";
    }
}
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:37,代码来源:index.php

示例2: newSubmissions

/**
 * Show new submissions
 *
 * This list can be view in the module's admin when you click on the tab named "Post/Edit News"
 * Submissions are news that was submit by users but who are not approved, so you need to edit
 * them to approve them.
 * Actually you can see the the story's title, the topic, the posted date, the author and a
 * link to delete the story. If you click on the story's title, you will be able to edit the news.
 * The table contains the last x new submissions.
 * The system's block called "Waiting Contents" is listing the number of those news.
 */
function newSubmissions()
{
    global $dateformat;
    $start = isset($_GET['startnew']) ? intval($_GET['startnew']) : 0;
    $newsubcount = NewsStory::getAllStoriesCount(3, false);
    $storyarray = NewsStory::getAllSubmitted(news_getmoduleoption('storycountadmin'), true, news_getmoduleoption('restrictindex'), $start);
    if (count($storyarray) > 0) {
        $pagenav = new XoopsPageNav($newsubcount, news_getmoduleoption('storycountadmin'), $start, 'startnew', 'op=newarticle');
        news_collapsableBar('newsub', 'topnewsubicon');
        echo "<img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='topnewsubicon' name='topnewsubicon' src='" . XOOPS_URL . "/modules/news/images/close12.gif' alt='' /></a>&nbsp;" . _AM_NEWSUB . "</h4>";
        echo "<div id='newsub'>";
        echo '<br />';
        echo "<div style='text-align: center;'><table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><td align='center'>" . _AM_TITLE . "</td><td align='center'>" . _AM_TOPIC . "</td><td align='center'>" . _AM_POSTED . "</td><td align='center'>" . _AM_POSTER . "</td><td align='center'>" . _AM_ACTION . "</td></tr>\n";
        $class = '';
        foreach ($storyarray as $newstory) {
            $class = $class == 'even' ? 'odd' : 'even';
            echo "<tr class='" . $class . "'><td align='left'>\n";
            $title = $newstory->title();
            if (!isset($title) || $title == '') {
                echo "<a href='" . XOOPS_URL . "/modules/news/admin/index.php?op=edit&amp;returnside=1&amp;storyid=" . $newstory->storyid() . "'>" . _AD_NOSUBJECT . "</a>\n";
            } else {
                echo "&nbsp;<a href='" . XOOPS_URL . "/modules/news/submit.php?returnside=1&amp;op=edit&amp;storyid=" . $newstory->storyid() . "'>" . $title . "</a>\n";
            }
            echo "</td><td>" . $newstory->topic_title() . "</td><td align='center' class='nw'>" . formatTimestamp($newstory->created(), $dateformat) . "</td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $newstory->uid() . "'>" . $newstory->uname() . "</a></td><td align='right'><a href='" . XOOPS_URL . "/modules/news/admin/index.php?op=delete&amp;storyid=" . $newstory->storyid() . "'>" . _AM_DELETE . "</a></td></tr>\n";
        }
        echo '</table></div>';
        echo "<div align='right'>" . $pagenav->renderNav() . '</div><br />';
        echo '<br /></div><br />';
    }
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:41,代码来源:index.php

示例3: b_news_topics_moderate

function b_news_topics_moderate()
{
    include_once XOOPS_ROOT_PATH . "/modules/news/class/class.newsstory.php";
    include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
    $block = array();
    $dateformat = getmoduleoption('dateformat');
    $infotips = getmoduleoption('infotips');
    $storyarray = NewsStory::getAllSubmitted(0, true, getmoduleoption('restrictindex'));
    if (count($storyarray) > 0) {
        $block['lang_story_title'] = _MB_TITLE;
        $block['lang_story_date'] = _MB_POSTED;
        $block['lang_story_author'] = _MB_POSTER;
        $block['lang_story_action'] = _MB_ACTION;
        $block['lang_story_topic'] = _MB_TOPIC;
        $myts =& MyTextSanitizer::getInstance();
        foreach ($storyarray as $newstory) {
            $title = $newstory->title();
            $htmltitle = '';
            if ($infotips > 0) {
                $story['infotips'] = xoops_substr(strip_tags($newstory->hometext()), 0, $infotips);
                $htmltitle = ' title="' . $story['infotips'] . '"';
            }
            if (!isset($title) || $title == "") {
                $linktitle = "<a href='" . XOOPS_URL . "/modules/news/index.php?op=edit&amp;storyid=" . $newstory->storyid() . "' target='_blank'" . $htmltitle . ">" . _AD_NOSUBJECT . "</a>";
            } else {
                $linktitle = "<a href='" . XOOPS_URL . "/modules/news/submit.php?op=edit&amp;storyid=" . $newstory->storyid() . "' target='_blank'" . $htmltitle . ">" . $title . "</a>";
            }
            $story = array();
            $story['title'] = $linktitle;
            $story['date'] = formatTimestamp($newstory->created(), $dateformat);
            $story['author'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $newstory->uid() . "'>" . $newstory->uname() . "</a>";
            $story['action'] = "<a href='" . XOOPS_URL . "/modules/news/admin/index.php?op=delete&amp;storyid=" . $newstory->storyid() . "'>" . _MB_DELETE . "</a>";
            $story['topic_title'] = $newstory->topic_title();
            $story['topic_color'] = '#' . $myts->displayTarea($newstory->topic_color);
            $block['stories'][] =& $story;
            unset($story);
        }
    }
    return $block;
}
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:40,代码来源:news_moderate.php

示例4: newSubmissions

function newSubmissions()
{
    global $xoopsConfig, $xoopsDB;
    $storyarray = NewsStory::getAllSubmitted();
    if (count($storyarray) > 0) {
        echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
        echo "<div style='text-align: center;'><b>" . _AM_NEWSUB . "</b><br /><table width='100%' border='1'><tr class='bg2'><td align='center'>" . _AM_TITLE . "</td><td align='center'>" . _AM_POSTED . "</td><td align='center'>" . _AM_POSTER . "</td><td align='center'>" . _AM_ACTION . "</td></tr>\n";
        foreach ($storyarray as $newstory) {
            echo "<tr><td>\n";
            $title = $newstory->title();
            if (!isset($title) || $title == "") {
                echo "<a href='index.php?op=edit&amp;storyid=" . $newstory->storyid() . "'>" . _AD_NOSUBJECT . "</a>\n";
            } else {
                echo "&nbsp;<a href='index.php?op=edit&amp;storyid=" . $newstory->storyid() . "'>" . $title . "</a>\n";
            }
            echo "</td><td align='center' class='nw'>" . formatTimestamp($newstory->created()) . "</td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $newstory->uid() . "'>" . $newstory->uname() . "</a></td><td align='right'><a href='index.php?op=delete&amp;storyid=" . $newstory->storyid() . "'>" . _AM_DELETE . "</a></td></tr>\n";
        }
        echo "</table></div>\n";
        echo "</td></tr></table>";
        echo "<br />";
    }
}
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:22,代码来源:index.php


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