Announcement

Collapse
No announcement yet.

SSI and images

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SSI and images

    hi ... i'm new to using SSI's to call external documents in to a .shtml file. i've been having good luck with simple lines of code such as
    <!--#include virtual="/personal/filename15.html" -->
    until today. i sliced up an image in Photoshop Image Ready ad did a "save optimized" ... an html doc is created and the images/slices are saved in an images folder. when i open this document in a HTML editor it appears with no problems (rollovers work and all graphics appear). when i call this file with an include line in another document (saved as .shtml) the framework of my images appear, but with broken gifs. am i missing a step here?

    thanks!

  • #2
    Depending where the images are relative to the SSI file you may need to change the URL to the images in the SSI file, eg, ../images/ instead of images/

    Bob

    Comment


    • #3
      New file name

      thanks ... after trying and re-trying many different things (including using the entire file path) discovered that the SSI will only work IF the images and slices are in the same folder as the included file AND the file that is calling the included file. this isn't ideal ... and certainly doesn't make any sense (i don't want to have a flat directory and file structure), but it's working for now i suppose. thanks again!

      Comment


      • #4
        That does not sound correct at all.

        My site is 85% .shtml and 15% .php. All 'include' .html files are in the domain.com/includes directory. They serve all the .shtml files that are in the ~100 different directory levels of the site. All graphics in the 'include' files are in the domain.com/graphics directory. If an 'include' file serves more than one level of directory then the graphic URL is absolute not relative.

        All works well. Is your server correctly set up for SSI?

        Bob

        Comment


        • #5
          SSI and the server

          thank you bob ... you're being more than helpful offering me feedback!

          i'm now using godaddy for webhosting and they say they support SSIs, but can't offer me any details or guidance. the SSIs are working on a simple page so i assume that the problem is on my end. i'm forced to use frontpage right now (fireworks and my other editor is messed up) so maybe it's a front page issue.

          sample include for the heading of the page:

          <!--#include virtual="/personal/turano/ssi/KT_head_2.html" -->for this to work and all image slices to appear i have to have all images and slices in the SSI folder w/ the KT_head_2.html file. i've tried changing the paths of the images in the KT_head_2.html file, but doesn't seem to work. maybe i'm missing one ... i'll keep trying, b/c it sounds like that's the way it should be working!

          thanks again ... this is the first time i'm trying to use SSIs so it's a many hour learning process.

          Comment


          • #6
            A common mistake is the content of the SSI html file. It must not contain tags such as <head> <body> etc. The file should only contain the code that goes where you put the <!--#include virtual="/includes/footer.html" -->

            In my example, the file footer.html contains only this html code:

            <p style="font-family: Verdana; font-size: 8pt; color: #6B6B6B"><a href="http://www.volvoclub.org.uk/index.php"><font color="#6B6B6B">HomePage</font></a>
            | <a href="http://www.volvoclub.org.uk/disclaimer.htm" target="_blank"><font color="#6B6B6B">Disclaimer</font></a> | <a href="http://www.volvoclub.org.uk/contact.shtml"><font color="#6B6B6B">Contact</font></a><br /><br />
            Volvo Owners Club Limited 2006</p><br />


            Bob

            Comment


            • #7
              oh ... that's it.

              thanks ... that must be my problem. i knew it was best to remove all extra code from the SSI file (the file that's being included) b/c it garbles the page source, but i didn't realize it was "required" to remove all of that stuff. i don't think i can remove that stuff from my page though b/c it's a header graphic that was sliced up in image ready to create preloaded images and the rollover images / slices ... i don't think that page would work without all of the preload script and mouseover STUFF ...

              <A HREF="http://www.sophatography.com/personal/turano/ssi/KT_home.shtml"
              ONMOUSEOVER="changeImages('KT_Head_2_07', 'KT_Head_2_07-over.gif', 'KT_Head_2_08', 'KT_Head_2_08.gif', 'KT_Head_2_09', 'KT_Head_2_09.gif', 'KT_Head_2_10', 'KT_Head_2_10.gif', 'KT_Head_2_11', 'KT_Head_2_11.gif', 'KT_Head_2_12', 'KT_Head_2_12.gif'); return true;"
              ONMOUSEOUT="changeImages('KT_Head_2_07', 'KT_Head_2_07.gif'); return true;">
              <IMG NAME="KT_Head_2_07" SRC="KT_Head_2_07.gif" WIDTH=67 HEIGHT=32 BORDER=0></A></TD>
              s

              Comment


              • #8
                Are you saying you are using the 'include' file in the <head> or first <body> tags like:

                <head><!--#include virtual="/includes/footer.html" --></head>

                or

                <body <!--#include virtual="/includes/footer.html" -->>

                Bob

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X