Exemple #1
0
 public function eventRmcommonGetFeedsList($feeds)
 {
     load_mod_locale('bxpress');
     include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxfunctions.class.php';
     include_once XOOPS_ROOT_PATH . '/modules/bxpress/class/bxforum.class.php';
     $module = RMModules::load_module('bxpress');
     $config = RMSettings::module_settings('bxpress');
     $url = XOOPS_URL . '/' . ($config->urlmode ? $config->htbase : 'modules/bxpress') . '/';
     $bxFunc = new bXFunctions();
     $data = array('title' => $module->name(), 'url' => $url, 'module' => 'bxpress');
     $options[] = array('title' => __('All Recent Messages', 'bxpress'), 'params' => 'show=all', 'description' => __('Show all recent messages', 'bxpress'));
     $forums = $bxFunc->forumList('', false);
     $table = '<table cellpadding="2" cellspacing="2" width="100%"><tr class="even">';
     $count = 0;
     foreach ($forums as $forum) {
         if ($count >= 3) {
             $count = 0;
             $table .= '</tr><tr class="' . tpl_cycle("odd,even") . '">';
         }
         $table .= '<td width="33%"><a href="' . XOOPS_URL . '/backend.php?action=showfeed&amp;mod=bxpress&amp;show=forum&amp;forum=' . $forum['id'] . '">' . $forum['title'] . '</a></td>';
         $count++;
     }
     $table .= '</tr></table>';
     $options[] = array('title' => __('Posts by forum', 'bxpress'), 'description' => __('Select a forum to see the messages posted recently.', 'bxpress') . ' <a href="javascript:;" onclick="$(\'#bxforums-feed\').slideToggle(\'slow\');">Show Forums</a>
                         <div id="bxforums-feed" style="padding: 10px; display: none;">' . $table . '</div>');
     unset($forums);
     $feed = array('data' => $data, 'options' => $options);
     $feeds[] = $feed;
     return $feeds;
 }
Exemple #2
0
$tpl->assign('lang_edittext', __('Edit Text', 'bxpress'));
$tpl->assign('lang_goto', __('Change Forum:', 'bxpress'));
$tpl->assign('lang_go', __('Go!', 'bxpress'));
//$tpl->assign('url',XOOPS_URL."/modules/bxpress/report.php");
$tpl->assign('lang_topicclosed', __('Locked Topic', 'bxpress'));
$tpl->assign('lang_inreply', __('In reply to %s.', 'bxpress'));
$tpl->assign('lang_postnum', __('post #%u', 'bxpress'));
$tpl->assign('lang_user', __('User', 'bxpress'));
$tpl->assign('lang_admin', __('Admin', 'bxpress'));
$tpl->assign('lang_moderator', __('Mod', 'bxpress'));
$tpl->assign('lang_anonymous', __('Anonymous', 'bxpress'));
$tpl->assign('lang_likedby', __('Liked by', 'bxpress'));
$tpl->assign('lang_likedmore', __('and %u more.', 'bxpress'));
// Security token
$tpl->assign('bxpress_token', $xoopsSecurity->createToken(0, 'BXTOKEN'));
bXFunctions::forumList();
if ($xoopsUser) {
    if ($forum->isModerator($xoopsUser->uid()) || $xoopsUser->isAdmin()) {
        $tpl->assign('lang_move', __('Move Topic', 'bxpress'));
        if ($topic->status()) {
            $tpl->assign('lang_open', __('Unlock Topic', 'bxpress'));
        } else {
            $tpl->assign('lang_close', __('Lock Topic', 'bxpress'));
        }
        if ($topic->sticky()) {
            $tpl->assign('lang_unsticky', __('Unsticky Topic', 'bxpress'));
        } else {
            $tpl->assign('lang_sticky', __('Sticky Topic', 'bxpress'));
        }
        $tpl->assign('lang_app', __('Approve', 'bxpress'));
        $tpl->assign('lang_noapp', __('Unnaprove', 'bxpress'));