When I access my site the page is loading but noting will show until the whole web site is loaded (accept the background image) and just then it will show all at once.
When I access raven for example the header will show first and just then the whole site...
Is this happening due to something is the code? or maybe the theme?
How can I make the site show the loaded parts and not wait for the whole page to be loaded?
/************************************************************/
/* Theme Colors Definition */
/* */
/* Define colors for your web site. $bgcolor2 is generaly */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the */
/* other two bgcolor variables follows the same criteria. */
/* $texcolor1 and 2 are for tables internal texts */
/************************************************************/
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $index, $user, $userinfo, $cookie, $prefix, $user_prefix, $db, $name ,$total_time, $start_time, $dbi, $sitekey;
getusrinfo($user);
cookiedecode($user);
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body style=\"body; margin-left: 10em top: 10em;\" text=\"#000000\">";
if ($banners == 0) {
include("banners.php");
}
/* Start Log-in block top left */
$uresult = $db->sql_query("select user_id from ".$user_prefix."_users where username='$username'");
list($uid) = $db->sql_fetchrow($uresult);
$presult = $db->sql_query("SELECT privmsgs_to_userid FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')");
$pnumrow = $db->sql_numrows($presult);
/* Start Menu Who is online */
cookiedecode($user);
if (isset($_SERVER['REMOTE_ADDR'])) { $ip = $_SERVER['REMOTE_ADDR']; }
if (is_user($user))
{
$uname = $cookie[1];
$guest = 0;
}
else
{
if (!empty($ip)) {
$uname = $ip;
} else {
$uname = '';
}
$guest = 1;
}
$guest_online_sql = 'SELECT * FROM '.$prefix.'_session WHERE guest=1';
$guest_online_query = $db->sql_query($guest_online_sql);
$guest_online_num = $db->sql_numrows($guest_online_query);
$member_online_sql = 'SELECT * FROM '.$prefix.'_session WHERE guest=0';
$member_online_query = $db->sql_query($member_online_sql);
$member_online_num = $db->sql_numrows($member_online_query);
$who_online_num = $guest_online_num + $member_online_num;
/* End Menu Who is online */
/* Start Home Page & Favorite */
$homepage = "<a href=\"#\" onClick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.preflight.us');\"><img src=\"themes/Preflight/images/homepage.gif\" border=\"0\" alt=\"לחץ כאן על מנת להפוך את פריפלייט לעמוד הבית\"></a>";
$favorite = "<a href=\"#\" onclick=\"window.external.addfavorite('http://www.preflight.us/','פריפלייט - אתר הסימולטורים מספר 1 בישראל!');\"><img src=\"themes/Preflight/images/favorite.gif\" border=\"0\" alt=\"לחץ כאן להוסיף את פריפלייט למועדפים\"></a>";
/* End Home Page & Favorite */
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
$tmpl_file = "themes/Preflight/footer.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
echo "<center>\n";
$footer_message = footmsg();
echo "</center>\n";
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
/************************************************************/
/* Function themearticle() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
Posted:
Wed May 07, 2008 5:23 pm
prekill, my apologies... I was taking a look at your site yesterday using the YSlow addin to FF and it kept bombing out FF... I think it might have been an interaction with my Web Developer plugin. I'll send this home to remind me to take a look at this. Sorry about forgetting to come back to this.
I wonder if it's related to RTL. It displays in parts for me, but seems to take a while before finishing - maybe due to extra JS, but definitely because it's having trouble loading offsite stuff (something from blogiy.com.cc )
Your site is doing too many look ups.
It is looking for data for google ads
ads from blogy.co.cc
data from youtube
data from vineo.com
Every time you pull external data there is a risk, if that site is busy, it will cause yours to slow down. Because of the way nuke themes are coded, left blocks are pulled with the header and right blocks are pulled with the footer - so if you are using external data in a block and that data retrieval is slow, it can actually cause the whole site to 'hang'.
You also have a relatively number of images on the front page with file sizes primarily from your Gallery because it is using javascript to pre-fetch the images to avoid delays when they are clicked on.
Your whole front page is around 15Kb in size which, although it could be better, is not the end of the world, so I'm inclined to think it is your external data that is doing the most damage - this is of course with the BIG assuption that your host has not oversold accounts on the server and it is not bogging down because it simply cannot cope with the load.
kguske, I looked into all new JS I add to the site and found out the following which is making the problem:
I lately add a pagination script from codezwiz.com (link:
Only registered users can see links on this board! Get registered or login to the forums!
like montego new pagination in the new RV news module it is using a selectbox (drop down menu with the page numbers) but it seems including its JS file with the onchange="jumpto(this) function slowing the hole page.
I doubled checked this by restoring the original news module.. and the site did loaded normal. I have just posted a messege reporting this at codezwiz.com.
maybe there is a way to bypass including this java scrript file without killing the selectbox.
Guardian2003 I am chaching all my blocks accept of the random image one and last forum posts. I am considering of chaching the news module after fixing this pagination problem.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum