You are viewing the source of felocity.com. This serves as a portfolio of sorts, as all the code is out in the open to see (except for config files). Browse around, feel free to ask questions. If you see something horrible, glaring, or otherwise a major security problem, please don't hesitate to contact me.

Pages/BlogEntry (xml)

<chip:include file="Pages/Macros/Global"/> <chip:include file="Pages/Widgets/Flickr"/> <chip:include file="Pages/Widgets/Technorati"/> <chip:component type="Components/Blog/PostByStub" as="Post"> <chip:param name="stub" value="stub" source="url"/> </chip:component> <chip:component type="Components/Blog/PostMetadataByStub" as="PostMetadata"> <chip:param name="stub" value="stub" source="url"/> <chip:param name="comment" value="comment" source="request"/> </chip:component> <chip:component type="Components/Blog/CommentsByStub" as="Comments"> <chip:param name="stub" value="stub" source="url"/> </chip:component> <chip:component type="Components/CUDs/PerformCudOperation" as="PostCommentResults"> <chip:param name="trigger" value="doPostComment"/> <chip:param name="cud" value="Components/Blog/CUDs/PostComment"/> </chip:component> <chip:component type="Util/Tools/Nonce" as="Nonce"/> <?php /* Process the header based on the PostCommentResults Section */ ?> <tal:block tal:condition="PostCommentResults/success"> <tal:block tal:define="redirect_url url:blogpost stub=${Post/stub} year=${Post/created/year} month=${Post/created/month} comment=1;;${PostCommentResults/success/is_spam};;${PostCommentResults/success/comment_id}"/> <chip:redirect url="string: ${redirect_url}#comment-${PostCommentResults/success/comment_id}" type="303"/> </tal:block> <tal:block tal:define="enable_primary 1; enable_secondary 1; enable_tertiary 0"/> <html metal:use-macro="html"> <head> <title metal:fill-slot="title">${Post/title} - Felocity.com</title> <tal:block metal:fill-slot="scripts"></tal:block> <tal:block metal:fill-slot="css"></tal:block> </head> <!-- Primary Content --> <tal:block metal:fill-slot="primary content"> <div class="blog_entries"> <div class="entry"> <h1 tal:content="Post/title">Test Title</h1> <div class="meta"> <div class="author" tal:content="Post/author/name">Author</div> <div class="created" tal:content="Post/created/timestamp" chip:filter="Filters/CommonDate">$Post->created</div> </div> <div class="body"> <tal:block chip:filter="Filters/Trim; Filters/Markdown/ToHTML"> <tal:block tal:content="structure Post/body"/> </tal:block> </div> </div> </div> <h2>Comments</h2> <div class="blog_comments" tal:repeat="Comment Comments"> <div class="blog_comment" tal:attributes="class+ EVEN; class+ FIRST; class+ LAST; id string: comment-${Comment/id}"> <div class="meta"> <div class="author" tal:content="Comment/author/name">Author Name</div> <div class="created" tal:content="Comment/created" chip:filter="Filters/CommonDate">1/1/2009</div> </div> <div class="body"> <tal:block chip:filter="Filters/Trim; Filters/Markdown/ToHTML"> <tal:block tal:content="structure Comment/body"/> </tal:block> </div> </div> </div> <p class="info" tal:condition="PostMetadata/hasPostedFlaggedComment" tal:attributes="id string: comment-${PostMetadata/lastCommentId}"> Thank you for your comment submission. Some comments require additional moderation, so your post may not appear immediately. </p> <p class="info" tal:condition="PostMetadata/hasPostedComment and not: PostMetadata/hasPostedFlaggedComment"> Your comment has been posted successfully and should appear above. </p> <p class="info" tal:condition="PostMetadata/hasExpiredCommentWindow"> Comments are no longer being accepted at this time. (Or just weren't turned on to begin with.) </p> <tal:block tal:condition="PostMetadata/hasCommentForm"> <h2>Leave a Comment</h2> <form method="POST" tal:attributes="action url:blogpostPreview stub=${Post/stub} year=${Post/created/year} month=${Post/created/month}" class="comment_form"> <!-- General Error Messaging --> <tal:block tal:condition="PostCommentResults/errors/nonce or PostCommentResults/errors/general"> <span class="error" tal:content="PostCommentResults/errors/nonce | PostCommentResults/errors/general">Generic Error Message</span> </tal:block> <!-- Hidden Vars --> <input type="hidden" name="nonce" tal:attributes="value Nonce"/> <input type="hidden" name="post_id" tal:attributes="value Post/id"/> <div class="form_row first alt"> <tal:block tal:condition="PostCommentResults/errors/name"> <span class="error" tal:content="PostCommentResults/errors/name">Name Error Message</span> </tal:block> <label for="name">Name:</label> <input id="name" class="text" type="text" name="name" tal:attributes="value PostCommentResults/fields/name | string:"/> </div> <div class="form_row"> <tal:block tal:condition="PostCommentResults/errors/email"> <span class="error" tal:content="PostCommentResults/errors/email">Email Error Message</span> </tal:block> <label for="email">Email:</label> <input id="email" class="text" type="text" name="email" tal:attributes="value PostCommentResults/fields/email | string:"/> </div> <div class="form_row alt"> <tal:block tal:condition="PostCommentResults/errors/url"> <span class="error" tal:content="PostCommentResults/errors/url">Url Error Message</span> </tal:block> <label for="url">Url:</label> <input id="url" class="text" type="text" name="url" tal:attributes="value PostCommentResults/fields/url | string:"/> </div> <div class="form_row no_help"> <tal:block tal:condition="PostCommentResults/errors/comment"> <span class="error" tal:content="PostCommentResults/errors/comment">Comment Error Message</span> </tal:block> <label for="comment">Comment:</label> <textarea id="comment" class="textarea" name="comment" tal:content="PostCommentResults/fields/comment | string:"></textarea> </div> <p class="instructions"> Some HTML is okay, but if you're not feeling adventurous, I'd strongly encourage using <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>. To make talking about code easier, wrap your PHP/JS/Ruby/SQL/Anything in <code>&lt;code lang="LANGUAGE"&gt;...&lt;/code&gt;</code> and it will get marked up and syntax highlighted in the proper language. It'll even handle escaping your &lt;'s for you. </p> <input type="submit" name="doPostComment" value="Submit"/> </form> </tal:block> </tal:block> <!-- Secondary Content --> <tal:block metal:fill-slot="secondary content"> <h2>Illustrated</h2> <tal:block tal:define="local size 10; local tags string: felocity:post=${Post/id}; local img_sizes string: ['m','s','s','s','s','s','s','s','s','s']"> <tal:block metal:use-macro="flickr widget"/> </tal:block> <p class="flickr_badge_explanation"> You can add your own images to this post by tagging a photo on <a href="http://www.flickr.com"><span class="flickr_blue">Flick</span><span class="flickr_pink">r</span></a> with the special tag <span class="copyable" felocity-widget="FELOCITY.widgets.copypasta">felocity:post=${Post/id}</span>. </p> <h2>Talked About</h2> <tal:block tal:define="local size 2; local url url: blogpost stub=${Post/stub} year=${Post/created/year} month=${Post/created/month}"> <tal:block metal:use-macro="technorati widget"/> </tal:block> <p class="technorati_link_explanation"> Blog reactions are provided by <a href="http://www.technorati.com">Technorati</a>, all you need to do is have your site indexed. They'll do the rest. </p> </tal:block> </html>

Files Pages/BlogEntry Links To: