diff --git a/upload/ajax.php b/upload/ajax.php index 463292f5d..753306ffa 100644 --- a/upload/ajax.php +++ b/upload/ajax.php @@ -75,6 +75,7 @@ class ajax_common 'user_register' => array('guest'), 'posts' => array('guest'), 'birthday_list' => array('guest'), + 'get_forum_mods' => array('guest'), ); var $action = null; @@ -410,6 +411,43 @@ class ajax_common $this->response['html'] = $html; $this->response['mode'] = $mode; } + + function get_forum_mods() + { + global $lang, $datastore; + + $forum_id = (int) $this->request['forum_id']; + + $datastore->enqueue(array( + 'moderators', + )); + + $moderators = array(); + $mod = $datastore->get('moderators'); + + if (isset($mod['mod_users'][$forum_id])) + { + foreach ($mod['mod_users'][$forum_id] as $user_id) + { + $moderators[] = ''. $mod['name_users'][$user_id] .''; + } + } + + if (isset($mod['mod_groups'][$forum_id])) + { + foreach ($mod['mod_groups'][$forum_id] as $group_id) + { + $moderators[] = ''. $mod['name_groups'][$group_id] .''; + } + } + + $html = ': '; + $html .= ($moderators) ? join(', ', $moderators) : $lang['NONE']; + + $this->response['html'] = ''.$html.''; + unset($moderators, $mod); + $datastore->rm('moderators'); + } function view_post () { diff --git a/upload/config.php b/upload/config.php index c0f1eda8a..970a118cb 100644 --- a/upload/config.php +++ b/upload/config.php @@ -53,7 +53,7 @@ $bb_cfg = $tr_cfg = $page_cfg = array(); // Increase number of revision after update $bb_cfg['tp_version'] = '2.1 Stable'; -$bb_cfg['tp_release_state'] = 'R271'; +$bb_cfg['tp_release_state'] = 'R272'; $bb_cfg['tp_release_date'] = '30-08-2011'; // Database diff --git a/upload/templates/default/viewforum.tpl b/upload/templates/default/viewforum.tpl index a667db373..c637ebf76 100644 --- a/upload/templates/default/viewforum.tpl +++ b/upload/templates/default/viewforum.tpl @@ -267,9 +267,27 @@ td.topic_id { cursor: pointer; }
{L_MODERATORS}: {MODERATORS}
- + + + +{LOGGED_IN_USER_LIST}
@@ -309,7 +327,6 @@ td.topic_id { cursor: pointer; }{f.FORUM_DESC}
-{L_MODERATORS}: {f.MODERATORS}