Page 1 of 1

Main home page not loading

Posted: March 26th, 2020, 11:23 am
by Mercury
As of lately, I noticed the main home page for http://www.happierabroad.com is not fully loading. Only the content on the sides shows up, but the stuff in the middle of the page is not showing.

Re: Main home page not loading.

Posted: March 27th, 2020, 3:49 pm
by Winston
That's weird. I wonder why that is. I'll check.

Re: Main home page not loading

Posted: March 31st, 2020, 11:06 am
by Winston
Ok I fixed the home page. You guys can check it now. Apparently, something in the html code of the "Latest Forum Topics" box was interferring with something, which caused half the page not to show. I don't know what the problem with the html was, but I had to remove that box in order to get the home page to show again.

If any of you know html, here is the code below, if you want to help me figure out what the problem with it was. It worked before, so I don't know why it would suddenly not work anymore. Also, the code still works on the Latest 100 Topics, but not the home page. If any of you can figure out why, let me know. Here is the code for those of you who know html.

Code: Select all

<?php
    // How Many Topics you want to display?
    $topicnumber = 8;
    // Change this to your phpBB path
    $urlPath = "/forum";

    // Database Configuration (Where your phpBB config.php file is located)
    include 'forum/config.php';

    $table_topics = $table_prefix. "topics";
    $table_forums = $table_prefix. "forums";
    $table_posts = $table_prefix. "posts";
    $table_users = $table_prefix. "users";
    $link = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
    mysql_select_db("$dbname") or die("Could not select database");

    $query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
    FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
    WHERE t.topic_id = p.topic_id AND
    f.forum_id = t.forum_id AND
    t.forum_id != 4 AND
    t.topic_status <> 2 AND
    p.post_id = t.topic_last_post_id AND
    p.poster_id = u.user_id
    ORDER BY p.post_id DESC LIMIT $topicnumber";
    $result = mysql_query($query) or die("Query failed");

    print "<table cellpadding='2' cellSpacing='1' width='240'>";
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {

    echo  "<tr valign='top'><td><font face=\"Arial\" size=\"2\"><font color=\"#FFCC00\"><a href=\"$urlPath/viewtopic.php?f=$row[forum_id]&t=$row[topic_id]&p=$row[post_id]#p$row[post_id]\">" .
    $row["topic_title"] .
    "</a></font></td></tr></font>";
    }
    print "</table>";
    mysql_free_result($result);
    mysql_close($link);
    ?>