Results 1 to 8 of 8

Thread: Directory structure for multi-lingual php,css,js,ajax site.

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Resolved Directory structure for multi-lingual php,css,js,ajax site.

    I'll be rebuilding my new company's html/flash website, using php, mysql, css, javascript&ajax and reusing a lot of the flash (for now). Also the site will be multi-lingual (english & chinese)

    So right now I am planning a directory structure. Normally this become messed up (I come from asp.net, but same problem appies) after a couple of months if you dont have a clear "plan"

    I got a www folder, in which I create a subfolder for the new website. This is because I might add more sites over the future, and I can have subfolders in www with functionality (like sending an email) in there that can be shared by all sites.

    I dont want to create two versions of the site (one for each language) but rather go with translated constants and chinese in the datbase. However I had SEO indexiing problems before, so i will have 2 homepages (one per language) and the rest of the site work with a single version of each page, getting text values from language files (normal text) and database (database objects like say "provinces")

    I pretty much came up with the basic idea i got in the attached file....

    Was wondering if you guys would mind poking holes in my idea.. :-)
    Attached Files Attached Files
    Last edited by StrangerInBeijing; Nov 12th, 2007 at 03:23 AM.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Directory structure for multi-lingual php,css,js,ajax site.

    The WEB_SITE_PRIVATE and include directories should go above the web server root. Any file only used by scripts should be out of site of the public - especially those containing usernames and passwords.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Directory structure for multi-lingual php,css,js,ajax site.

    Thanks for the reply..

    On the server itself, the www folder is the root.

    by my ip address / dns will point to subfolders inside the www folder.

    does i still need to take the "private" and "include" out of www, or just out of the folder the ip address / dns will point to?

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Directory structure for multi-lingual php,css,js,ajax site.

    As long as the www folder is not accessible by apache it is OK
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Directory structure for multi-lingual php,css,js,ajax site.

    OH....got to move it then. It's in apache's root directory.
    Thanks...

    But otherwise the overall idea is OK right?

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Directory structure for multi-lingual php,css,js,ajax site.

    The structure looks logical. I would move the include directories right out of the structure though.

    Code:
    --- Include
           |----------- Main
           |------------Sites
               |--------- Site 1
               | ---------Site 2
    --- www
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Directory structure for multi-lingual php,css,js,ajax site.

    As for the language implementation - I don't know. I have never implemented such a feature.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  8. #8

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Directory structure for multi-lingual php,css,js,ajax site.

    the language thing is working sweet....

    made an english and chinese homepage, which links to each other.
    this way i should be able to avoid the problem or crawlers only indexing english.
    for any other page, only one version, which loads it's text from included "contants" files, some places database.

    For once I think I did a good job with that!

Posting Permissions

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



Click Here to Expand Forum to Full Width