Results 1 to 10 of 63

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Sidebox Anywhere mod - Please Help

    Quote Originally Posted by DrByte View Post
    VERY IMPORTANT NOTE: your parenthetical last-minute comment about using iframes is VERY important when coupled with your suggestion of embedding yet another DOCTYPE and opening <HTML> tag on the page. In fact, INSIDE A FRAME is the ONLY time you should do that.
    So, if you're not using frames (and they're generally not something one would use, for a myriad of reasons), then YOU SHOULD NOT use the added HTML suggested above.
    Thanks DrByte.. My apologies.. I should have been MUCH clearer in my post (it was a copy and paste from another forum where the context of my writing would have been clearer -- I should have cleaned it up a bit more before posting it here raw/uncut)..

    Yes, the reason I had to do this at all was because the sidebox is being called from inside an iframe. This all started because I was trying to get the sideboxes to look like the rest of the site and the store. Initially based on the an older post in this thread I added the following to the very bottom of the single_sidebox.php file (*after* the closing ?> line).

    Code:
    <style type="text/css"> @import  "/includes/templates/MY_TEMPLATE/css/stylesheet.css";  </style>
    You may have to even make that an entire URL:
    Code:
    <style type="text/css"> @import  "http://yourdomain.com/includes/templates/MY_TEMPLATE/css/stylesheet.css";  </style>
    But that didn't work.. So based on a suggestion from someone who had helped someone else to get an iframed external sidebox to work, I added this to the top of the single_sidebox.php file (*before* the opening <php line).

    Code:
     <head>
    <link rel="stylesheet" type="text/css" href="http://yourdomain.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" />
    <title></title>
    </head>
    That worked, but I was concerned that the sidebox "pages" wouldn't validate. So I went to http://validator.w3.org/ to validate the sidebox page, and used the "HTML-Tidy" tool to get the "clean" HTML I previously posted.

    To further clarify my previous statements, I'm truly not advocating the use (or rather overuse) of iframes at all for all the reasons most often cited (accessibility, page loading times, SEO, etc). However, for this particular site, the use of an iframe was the ONLY way I could get the externally called sideboxes to show/behave.

    In this case I believe this limited use of an iframe will probably be okay.. I am using a notice of external content for screenreaders to resolve any accessibility issues, there are no serious SEO concerns from displaying 1 or 2 sideboxes, and I do not plan to load more than two iframed sideboxes to ensure that I don't create any performance issues.

    All this to say that I'm still testing this implementation and as of this writing I am cautiously optimistic that they will not be problematic down the road. I will of course update my findings if this turns out to NOT be the case..

    Again, my apologies for not being clearer in my earlier post.. Dr Byte is absolutely correct. The information I shared yesterday is only to be used if the sideboxes are called from inside an iframe..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Sidebox Anywhere mod - Please Help

    and she's back..

    DOH!

    The fact that the iframe worked when my include statement didn't should have given me a HINT on how to get this to work WITHOUT using an iframe..

    My original include statement looked like this:
    Code:
    <?php
    include '/home2/mysite/public_html/shop/zencart-sidebox-categories.php';
    ?>
    I changed my include statement to the following:
    Code:
    <?php
    include 'http://shop.mysite.com/zencart-sidebox-categories.php';
    ?>
    and BAM!!! It worked!!! No need for an iframe at all..

    I kept the link to my sidebox stylesheet in my single_sidebox.php file.. However now that I am not using an iframe to call my sideboxes, can anyone (DrByte??) confirm if I need to include any HTML other than the CSS link to my sidebox stylesheet in my single_sidebox.php file?? In other words will I have validation/other issues if the only thing I add to my single_sidebox.php file is this:
    Code:
    <head>
    <link rel="stylesheet" type="text/css" href="http://shop.mysite.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" />
    </head>
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Sidebox Anywhere mod - Please Help

    It's dangerous to have your server set up in a way that allows external includes like that. Very dangerous.

    http://phpsec.org/projects/phpsecinf...l_include.html
    http://www.php.net/manual/en/filesys...ow-url-include
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Sidebox Anywhere mod - Please Help

    Quote Originally Posted by DrByte View Post
    It's dangerous to have your server set up in a way that allows external includes like that. Very dangerous.

    http://phpsec.org/projects/phpsecinf...l_include.html
    http://www.php.net/manual/en/filesys...ow-url-include
    The host is Bluehost and the problem is that I can't get the Sideboxes Anywhere code to run any other way on this site unless I use an iframe. Is there another suggestion for making this work??
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Sidebox Anywhere mod - Please Help

    Note that I had to add one more line to the code I added to my single_sidebox.php file as follows:
    Code:
    <head>
    <base href="http://shop.mysite.com/" />
    <link rel="stylesheet" type="text/css" href="http://shop.mysite.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" />
    </head>
    My images from my new products sidebox weren't displaying.. So to fix that, I added the base link so that the images in my new products sidebox display correctly.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. SideBox Anywhere Help
    By Ampboy in forum Addon Sideboxes
    Replies: 4
    Last Post: 5 Sep 2011, 07:28 PM
  2. not getting anywhere PLEASE HELP! ! !
    By mindapolis in forum General Questions
    Replies: 9
    Last Post: 14 Dec 2010, 06:34 PM
  3. More than One Sidebox Anywhere Mod
    By HDuane in forum All Other Contributions/Addons
    Replies: 12
    Last Post: 10 Jan 2010, 12:41 AM
  4. Error when calling Sidebox Anywhere Mod
    By Jerry5763837 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 12 Dec 2009, 03:51 AM
  5. Please anybody please help with Scrolling Sidebox Mod. in IE8
    By hcd888 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 2 Oct 2009, 03:42 AM

Posting Permissions

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