SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    My website is having a bad day

    The background image pulls up, but not the sidenav on the left or the main content area on the right. I'm pretty sure this broke when I was changing stuff in siteHeader.php But I went through the page with a fine toothed comb, so at this point I'm not sure if its a php issue or CSS issue.

    Any ideas on how to narrow this one down?

    Thanks!

    http://www.e-downline.net/
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    seeing code would help find the problem.
    When viewing your source code, the bottom half/60%, 70% whatever, is missing

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,614
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    It's not really clear what the question is. All I see is a big background image, no navs or content areas. What do you mean by "pulls up"?

  4. #4
    SitePoint Wizard wonshikee's Avatar
    Join Date
    Jan 2007
    Posts
    1,223
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Try fixing these invalid comments. I'm seeing JS error when I visit that page, likely caused by these.

    http://www.wonshik.com/files/c0rzbcqlie52tp.png

  5. #5
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    wonshikee, I fixed the invalid comments and the page is still not rending as it should. I checked it in IE 8 and also saw the javascript error. This is for a file I have never modified, as I bought these template from themeForest.com

    Any other ideas on why the sidenav and the main content areas are not even pulling up? I'm guessing this is not a PHP error, otherwise the page wouldn't even render the background image.

    Thoughts?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  6. #6
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The problem is the way the JavaScript is written, in your script.js file you have A LOT of document ready statements which is redundant but that's not the issue. The issue is that your also loading the prototype library into the page, but because your loading everything within your <head></head> tags the jQuery declaration aka the dollar sign $ is been overwritten by the prototype library. The easiest way to get around this is to simply remove the prototype library itself otherwise change all instances of your jQuery dollar reference to the word jQuery.

    See the below example of the line causing the JavaScript error:

    Code JavaScript:
    if ($('.tweet_list').length>0){

    The above line should be changed to:
    Code JavaScript:
    if (jQuery('.tweet_list').length > 0){

    Once you fix this error we will be able to help more as currently we cannot see the site at all, we can only see your background.
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle

  7. #7
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ok, I removed the prototype library line and yet the page still does not pull up. Thank you for being patient, as I know PHP, but not javaScript. Would it help if I posted the whole siteHeader.php file? I know something in this file is the culprit, because no other page on my website works either, as they all reference this one file.

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  8. #8
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    From the look of things now that the page doesn't error out you have a PHP syntax error, if you could please post your PHP code so we can investigate it further.
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle

  9. #9
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you Chris for you help in this!! Here is my siteHeader.php file:


    <?php

    include 'startSession.php';


    $urlParts = explode('.', $_SERVER['HTTP_HOST']);
    $subDomain = $urlParts[0];

    $_SESSION['subDomain'] = $subDomain;


    // Get variables from URL

    $x = $_REQUEST['x'];
    $guide = $_REQUEST['guide'];
    $source = $_REQUEST['source'];
    $fbID = $_REQUEST['fb_ref'];


    // Store the Facebook referring ID if one exists

    if (isset($fbID)) {

    $_SESSION['fbID'] = $fbID;
    }



    // Grab variables out of the session

    $uID = $_SESSION['uID'];
    $subscription = $_SESSION['subscription'];
    $personalPosts = $_SESSION['personalPosts'];
    $memberType = $_SESSION['memberType'];
    $tempLoginID = $_SESSION['tempLoginID']; // So register won't show to newly registered people

    $guideID = $_SESSION['guideID'];
    $guideCompany = $_SESSION['guideCompany'];
    $guideURL = $_SESSION['guideURL'];
    $guideFirstName = $_SESSION['guideFirstName'];
    $guideLastName = $_SESSION['guideLastName'];
    $guidePhone = $_SESSION['guidePhone'];
    $guideEmail = $_SESSION['guideEmail'];
    $guideReferral = $_SESSION['guideReferral'];
    $guideSubscription = $_SESSION['guideSubscription'];




    // Do we show them advertising?

    if (!$memberType && $guideSubscription != "Gold") {

    $showAds = "Yes";
    }

    if (!$guideID && !$subscription) {

    $showAds = "Yes";
    }

    if ($uID && ($subscription == "Free" || !$subscription) ) {

    $showAds = "Yes";
    }





    // Count the number of testimonials and users

    if (!isset($totalPosts)) {
    $countTestimonials = "select count(*) as total from testimonies";
    $result = mysql_query($countTestimonials) or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    $totalPosts = $row['total'];
    $totalPosts = number_format($totalPosts);
    $_SESSION['totalPosts'] = $totalPosts;
    }


    if (!isset($totalUsers)) {
    $countUsers = "select count(*) as total from users";
    $result = mysql_query($countUsers) or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    $totalUsers = $row['total'];
    $totalUsers = number_format($totalUsers);
    $_SESSION['totalUsers'] = $totalUsers;
    }




    // How did they find the website?

    $referURL = $_SERVER['HTTP_REFERER'];

    if ($referURL) {

    if (!isset($_SESSION['referrer'])) {

    $_SESSION['referrer'] = $referURL;
    }
    }



    if ($guideReferral == "Invite Referral") {

    $_SESSION['referrer'] = "Invite Referral";
    }

    if ($guideReferral == "Testimonial Referral") {

    $_SESSION['referrer'] = "Testimonial Referral";
    }




    // Lookup guide if sponsor is used in the URL

    if (isset($sponsor)) {

    $locateID = "SELECT uID from users where uID = $guide limit 1";
    $result = mysql_query($locateID) or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    $uID = $row['uID'];
    $_SESSION['guideID'] = $uID;
    }



    // Lookup guide if source is used in the URL

    if (isset($source)) {
    $locateID = "SELECT uID from users where uID = $source limit 1";
    $result = mysql_query($locateID) or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    $uID = $row['uID'];
    $_SESSION['guideID'] = $uID;
    }





    // Lookup the guide if an x or fb_ref is in the URL. Don't user their uID anymore, just YL number

    if (isset($x)) {

    $lookupGuide = "SELECT uID, companyName, companyURL, firstname, lastname, email, phone, membernumber, subscription from users where membernumber = '$x' limit 1";
    }

    if (isset($fbID)) {

    $lookupGuide = "SELECT uID, companyName, companyURL, firstname, lastname, email, phone, membernumber, subscription from users where membernumber = '$fbID' limit 1";
    }


    if (isset($x) || (isset($fbID))) {

    $result = mysql_query($lookupGuide) OR die(mysql_error());

    if ($row = mysql_fetch_array($result)) {

    do {

    $_SESSION['guideID'] = $row['uID'];
    $_SESSION['guideFirstName'] = $row["firstname"];
    $_SESSION['guideLastName'] = $row["lastname"];
    $_SESSION['guideEmail'] = $row["email"];
    $_SESSION['guidePhone'] = $row["phone"];
    $_SESSION['guideCompanyName'] = $row["companyName"];
    $_SESSION['guideCompanyURL'] = $row["companyURL"];
    $_SESSION['guideMemberNumber'] = $row["membernumber"];
    $_SESSION['guideSubscription'] = $row["subscription"];

    } while($row = mysql_fetch_array($result));

    } // end if results

    } // end if (isset($x) || (isset($fbID)))





    // Start the html for the page

    print ("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>\n");
    print ("<html xmlns='http://www.w3.org/1999/xhtml' lang='en-us'> \n\n");

    print ("<head> \n\n");



    print ("<title>");


    if ($title) {

    $title = htmlentities($title, ENT_QUOTES);
    print ("$title");
    }

    else {

    print ("Essential Oils &amp; Aromatherapy Testimonials");
    }

    print ("</title> \n\n");


    print ("<meta http-equiv='classification' content='Essential Oils' /> \n");
    print ("<meta http-equiv='content-type' content='text/html;charset=UTF-8' /> \n");
    print ("<meta name='keywords' content='essential oils, aromatherapy testimonials, essential oil' /> \n");
    print ("<meta name='google-site-verification' content='x-Z0TUunm2aSgxhwwyLgnWVCgoyhSGITjfF-V5z6M_k' /> \n");


    if ($metaDescription) {

    $metaDescription = htmlentities($metaDescription, ENT_QUOTES);

    print ("<meta name='description' content='$metaDescription' /> \n");
    }

    else {

    $metaDescription = "Essential oils contain healing properties. Come read how others are using them on a daily basis to achieve health and well being. Share what you know, and learn what you don't.";

    $metaDescription = htmlentities($metaDescription, ENT_QUOTES);

    print ("<meta name='description' content='$metaDescription' /> \n");
    }



    // Tags for Facebook when a testimonial is being viewed

    if ($testimonyFirstName) {

    print ("<meta property='og:title' content='$title' /> \n");
    print ("<meta property='og:author' content='$testimonialFirstName $testimonialLastName' /> \n");
    print ("<meta property='og:type' content='article' /> \n");
    print ("<meta property='og:url' content='$canonical' /> \n");
    print ("<meta property='og:image' content='http://www.oil-testimonials.com/images/facebook.jpg' /> \n");
    print ("<meta property='og:site_name' content='Oil-Testimonials.com' /> \n");
    print ("<meta property='og:description' content='$metaDescription' /> \n\n");
    }


    if ($mainPage == "Yes") {

    print ("<link rel='canonical' href='http://www.oil-testimonials.com' /> \n");
    }

    ?>

    <link rel='image_src' href='http://www.essentialoilshoppe.com/images/oil%20bottle.jpg' />
    <link rel='stylesheet' id='theme-reset-css' href='css/reset.css' type='text/css' media='all' />
    <link rel='stylesheet' id='theme-style-all-css' href='css/style.css' type='text/css' media='all' />
    <link rel='stylesheet' id='prettyPhoto-css' href='css/prettyPhoto.css' type='text/css' media='screen' />
    <link rel='stylesheet' id='jquery-popeye-style-css' href='css/jquery.popeye.style.css' type='text/css' media='all' />
    <link rel='stylesheet' id='jquery-popeye-css' href='css/jquery.popeye.css' type='text/css' media='all' />
    <link rel='stylesheet' id='jquery-colortip-css' href='css/colortip-1.0-jquery.css' type='text/css' media='all' />
    <link rel='stylesheet' id='nivo-slider-css' href='css/nivo-slider.css' type='text/css' media='all' />


    <!--[if IE 7]>
    <link rel='stylesheet' id='theme-ie7-css' href='css/ie7.css' type='text/css' media='screen' />
    <![endif]-->
    <!--[if lte IE 8]>
    <link rel='stylesheet' id='theme-lte8-css' href='css/ie.css' type='text/css' media='screen' />
    <![endif]-->

    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script>
    <script type='text/javascript' src='js/jquery.easing.1.3.js'></script>
    <script type='text/javascript' src='js/jquery.cycle.all.min.js'></script>
    <script type='text/javascript' src='js/jquery.tools.min.js'></script>
    <script type='text/javascript' src='js/jquery.prettyPhoto.js'></script>
    <script type='text/javascript' src='js/menu_min.js'></script>
    <script type='text/javascript' src='js/colortip-1.0-jquery.js'></script>
    <script type='text/javascript' src='js/jquery.popeye-2.0.4.min.js'></script>
    <script type='text/javascript' src='js/jquery.validate.js'></script>
    <script type='text/javascript' src='js/jquery.form.js'></script>
    <script type='text/javascript' src='js/jquery.tweet.js'></script>
    <script type='text/javascript' src='js/jflickrfeed.min.js'></script>
    <script type='text/javascript' src='js/jquery.nivo.slider.pack.js'></script>
    <script type='text/javascript' src='js/script.js'></script>


    <!--For the lightbbox-->

    <?php
    //<script type='text/javascript' src='javaScripts/prototype.js'></script>
    ?>
    <script type='text/javascript' src='javaScripts/lightbox.js'></script>

    <!--For the row hiliter-->
    <script type='text/javascript' src='javaScripts/rowHighlighter.js'></script>

    </head>


    <!-- google analytics -->
    <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-30483100-1']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>


    <body class="green-skin">


    <!-- container -->
    <div id="container">

    <!-- background holder -->
    <div class="background_pic_border">

    <!-- background image -->
    <div class="background_pic_holder">
    <img src="images/assets/background.jpg" width="100%" alt="lavender fields for essential oils" />
    </div>

    <!-- background curv graphic -->
    <div class="back-curv"></div>
    </div>
    <!-- end div .background image -->


    <!-- wrapper -->
    <div id="wrapper">
    Convert your dollars into silver coins. www.convert2silver.com

  10. #10
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I didn't see a code button to encapsulate my code. I guess sitepoint.com get rid of that.
    Convert your dollars into silver coins. www.convert2silver.com

  11. #11
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Nope the error isn't in there as your page is only loading up until your #wrapper element so the error is occurring somewhere in your body content.

    EDIT: You need to go into the advanced editor to get the code buttons.
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle

  12. #12
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    My index.php is setup like this:

    include siteHeader.php

    include siteNav.php

    html related to this specific page

    include footer.php

    So the reason it is only rendering up to the #wrapper is because that is the very last line of my siteHeader.php. Ugh, what else could it be?
    Convert your dollars into silver coins. www.convert2silver.com

  13. #13
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'm good to go now. There was a small php error in sideNav.php Thanks everyone!
    Convert your dollars into silver coins. www.convert2silver.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •