Friday, December 31, 2010

Smart Sites is Complete

As promised, the main services of Smart Sites are complete for 2011.  Sign up for your own free web site at SmartSites.us to start off the new year with a new web site!

Now for the real entry

The hardest thing with this so far, ridiculously enough, is building the Links editor.  It allows you to enter an unlimited number of links to outside pages on your site, and runs flawlessly, allowing you to view the current items, add items, edit items, and delete items.  The hard part was not so much the client-side operation as trying to find a safe way to post an unspecified number of titles and addresses and save them in HTML format.  Attempting to take an HTML file, load only the Links section, and split the Title from the URL was difficult, but surprisingly putting it back together was near impossible.  I accidentally got my server stuck in several infinite loops attempting to assemble the file from the posted links, once using over 63MB of RAM.  In the end, the way  it worked out was to run a for loop based on the number of items in the posted Title array, then assemble each item from both posted arrays into one line of the HTML, repeat n times, then save it all to the inc file.

Next, I'll be building hundreds of CSS-based themes, adding database and file support, and finishing up the Pro account features.

No comments:

Post a Comment