2 Replies Latest reply on Mar 12, 2007 6:01 PM by woudesigner

    PHP, contribute and me

    ajime
      I am creating a site which has multiple sections, each of which contained within a subdirectory of the root folder:
      root/section1
      root/section2
      etc.

      Inside these folders, I've nested the files required to operate them
      root/section1/images
      root/section2/images

      Now, the page is built with a combination of templates, so the end-user can moderate the site using Contribute, and PHP.

      Because of the images being dynamic, I need to figure out how to do one of two things.
      1. get dreamweaver to ignore certain graphic links and replicate them as I typed them
      2. have contribute process and display the php, so the images appear when the user is editing the page

      Any suggestions?
        • 1. Re: PHP, contribute and me
          chrisarnini Level 1
          ajime, if you do find one let me know.

          I have a ton of php based variables and arrays on my site and as of yet contribute does not "render them". Dreamweaver on the other hand does have some functions such as live data viewing that may be what you are looking for,
          • 2. Re: PHP, contribute and me
            woudesigner
            We built a work around by hacking one of the translator files and generating a comment that mirrors the translator
            so here is what the top of our page looks like:

            <?php $pageid = 1228; #pageid must come before topinclude this is for dreamweaver and server live views
            require 'include_file_url/goes_here.php';?>
            <!--#wouedit virtual="/include_file_url/goes_here.php?pageid=1228" -->

            The above comment is what Contributes translator reads and then grabs the proper page. Note: it only passes one variable hardcoded on the page(you can have the served .php page process whatever you want or have a set of variables just for the edit mode). There will be matching statements at the end of the content area with the same pageid

            The php is ignored by contribute but the second line goes to the translator file. We generate the new pages in our own app with the page id being set and the head tags and meta content is also filled in. We did have a hard time getting our server, dreamweaver and contributes browser to show css styles and images correctly. We kept the two includes simple so that we could strip or change them as new software or server changes mandate.

            You can view the translator here http://www.wou.edu/~gilberts/patch/ the file was originally called "wou edit.htm" which needs to match comparisons as the script runs. The page will not display properly. You will need to view the code to get a proper look. This is just a modified version of the original "Server Model SSI.htm" included in the install - all due respect to Adobe/Macromedia. We have a huge site with many levels of users with many different needs as well as very specific IT requirements and options.

            Please feel free to contact me if you have any questions. gilberts@wou.edu