netstep Posted July 6, 2007 Posted July 6, 2007 Posted for comments, suggestions and ideas for a possible contribution. Goal: Automatically keep all osC based sites current with all edits and tweaks. Concept: Deploy one stable core site to the server use page includes to link all osC based sites on the server to the core pages. When I update the core, all sites using the linked core files would be updated. Benefits: Save time: streamline site maintenance by eliminating the need to update every osC site one at a time. Save server space (my osC system has grown to 40+MB x 10-20 sites...sucks up a lot of space). Accelerate new site deployment > Quickly copy link files to new dir, set configs and I'm set. So far: Since I'm apparently a novice at both Linux & PHP I just figured out that include/require using the full file system path appears to work exactly the same as a linux system link. The main difference is I can see the php pages with include commands in my web site editor so it's easier to see what is real and what is link. The file system would appear to be exactly the same as the site core, but all of the standard system files would only have <?php require('/home/user/my-dev-site/public_html/stable-core-site/FILENAME.php'); ?> OR whatever your file system path is. This gives me an environment for testing and another for production. If I am fortunate enough to build 50-100 osC sites I could keep them all current with just a few clicks....in theory. :thumbsup: Am I on the right track? What do you think? Sam M. - Seattle
Guest Posted July 6, 2007 Posted July 6, 2007 IMO (just my 2 cents) in theory it sounds good. But you say If I am fortunate enough to build 50-100 osC sites which sounds like you want to build them for other people and not for your own use. Every site you build for a customer will have different functionality, needs, objectives, design, etc. No two people are alike and no two stores are alike so I think you will find problems there. You could use your core files and call them from each shop such as you suggested <?php require('/home/user/my-dev-site/public_html/stable-core-site/FILENAME.php'); ?> Then just add any additional code to the pages for each individual shop but getting the pages to display correctly might be a problem. I am thinking of things like payment processors and such where 1 store uses paypal and another authorize.net or something but that might be handled by the db and a few files. I answered a post earlier (check my posts a few previous to this one) about inserting an HTML page into index.php to display on the main page of a site. Something like that might be able to be modified to call your stable-core-site to get the code for index.php and then call the sites individual html page to display the information. Another post I was working on earlier was one about Adding pages to a subdirectory (tips and tricks section). You might need that one to be able to call pages from another site as files such as application_top.php would not be accessible via standard osC as it would relate to a file in each site that was not there since it would be in your stable-core-site. If your require code above does not work find that thread it might have something there. Just thinking off the top of my head here, just saw the post and thought it was an interesting concept.
netstep Posted July 7, 2007 Author Posted July 7, 2007 Thank you for you input and ideas. I'll give some thought to how this could affect the variations required by each site. I have taken a slightly different approach to osC dev then most I think. I've built up a system with dozens of contributions and tweaks, then I turn off the unneeded features using configuration variables. osC on steroids... So all of my sites use the same core files and respond as needed on each site. Everything that makes a site unique including product images, content, config variables and design are contained in one directory so I can easily build on the core without affecting what makes each site unique. I have been working toward a business model whereby I can deploy a site with all the functionality in a few hours then invest time into customizing the design and helping my clients get up and running. Some of it was cooked up before I knew any better, but most conforms to standard osC architecture. Sam M. - Seattle
hanguk.openandout.com Posted July 8, 2007 Posted July 8, 2007 just remember OSC is pretty smartly set up as it is. if you want to expand it, expand it, but it's best to keep the overall structure. i changed some key concepts but now am backtracking and it is going more towards their style of things. that's why people like this software, and if you destroy that basic, fundamental, easy workability you will only be making more work for yourself. yes, i know this from experience ~~~~ in any case, good luck. It's nice to have a recursively substituting ability for the source files. I use this stuff http://www.sirfsup.com/unix/unix_editors/sed/application1 use those 2 files there i got stuck today, on trying to do a multi-line sed/awk replacement and had to do it by hand. I had that working at one point, darn it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.