Guest User

Untitled

a guest
May 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. // If there are no unread threads in this forum and no unread child forums - mark it as read
  2. require_once MYBB_ROOT."inc/functions_indicators.php";
  3.  
  4. $unread_threads = fetch_unread_count($fid);
  5. if($unread_threads !== false && $unread_threads == 0 && $unread_forums == 0)
  6. {
  7. mark_forum_read($fid);
  8. }
  9.  
  10. // Subscription status
  11. $add_remove_subscription = 'add';
  12. $add_remove_subscription_text = $lang->subscribe_forum;
  13.  
  14. if($mybb->user['uid'])
  15. {
  16. $query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));
  17.  
  18. if($db->fetch_field($query, 'fid'))
  19. {
  20. $add_remove_subscription = 'remove';
  21. $add_remove_subscription_text = $lang->unsubscribe_forum;
  22. }
  23. }
  24.  
  25. // Is this a real forum with threads?
  26. if($foruminfo['type'] != "c")
  27. {
  28. if(!$threadcount)
  29. {
  30. eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");
  31. }
  32.  
  33. if($foruminfo['password'] != '')
  34. {
  35. eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");
  36. }
  37.  
  38. if($load_inline_edit_js == 1)
  39. {
  40. eval("\$inline_edit_js = \"".$templates->get("forumdisplay_threadlist_inlineedit_js")."\";");
  41. }
  42.  
  43. $post_code_string = '';
  44. if($mybb->user['uid'])
  45. {
  46. $post_code_string = "&my_post_key=".$mybb->post_code;
  47. }
  48.  
  49. $lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));
  50. eval("\$rssdiscovery = \"".$templates->get("forumdisplay_rssdiscovery")."\";");
  51. eval("\$threadslist = \"".$templates->get("forumdisplay_threadlist")."\";");
  52. }
  53. else
  54. {
  55. $rssdiscovery = '';
  56. $threadslist = '';
  57.  
  58. if(empty($forums))
  59. {
  60. error($lang->error_containsnoforums);
  61. }
  62. }
  63.  
  64. $plugins->run_hooks("forumdisplay_end");
  65.  
  66. $foruminfo['name'] = strip_tags($foruminfo['name']);
  67.  
  68. eval("\$forums = \"".$templates->get("forumdisplay")."\";");
  69. output_page($forums);
  70. ?>
Add Comment
Please, Sign In to add comment