MyBB Community Forums

Full Version: what happened to my forum? get a giant block of code when i try to access it
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when i try to access my forum, i just get a page with this giant block of code

// Get the announcements if the forum is not a category. if($forum['type'] == 'f') { $sql = build_parent_list($forum['fid'], "fid", "OR", $forum['parentlist']); $time = TIME_NOW; $query = $db->simple_select("announcements", "*", "startdate < '{$time}' AND (enddate > '{$time}' OR enddate=0) AND ({$sql} OR fid='-1')"); if($db->num_rows($query) > 0) { echo "
\n"; echo "
{$lang->forumbit_announcements}

"; echo "
\n"; while($announcement = $db->fetch_array($query)) { echo "
".htmlspecialchars_uni($announcement['subject'])."
"; } echo "
\n
\n"; } } // Get the stickies if the forum is not a category. if($forum['type'] == 'f') { $options = array( 'order_by' => 'sticky, lastpost', 'order_dir' => 'desc', 'limit_start' => $start, 'limit' => $perpage ); $query = $db->simple_select("threads", "*", "fid='{$id}' AND visible='1' AND sticky='1' AND closed NOT LIKE 'moved|%'", $options); if($db->num_rows($query) > 0) { echo "
\n"; echo "
{$lang->forumbit_stickies}

"; echo "
\n"; while($sticky = $db->fetch_array($query)) { $sticky['subject'] = htmlspecialchars_uni($parser->parse_badwords($sticky['subject'])); if($sticky['replies'] != 1) { $lang_reply_text = $lang->archive_replies; } else { $lang_reply_text = $lang->archive_reply; } $plugins->run_hooks("archive_forum_thread"); echo "
{$sticky['subject']}"; echo " ({$sticky['replies']} {$lang_reply_text})
"; } echo "
\n
\n"; } } // Get the threads if the forum is not a category. if($forum['type'] == 'f') { $options = array( 'order_by' => 'sticky, lastpost', 'order_dir' => 'desc', 'limit_start' => $start, 'limit' => $perpage ); $query = $db->simple_select("threads", "*", "fid='{$id}' AND visible='1' AND sticky='0' AND closed NOT LIKE 'moved|%'", $options); if($db->num_rows($query) > 0) { echo "
\n"; echo "
{$lang->forumbit_threads}

"; echo "
\n"; while($thread = $db->fetch_array($query)) { $thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject'])); if($thread['replies'] != 1) { $lang_reply_text = $lang->archive_replies; } else { $lang_reply_text = $lang->archive_reply; } $plugins->run_hooks("archive_forum_thread"); echo "
{$thread['subject']}"; echo " ({$thread['replies']} {$lang_reply_text})
"; } echo "
\n
\n"; } } echo "\n"; archive_multipage($threadcount, $perpage, $page, "{$base_url}forum-$id"); $plugins->run_hooks("archive_forum_end"); archive_footer(); break; // Display the board home. case "index": // Build our forum listing $forums = build_archive_forumbits(0); archive_header("", $mybb->settings['bbname_orig'], $mybb->settings['bburl']."/index.php"); $plugins->run_hooks("archive_index_start"); echo "
\n
{$mybb->settings['bbname']}
\n
\n
\n"; echo $forums; echo "\n
\n
\n
"; $plugins->run_hooks("archive_index_end"); archive_footer(); break; default: header("HTTP/1.0 404 Not Found"); echo $lang->archive_not_found; } $plugins->run_hooks("archive_end"); /** * Gets a list of forums and possibly subforums. * * @param int The parent forum to get the childforums for. * @return array Array of information regarding the child forums of this parent forum */ function build_archive_forumbits($pid=0) { global $db, $forumpermissions, $mybb, $lang, $archiveurl, $base_url; // Sort out the forum cache first. static $fcache; if(!is_array($fcache)) { // Fetch forums $query = $db->simple_select("forums", "*", "active!=0 AND password=''", array('order_by' =>'pid, disporder')); while($forum = $db->fetch_array($query)) { $fcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum; } $forumpermissions = forum_permissions(); } // Start the process. if(is_array($fcache[$pid])) { foreach($fcache[$pid] as $key => $main) { foreach($main as $key => $forum) { $perms = $forumpermissions[$forum['fid']]; if(($perms['canview'] == 1 || $mybb->settings['hideprivateforums'] == 0) && $forum['active'] != 0) { if($forum['linkto']) { $forums .= "
{$forum['name']}"; } elseif($forum['type'] == "c") { $forums .= "
{$forum['name']}"; } else { $forums .= "
{$forum['name']}"; } if($fcache[$forum['fid']]) { $forums .= "\n
\n"; $forums .= build_archive_forumbits($forum['fid']); $forums .= "
\n"; } $forums .= "
\n"; } } } } return $forums; } ?>ast_post

any idea whats going on here?
did you rename index.php to index.html??
nope..
Can we have a link please?
That's the archive index page, upload a new copy of ./archive/index.php from a fresh download.
i just upgraded my forum to 1.6 and it pretty much fixed it