<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6870835086413719132</id><updated>2024-09-01T23:27:42.563-07:00</updated><category term="pyrocms"/><category term="CI"/><title type='text'>Codeigniter &amp;amp; Pyrocms</title><subtitle type='html'>Codeigniter / Pyrocms and PHP specific blogging.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cipyrocms.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://cipyrocms.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>First Mauritius Podcast</name><uri>http://www.blogger.com/profile/14322042234123200134</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6870835086413719132.post-1087223595749491250</id><published>2010-04-22T10:19:00.000-07:00</published><updated>2010-04-22T11:02:06.896-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyrocms"/><title type='text'>Create an Adsense widget in 5 minutes</title><content type='html'>&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;So now that we have seen some basic text output with Pyrocms Widgets, now we are going to explore user input/output with our second Widget. What Pyrocms lacks is a good Ad-sense widget, so that we can make some money out of our blog. So without wasting anymore time, we are going to create one.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;If you are not interested with the inner workings, then you can proceed to &amp;nbsp;&lt;a href=&quot;http://blog.kjots.com/temporary/pyrocms/adsense.zip&quot;&gt;download the widget&lt;/a&gt;.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;Before we start coding let us plan how our widget will work. After installing our widget, the user will be presented with a text area where he will input his adsense script. When he will click save, that adsense script will be stored within Pyrocms and output whenever requested.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;So to begin, inside our Widget folder, we create a folder and call it &lt;span style=&quot;color: #38761d;&quot;&gt;adsense&lt;/span&gt;. Inside &lt;span style=&quot;color: #38761d;&quot;&gt;adsense&lt;/span&gt;, we create &lt;span style=&quot;color: #38761d;&quot;&gt;adsense.php&lt;/span&gt; file. Here is the content of our &lt;span style=&quot;color: #38761d;&quot;&gt;adsense.php&lt;/span&gt; file:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;----------CODE STARTS HERE----------&amp;gt;&lt;/span&gt;&lt;/div&gt;&amp;nbsp; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;public &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;$fields &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;= array(&lt;br /&gt;
&amp;nbsp; &amp;nbsp;array(&lt;br /&gt;
&amp;nbsp;  &#39; field&#39;   =&amp;gt; &#39;js&#39;,&lt;br /&gt;
&amp;nbsp;  &#39; label&#39;   =&amp;gt; &#39;Adsense&#39;,&lt;br /&gt;
&amp;nbsp;  &#39; rules&#39;   =&amp;gt; &#39;required&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;)&lt;br /&gt;
&amp;nbsp;);&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;----------CODE ENDS HERE----------&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;Note that we have omitted the widget &lt;span style=&quot;color: #0b5394;&quot;&gt;$title, $description,  $author, $website&lt;/span&gt; and &lt;span style=&quot;color: #0b5394;&quot;&gt;$version&lt;/span&gt; variables to make the code look more redeable. If you want to take a look at them, look at my previous blog on &lt;a href=&quot;http://cipyrocms.blogspot.com/2010/04/pyrocms-create-widget-in-5-minutes.html&quot;&gt;how to create a widget in 5minutes&lt;/a&gt;.  So in the above, we are setting the necessary validation checks on  our Form. When the user is presented with the text area, if nothing is input, a message will appear, telling the user that the field js with label “Adsense” is required.  &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;Notice that we are introduced to the &lt;span style=&quot;color: #0b5394;&quot;&gt;$fields&lt;/span&gt; api for the first time here. Basically, &lt;span style=&quot;color: #0b5394;&quot;&gt;$fields&lt;/span&gt; just tell Pyrocms the number of fields the widget will present to the user and if any form of validation must be performed on them. &lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;Second, we need to process the input of the user:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;----------CODE STARTS HERE----------&amp;gt;&lt;/span&gt;&lt;/div&gt;&amp;nbsp; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;public function &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;($options)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if(empty($options[&#39;js&#39;]))&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;  &amp;nbsp; &amp;nbsp;return array(&#39;output&#39; =&amp;gt; &#39;&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
//store the adsense js script&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;return array&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;(&#39;output&#39; =&amp;gt; &quot;&lt;script type=&quot;text/javascript&quot;&gt;
&quot; . $options[&#39;js&#39;] . &quot;
&lt;/script&gt;&lt;script src=&quot;\&amp;quot;http://pagead2.googlesyndication.com/pagead/show_ads.js\&amp;quot;&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&quot;);&lt;br /&gt;
}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;----------CODE ENDS HERE----------&amp;gt;&lt;/span&gt;&lt;/div&gt;&amp;nbsp; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;Next, we are introduced to the &lt;span style=&quot;color: #0b5394;&quot;&gt;run()&lt;/span&gt; function. We will see this function many times during our development. Basically, the &lt;span style=&quot;color: #0b5394;&quot;&gt;run()&lt;/span&gt;&amp;nbsp; function will do the core processing of our widget and output any result as necessary. The problem that I had with the adsense widget is that Pyrocms does not allow any &lt;span style=&quot;color: #0b5394;&quot;&gt;script&lt;/span&gt; tags in its code. So after consulting with Philsturgeon, we decided to hard code our script tags inside our &lt;span style=&quot;color: #3d85c6;&quot;&gt;run()&lt;/span&gt; function.  The most important part is the &lt;span style=&quot;color: #0b5394;&quot;&gt;return array&lt;/span&gt; where we are telling Pyrocms to store our adsense script inside its code, here known as output.  &amp;nbsp; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;Next we create our &lt;span style=&quot;color: #38761d;&quot;&gt;views&lt;/span&gt; folder and inside it, we create two new files: &lt;span style=&quot;color: #6aa84f;&quot;&gt;display.php&lt;/span&gt; and &lt;span style=&quot;color: #38761d;&quot;&gt;form.php&lt;/span&gt;. &lt;span style=&quot;color: #38761d;&quot;&gt;Display.php&lt;/span&gt; will only contain &lt;span style=&quot;color: #134f5c;&quot;&gt;&amp;lt; ? ph p echo $output; ?&amp;gt;&lt;/span&gt; , telling Pyrocms to print the data it has stored for us. Inside our form.php, we insert the following code:  &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;----------CODE STARTS HERE----------&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt; ? ph p echo form_textarea(array(&#39;name&#39;=&amp;gt;&#39;js&#39;, &#39;value&#39; =&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;$options[&#39;js&#39;]&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;)); ? &amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;----------CODE ENDS HERE----------&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;This is just the form that the user will be presented with when he has installed our widget. Most of the elements are self descriptive. Notice that I have asked the user to paste only specific parts of their adsense code. Then we see the text area that will take user input and send it to our &lt;span style=&quot;color: #0b5394;&quot;&gt;run&lt;/span&gt; function. Notice here that &lt;span style=&quot;color: #0b5394;&quot;&gt;$options[&#39;js&#39;]&lt;/span&gt; is the field that will store our js code.  &lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;OK two things, most of what you are seeing here is UNDOCUMENTED. There is really no written documentation of how the widgets system works in Pyrocms and no one has been helping me with it. So, I had to break open the other widgets, analyze and make my own conclusions. Even I  do not understand most of these codes. So with these, I encourage you to explore more and discover by yourself.  &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cipyrocms.blogspot.com/feeds/1087223595749491250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/create-adsense-widget-in-5-minutes.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/1087223595749491250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/1087223595749491250'/><link rel='alternate' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/create-adsense-widget-in-5-minutes.html' title='Create an Adsense widget in 5 minutes'/><author><name>First Mauritius Podcast</name><uri>http://www.blogger.com/profile/14322042234123200134</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6870835086413719132.post-592307996500642314</id><published>2010-04-21T10:21:00.000-07:00</published><updated>2010-04-21T11:55:45.790-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyrocms"/><title type='text'>Pyrocms: create a widget in 5 minutes:</title><content type='html'>&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;Today, I am going to show you how to create as simple Lorem Ipsum dummy text widget. This widget, when placed any where, will produce a paragraph of dummy text. This is essential if you are creating lots of pages and want an idea how the text will look in relation to other elements on the page.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;So to get started, download the latest &lt;a href=&quot;http://www.pyrocms.com/&quot;&gt;Pyrocms&lt;/a&gt; package and extract to your http folder. In Pyrocms, all the widgets are stored in the  &lt;span style=&quot;color: #38761d;&quot;&gt;application/widgets&lt;/span&gt; folder. There are many other widgets there  for you to explore.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://blog.kjots.com/temporary/pyrocms/Widgets%20Pages.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;http://blog.kjots.com/temporary/pyrocms/Widgets Pages.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;First we will need to create a folder for our widget. That folder will store all our widget files. Note that the naming of the folder is very important. More on that later, for the moment, we just create a folder and name it&lt;span style=&quot;color: #38761d;&quot;&gt; lorem_ipsum.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;Inside our folder, we fist create our main widget file. We will call it: &lt;span style=&quot;color: #38761d;&quot;&gt;lorem_ipsum.php&lt;/span&gt;. Notice how we are keeping the same naming convention. Our folder, main widget file and later our class name would have the same name. If anytime you receive any kind of error, ensure that these three parts have the same name. Inside our widget we will put the following information:&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;---------FILE STARTS HERE-----------&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;i&gt;class &lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;lorem_ipsum&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;i&gt; extends Widgets&lt;br /&gt;
{&lt;br /&gt;
//The following information will appear when you will install the widget&lt;br /&gt;
public $title = &#39;Lorem ipsum&#39;; &lt;br /&gt;
public $description = &#39;Puts default Lorem ipsum text.&#39;;&lt;br /&gt;
public $author = &#39;Mahen&#39;;&lt;br /&gt;
public $website = &#39;http://cipyrocms.blogspot.com/&#39;;&lt;br /&gt;
public $version = &#39;1.0&#39;;&lt;br /&gt;
}&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;---------FILE ENDS HERE-----------&amp;gt;&lt;/span&gt;&lt;br /&gt;
This is all we need for a basic widget. Notice that no function is defined here, we are just showing some information to the user when he will install the widget.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;Next, we create a folder inside our&lt;span style=&quot;color: #38761d;&quot;&gt; lorem_ipsum&lt;/span&gt; and name it as&lt;span style=&quot;color: #38761d;&quot;&gt; views.&lt;/span&gt; This will contain the main functions that will be outputed to the browser.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;Inside our &lt;span style=&quot;color: #38761d;&quot;&gt;views &lt;/span&gt;folder, create a file called &lt;span style=&quot;color: #38761d;&quot;&gt;display.php&lt;/span&gt; and insert the following information:&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&lt;/span&gt; &lt;br /&gt;
&lt;ol&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt; ? ph p echo “hello world”; ? &amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/ol&gt;where we replace &lt;span style=&quot;color: #38761d;&quot;&gt;hello world&lt;/span&gt; with our default &lt;span style=&quot;color: #38761d;&quot;&gt;lorem ipsum text....&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;We are now technically ready to install our widget. So in Pyrocms&#39;s widget screen, do a refresh and if everything is fine, our &lt;span style=&quot;color: #7f6000;&quot;&gt;Lorem Ipsum widget&lt;/span&gt; will appear under &lt;span style=&quot;color: #7f6000;&quot;&gt;Un-installed&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;&amp;nbsp;Next, we click and install our widget. After install, our widget will receive a unique&lt;span style=&quot;color: #7f6000;&quot;&gt; instance ID&lt;/span&gt;, usually denoted by the # tag. Once installed, we need to tell Pyrocms where to display our widget.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;Under the &lt;span style=&quot;color: #7f6000;&quot;&gt;pages &lt;/span&gt;section, we edit the page under which we want to add our &lt;span style=&quot;color: #38761d;&quot;&gt;Lorem Ipsum&lt;/span&gt; widget, for our example, am going to use our homepage.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0in;&quot;&gt;Finally we add &lt;span style=&quot;color: #0b5394;&quot;&gt;{widget_instance(3)}  &lt;/span&gt;where 3 is the instance ID of our Widget. If everything went on well, our Lorem Ipsum text should appear on the homepage&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;So this is all for Widgets. Note that we have barely scratched the surface here. If you want to develop your own Pyrocms Widgets, I encourage you to explore the other widgets and learn from them. Thats it for today, check often for newer updates.  &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://blog.kjots.com/temporary/pyrocms/Pages%20edit.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;460&quot; src=&quot;http://blog.kjots.com/temporary/pyrocms/Pages edit.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can download my Widget &lt;a href=&quot;http://blog.kjots.com/temporary/pyrocms/lorem_ipsum.zip&quot;&gt;here&lt;/a&gt; and explore it.&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cipyrocms.blogspot.com/feeds/592307996500642314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/pyrocms-create-widget-in-5-minutes.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/592307996500642314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/592307996500642314'/><link rel='alternate' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/pyrocms-create-widget-in-5-minutes.html' title='Pyrocms: create a widget in 5 minutes:'/><author><name>First Mauritius Podcast</name><uri>http://www.blogger.com/profile/14322042234123200134</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6870835086413719132.post-1904764719357385812</id><published>2010-04-20T11:58:00.000-07:00</published><updated>2010-04-21T10:28:46.440-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pyrocms"/><title type='text'>Pyrocms ver. 0.9.8-rc2 now avaliable:</title><content type='html'>&lt;a href=&quot;http://www.pyrocms.com/&quot;&gt;Pyrocms&lt;/a&gt; RC2 Version is now avaliable for download. If you just downloaded the RC1 and you want to upgrade to RC2 then follow these simple steps:&lt;br /&gt;
&lt;br /&gt;
1. Go to docs and read the UPGRADE doc. Basically you just need to update some settings in your databse.&lt;br /&gt;
2. Then go to yoursite.com/upgrade. This will finalize the upgrade script. If everything went on fine, you should receive a message saying: &lt;strong&gt;Upgraded to 0.9.8-rc2&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;3. Now you are successfully upgraded.&lt;br /&gt;
&lt;br /&gt;
This may be the final RC before the final release of Pyrocms.....Wait and see</content><link rel='replies' type='application/atom+xml' href='http://cipyrocms.blogspot.com/feeds/1904764719357385812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/pyrocms-ver-098-rc2-now-avaliable.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/1904764719357385812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/1904764719357385812'/><link rel='alternate' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/pyrocms-ver-098-rc2-now-avaliable.html' title='Pyrocms ver. 0.9.8-rc2 now avaliable:'/><author><name>First Mauritius Podcast</name><uri>http://www.blogger.com/profile/14322042234123200134</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6870835086413719132.post-1375100021785114711</id><published>2010-04-20T03:12:00.001-07:00</published><updated>2010-04-20T03:12:52.426-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CI"/><title type='text'>Codeigniter changes from Model to CI_Model</title><content type='html'>Codeigniter 2.0 is comming up, although we are still months from the final release, the development is still moving full steam ahead. Accordingly, the latest changes to CI 2.0 was the change from extending your class from Model to CI_Model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you download the latest alpha builds from svn servers, you will notice that if you declare your class like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class pagemodel extends Model {}&lt;br /&gt;
&lt;br /&gt;
in CI 2.0, it will generate a Fatal Error, complaining that the Model class has not been defined.  What has happened is that they are changing the naming from Model to CI_Model, so this works perfectly:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class pagemodel extends CI_Model {}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now there  are discussions internally and externally  that if the naming of the Model class is changed, then the naming of the Controller also must be changed to CI_Controller:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&quot;changing the Controller to CI_Controller is one of the things we&#39;re discussing. It&#39;s a bit of find and replace, and an x.0 is the correct time to make those decisions. Honestly, we haven&#39;t fully decided yet; there are pros and cons to each.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apparantly this change has been made so as to provide more consistency in the Library and to free up more Reserved_names:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&quot;brings that library into consistency with every other CodeIgniter class. It keeps the architecture consistent and frees up key words for your use. In fact, Controller is likely to change to CI_Controller as well.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The latest build does seem to take the latest CI_Model changes, but nothing for the CI_Controller. Guess we will just have to wait and see....</content><link rel='replies' type='application/atom+xml' href='http://cipyrocms.blogspot.com/feeds/1375100021785114711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/codeigniter-changes-from-model-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/1375100021785114711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6870835086413719132/posts/default/1375100021785114711'/><link rel='alternate' type='text/html' href='http://cipyrocms.blogspot.com/2010/04/codeigniter-changes-from-model-to.html' title='Codeigniter changes from Model to CI_Model'/><author><name>First Mauritius Podcast</name><uri>http://www.blogger.com/profile/14322042234123200134</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>