Welcome to TalkGraphics.com
Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 46

Thread: PHP, SHTML, etc

  1. #21
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: PHP, SHTML, etc

    Quote Originally Posted by richinri View Post
    You would have to know the EXACT SIZE of any included page.
    Please read this thread: http://www.talkgraphics.com/showthread.php?t=36869
    John.

  2. #22
    Join Date
    Jul 2006
    Location
    Portland OR, US
    Posts
    23

    Default Re: PHP, SHTML, etc

    First, I have to say that I'm bewildered that this simple feature still is not in Xara. ?!?

    That said, I believe this is a complete list of your options:

    • Export from Xara, rename each .HTM file to .PHP/.SHTML, as needed, & manually upload. There is free software available from sites like download.com that can mass rename files.

    • Upload normally with Xara, and rename on the server. There is free CGI software from sites like superscripts.com that can be installed on your server to mass rename files.

    • Upload with Xara, and tell the server to parse all .htm file types for PHP/SHTML statements. This is done by adding/modifying the .htaccess file on linux servers, although it's turned off or locked in by some hosting outfits. It goes in the area with your .htm files. Dunno if there's an equivalent on MS servers. Here's the code for the .htaccess file.

      RemoveHandler .html .htm
      AddType application/x-httpd-PHP .PHP .htm .html

      For SSI, substitute SHTML for PHP in the above lines. Capitalization must match your file extension.

    • Use iframes in a placeholder instead. (Included only for completeness.) Takes the load off the server, but it bogs down the user’s browser. And if they use an older, or non-MS browser, it may display incorrectly or not at all. Doesn’t work for some forms of dynamic content.

    • Use JavaScript in a placeholder instead. (Included only for completeness.) Takes the load off the server, but it bogs down the user’s browser. And if they use an older browser, or have JavaScript turned off, it may display incorrectly or not at all. Doesn’t work for some forms of dynamic content.


    In general: If you have lots of traffic, and only a few files with PHP/SSI statements in them, having the server parse all of them for PHP/SHTML statements may needlessly bog down your server. That is, you may want to rename selectively. If this is the case, and you do a lot of work on your site using Xara, you might consider setting up a script that renames just the files that actually have PHP/SHTML statements. There are lots of free and commercial scripting programs around, although most of them are elephant guns for this particular rabbit.

  3. #23
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    1,436

    Default Re: PHP, SHTML, etc

    Pulleeeeze can we have set-able suffixes - at least site-wide, and ideally by page. It does not seem to be in XWD7. Pity.
    Simon
    ------------------------------
    www.tlaconsultancy.co.uk
    www.bricksandbrass.co.uk

  4. #24
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: PHP, SHTML, etc

    If you mean file extension then what's the problem? You can specify any file extension for every page (except for the first page obviously).
    John.

  5. #25
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    1,436

    Default Re: PHP, SHTML, etc

    Ahah. I was doing it with a single page site. So if you want to handle PHP on the home page, you need to have index.htm (or index.html) with JavaScript or one of the other forwarding techniques to take the user straight to index.php, and then you can name any other pages contact_us.php, services.php etc.

    Thanks.
    Simon
    ------------------------------
    www.tlaconsultancy.co.uk
    www.bricksandbrass.co.uk

  6. #26
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: PHP, SHTML, etc

    Not at all! Just leave your first page blank and name it "balnk.htm", then name your second page "index.php" and fill it with content. And so on.
    John.

  7. #27
    Join Date
    Dec 2000
    Location
    Hautes Pyrénées, France
    Posts
    5,083

    Default Re: PHP, SHTML, etc

    Quote Originally Posted by covoxer View Post
    Not at all! Just leave your first page blank and name it "balnk.htm", then name your second page "index.php" and fill it with content. And so on.
    An excellent tip and such a simple solution to an aggravating problem! And something I never thought of whilst struggling with the same problem. Many thanks - it pays to think out of the box

    balnk.htm is so difficult to spell, can I change it to blank.htm?
    If someone tried to make me dig my own grave I would say No.
    They're going to kill me anyway and I'd love to die the way I lived:
    Avoiding Manual Labour.

  8. #28
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: PHP, SHTML, etc

    Why doesn't the program just allow renaming the home page to index.php ? It seems strange and inconvenient to me.

  9. #29
    Join Date
    Dec 2000
    Location
    Hautes Pyrénées, France
    Posts
    5,083

    Default Re: PHP, SHTML, etc

    I agree, doesn't make sense tbh. But the workaround is an acceptable solution to me.
    If someone tried to make me dig my own grave I would say No.
    They're going to kill me anyway and I'd love to die the way I lived:
    Avoiding Manual Labour.

  10. #30
    Join Date
    Aug 2007
    Location
    Maghull UK
    Posts
    6,202

    Default Re: PHP, SHTML, etc

    Only thing to watch here is that naming your first page blank.htm (or balnk-htm) means your resources folder is named blank_htm_files ... better to name the first file something meaningfull like site.htm

    "Why doesn't the program just allow renaming the home page to index.php ? It seems strange and inconvenient to me." Because the first page has to be *.htm for the preview to work.
    JOHN -XaReg (FB) XaReg (DB - ignore prompt to register)
    Windows 10 [Anniversary] pro Intel Pentium CPU G630 @ 2.70Ghz RAM: 4 GB; 64-bit x64

 

 

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
  •