Exemple #1
0
/**
* Returns SQL & Language texts to moderation.php
*
* @return   mixed   Plugin object or void if not allowed
*
*/
function plugin_itemlist_story()
{
    global $_TABLES, $LANG29;
    if (plugin_ismoderator_story()) {
        $plugin = new Plugin();
        $plugin->submissionlabel = $LANG29[35];
        $plugin->submissionhelpfile = 'ccstorysubmission.html';
        $plugin->getsubmissionssql = "SELECT sid AS id,title,UNIX_TIMESTAMP(date) AS day,tid,uid" . " FROM {$_TABLES['storysubmission']}" . COM_getTopicSQL('WHERE') . " ORDER BY date ASC";
        $plugin->addSubmissionHeading($LANG29[10]);
        $plugin->addSubmissionHeading($LANG29[14]);
        $plugin->addSubmissionHeading($LANG29[15]);
        $plugin->addSubmissionHeading($LANG29[46]);
        return $plugin;
    }
}
Exemple #2
0
/**
 * Returns SQL & Language texts to moderation.php
 *
 * @return   mixed   Plugin object or void if not allowed
 */
function plugin_itemlist_story()
{
    global $_TABLES, $LANG29;
    if (plugin_ismoderator_story()) {
        $plugin = new Plugin();
        $plugin->submissionlabel = $LANG29[35];
        $plugin->submissionhelpfile = 'ccstorysubmission.html';
        $plugin->getsubmissionssql = "SELECT sid AS id,title,uid,date,ta.tid FROM {$_TABLES['storysubmission']}, {$_TABLES['topic_assignments']} ta WHERE ta.type = 'article' AND ta.id = sid AND ta.tdefault = 1 " . COM_getTopicSQL('AND') . " ORDER BY date ASC";
        $plugin->addSubmissionHeading($LANG29[10]);
        $plugin->addSubmissionHeading($LANG29[37]);
        $plugin->addSubmissionHeading($LANG29[14]);
        $plugin->addSubmissionHeading($LANG29[15]);
        return $plugin;
    }
}
Exemple #3
0
/**
* Generates a series of moderation list for the various object types
*
* This is the primary function called for the Submissions panel
*
*/
function MODERATE_submissions()
{
    global $_CONF, $LANG01, $LANG29, $LANG_ADMIN, $_IMAGE_TYPE;
    $retval = COM_startBlock($LANG01[10], '', COM_getBlockTemplate('_admin_block', 'header'));
    $menu_arr = array(array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']));
    $retval .= ADMIN_createMenu($menu_arr, $LANG29['info'], $_CONF['layout_url'] . '/images/icons/moderation.' . $_IMAGE_TYPE);
    $token = SEC_createToken();
    // user submissions
    $retval .= MODERATE_ismoderator_user() && MODERATE_submissioncount_user() > 0 && $_CONF['usersubmission'] == 1 ? MODERATE_itemList('user', $token) : '';
    // draft story submissions
    $retval .= plugin_ismoderator_story() && MODERATE_submissioncount_draftstory() > 0 && $_CONF['listdraftstories'] == 1 ? MODERATE_itemList('draftstory', $token) : '';
    // story & plugin submissions
    $retval .= PLG_showModerationList($token);
    // if empty at this point, we have no submissions to moderate
    $retval .= empty($retval) ? '<br /><p>' . $LANG29[39] . '</p>' : '';
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}