{"id":6602,"date":"2009-09-02T17:28:39","date_gmt":"2009-09-02T17:28:39","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/churro\/"},"modified":"2012-08-02T23:03:00","modified_gmt":"2012-08-02T23:03:00","slug":"churro","status":"closed","type":"plugin","link":"https:\/\/sv.wordpress.org\/plugins\/churro\/","author":4178674,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.421","stable_tag":"trunk","tested":"3.0.5","requires":"2.8.0","requires_php":"","requires_plugins":"","header_name":"Wordpress Churro","header_author":"Eric Eaglstun","header_description":"","assets_banners_color":"","last_updated":"2012-08-02 23:03:00","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.heifer.org\/","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/churro\/","header_author_uri":"http:\/\/ericeaglstun.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2625,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566907","resolution":"1","location":"plugin"}},"screenshots":{"1":"Churros are delicious <code>\/trunk\/screenshot-1.png<\/code>"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3002,7338],"plugin_category":[],"plugin_contributors":[91207],"plugin_business_model":[],"class_list":["post-6602","plugin","type-plugin","status-closed","hentry","plugin_tags-framework","plugin_tags-mvc","plugin_contributors-postpostmodern","plugin_committers-bsratspekdotorg","plugin_committers-postpostmodern"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/churro.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/churro\/trunk\/screenshot-1.png?rev=1566907","caption":"Churros are delicious <code>\/trunk\/screenshot-1.png<\/code>"}],"raw_content":"<!--section=description-->\n<p>Churro is a plugin that allows developers to easily create pages and functionality, in a style similar to CodeIgniter.  By itself, Churro will not add any functionality to your Wordpress site.<\/p>\n\n<p>Tested with Wordpress and Wordpress MU 2.8.0 ~ 3.0.5 \nRequires PHP 5.  PHP 4 is like 10 years old, you know?<\/p>\n\n<h3>Churro Basics<\/h3>\n\n<p>= URLs = \nChurro requires friendly urls rather than query strings.  Your url will usually be mapped as following: <code>yoursite.com\/class\/method\/variables<\/code><\/p>\n\n<h4>Controllers<\/h4>\n\n<p>The controller will be directly mapped to a file and class with the same name.  For example,\n        yoursite.com\/contact\nwill look for a file named contact.php in the \/churro\/ directory.  This file should have a class contact that extends Churro.  Without a defined method, it will default to index.  All methods accessible through URLs will have 'Action' appended to it.  The following code will provide scaffolding for <code>yoursite.com\/contact<\/code> and <code>yoursite.com\/contact\/submit<\/code><\/p>\n\n<pre><code>&lt;?php\nclass contact extends Churro {\n    public function indexAction(){\n\n    }\n\n    public function submitAction(){\n\n    }\n}\n<\/code><\/pre>\n\n<h4>Models<\/h4>\n\n<p>Churro gives you access to several important Wordpress Models through the <code>$this<\/code> keyword.  The <code>$wp<\/code>, <code>$wpdb<\/code>, and <code>$wp_query<\/code> classes, as well as <code>$blog_id<\/code> in MU are all availble without using the global keyword, eg <code>$this-&gt;wpdb<\/code>.<\/p>\n\n<h4>Views<\/h4>\n\n<p>Your views belong in your normal theme directory.  If you are using multiple themes, you can override the direcotry using <code>$this-&gt;Theme( 'directory-name' )<\/code> any place in the controller.  To specify a view to use, <code>$this-&gt;View( 'file-name' )<\/code>.  Seperating logic from  views is the most important thing to remember in Churro.  To set varaibles in your view, use <code>$this-&gt;vars-&gt;var_name<\/code> in the controller, and <code>$var_name<\/code> in your view.<\/p>\n\n<h4>Ajax \/ Javascript<\/h4>\n\n<p>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.  Churro defines a constant <code>ISAJAX<\/code> on each request.  With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.<\/p>\n\n<h3>Learning Churro<\/h3>\n\n<p>There is much more functionality in Churro than outlined here.  As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.  Stay tuned to <a href=\"http:\/\/labs.findsubstance.com\/\" title=\"The passionate voice for interactive brand strategy and creative experiences\">Substance Labs<\/a> for tutorials.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Place entire \/churro\/ directory to the \/wp-content\/plugins\/ directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Write some code<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>This doesn't do anything!<\/dt>\n<dd><p>Churro does not add any functionality to Wordpress by itself.  Instead, it allows developers a structure to integrate well organized, easily maintainable, object oriented MVC code into their applications.<\/p><\/dd>\n<dt>Why did you create Churro?<\/dt>\n<dd><p>Churro was originally developed as a stand-alone framework, sort of a hobby project after I had learned Zend framework and wanted to use the same concepts in my own projects, with simpler syntax and lighter footprint.  After Churro reached a fairly stable state, I realized it's similarities to CodeIgniter.  After wrestling with Wordpress, I decided to refactor the Churro code as a plugin, to allow easy, rapid development.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3<\/h4>\n\n<ul>\n<li>Fairly major refactoring of code, moved virtually all functions into class methods.<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Cleaning things up, more testing. No new functionality.<\/li>\n<\/ul>\n\n<h4>0.14<\/h4>\n\n<ul>\n<li>Experimental support for HTML Tidy.<\/li>\n<\/ul>\n\n<h4>0.13<\/h4>\n\n<ul>\n<li>Minor bug fix in jquery queue in admin.<\/li>\n<\/ul>\n\n<h4>0.12<\/h4>\n\n<ul>\n<li>Bug fixes, slightly more documentation.<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial public release. No documentation.<\/li>\n<\/ul>","raw_excerpt":"Sweet and simple MVC for Wordpress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/6602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=6602"}],"author":[{"embeddable":true,"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/postpostmodern"}],"wp:attachment":[{"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=6602"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=6602"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=6602"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=6602"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=6602"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=6602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}