Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // If there are no unread threads in this forum and no unread child forums - mark it as read
- require_once MYBB_ROOT."inc/functions_indicators.php";
- $unread_threads = fetch_unread_count($fid);
- if($unread_threads !== false && $unread_threads == 0 && $unread_forums == 0)
- {
- mark_forum_read($fid);
- }
- // Subscription status
- $add_remove_subscription = 'add';
- $add_remove_subscription_text = $lang->subscribe_forum;
- if($mybb->user['uid'])
- {
- $query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));
- if($db->fetch_field($query, 'fid'))
- {
- $add_remove_subscription = 'remove';
- $add_remove_subscription_text = $lang->unsubscribe_forum;
- }
- }
- // Is this a real forum with threads?
- if($foruminfo['type'] != "c")
- {
- if(!$threadcount)
- {
- eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");
- }
- if($foruminfo['password'] != '')
- {
- eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");
- }
- if($load_inline_edit_js == 1)
- {
- eval("\$inline_edit_js = \"".$templates->get("forumdisplay_threadlist_inlineedit_js")."\";");
- }
- $post_code_string = '';
- if($mybb->user['uid'])
- {
- $post_code_string = "&my_post_key=".$mybb->post_code;
- }
- $lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));
- eval("\$rssdiscovery = \"".$templates->get("forumdisplay_rssdiscovery")."\";");
- eval("\$threadslist = \"".$templates->get("forumdisplay_threadlist")."\";");
- }
- else
- {
- $rssdiscovery = '';
- $threadslist = '';
- if(empty($forums))
- {
- error($lang->error_containsnoforums);
- }
- }
- $plugins->run_hooks("forumdisplay_end");
- $foruminfo['name'] = strip_tags($foruminfo['name']);
- eval("\$forums = \"".$templates->get("forumdisplay")."\";");
- output_page($forums);
- ?>
Add Comment
Please, Sign In to add comment