<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://deltanine.net/mw/index.php?action=history&amp;feed=atom&amp;title=Contractor_Financials_Development</id>
	<title>Contractor Financials Development - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://deltanine.net/mw/index.php?action=history&amp;feed=atom&amp;title=Contractor_Financials_Development"/>
	<link rel="alternate" type="text/html" href="https://deltanine.net/mw/index.php?title=Contractor_Financials_Development&amp;action=history"/>
	<updated>2026-04-27T18:02:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>https://deltanine.net/mw/index.php?title=Contractor_Financials_Development&amp;diff=315&amp;oldid=prev</id>
		<title>Chris: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://deltanine.net/mw/index.php?title=Contractor_Financials_Development&amp;diff=315&amp;oldid=prev"/>
		<updated>2013-07-25T08:08:05Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:08, 25 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Chris</name></author>
		
	</entry>
	<entry>
		<id>https://deltanine.net/mw/index.php?title=Contractor_Financials_Development&amp;diff=314&amp;oldid=prev</id>
		<title>60.234.148.95: /* Install Yii */</title>
		<link rel="alternate" type="text/html" href="https://deltanine.net/mw/index.php?title=Contractor_Financials_Development&amp;diff=314&amp;oldid=prev"/>
		<updated>2010-07-17T22:02:56Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Install Yii&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Preliminaries==&lt;br /&gt;
Apache must have rewrite enabled to allow for tidy URLs: [[Enable_Apache_Rewrite_via_htaccess#2nd_Method]]&lt;br /&gt;
&lt;br /&gt;
==Install Yii==&lt;br /&gt;
Now we can get the latest version of the Yii Framework. For development I'm installing it to ~/Network/Apps/WebDev&lt;br /&gt;
Next what we will do is create a soft link called &amp;quot;current&amp;quot; to that release folder that way if we change the Yii Framework version, we can do so just updating the sym link&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /home/nitrous/orac/software/WebDev/yii-1.x.xxxx yii&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Yii Skeleton===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /var/www/cf&lt;br /&gt;
cd /var/www/cf&lt;br /&gt;
../yii/framework/yiic webapp /var/www/cf &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Edit /var/www/cf/protected/config/main.php where it says // uncomment the following to use a MySQL database&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
''db'=&amp;gt;array(&lt;br /&gt;
			'connectionString' =&amp;gt; 'mysql:host=localhost;dbname=cf',&lt;br /&gt;
			'emulatePrepare' =&amp;gt; true,&lt;br /&gt;
			'username' =&amp;gt; 'root',&lt;br /&gt;
			'password' =&amp;gt; '********',&lt;br /&gt;
			'charset' =&amp;gt; 'utf8',&lt;br /&gt;
		),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Add User Management Module&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd protected&lt;br /&gt;
mkdir modules&lt;br /&gt;
cd modules&lt;br /&gt;
wget http://www.yiiframework.com/extension/yii-user-management/files/User_Management_Module_0.5.tar.bz2&lt;br /&gt;
tar xvf User_Management_Module_0.5.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Follow instructions in protected/modules/user/docs/InstallTutorial.txt&lt;br /&gt;
*Enable tidy URLSs: edit /protected/config.main.php and look for &amp;quot;// uncomment the following to enable URLs in path-format&amp;quot; and uncomment it.&lt;br /&gt;
*To enable Gii add the following to protected/config/main.php&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
'modules' =&amp;gt; array(&lt;br /&gt;
...&lt;br /&gt;
                               'gii'=&amp;gt;array(&lt;br /&gt;
					'class'=&amp;gt;'system.gii.GiiModule',&lt;br /&gt;
					'password'=&amp;gt;'pick up a password here',&lt;br /&gt;
				)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database==&lt;br /&gt;
*Create cf database&lt;br /&gt;
**address&lt;br /&gt;
**business&lt;br /&gt;
**cashbook&lt;br /&gt;
**sales_tax_rate&lt;br /&gt;
**sales_tax_type&lt;br /&gt;
**to_from&lt;br /&gt;
**transaction_category&lt;br /&gt;
**transaction_reference&lt;br /&gt;
&lt;br /&gt;
===Points to Note===&lt;br /&gt;
#Yii is case sensitive, so start tables with lower-case and create model in Yii with a lowercase too (from skelton returning lowercase table names)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Create Modules===&lt;br /&gt;
*http://localhost/cf/index.php/gii&lt;br /&gt;
*Create module eg business&lt;br /&gt;
*Create model for module eg:&lt;br /&gt;
**table name: business&lt;br /&gt;
**model class: Business&lt;br /&gt;
**model path: business.models&lt;br /&gt;
*Create CRUD for module eg:&lt;br /&gt;
**Model class: business.models.Business&lt;br /&gt;
**Controller ID: business/Business&lt;br /&gt;
*Add business module, edit /protected/config/main.php and add business under modules&lt;br /&gt;
&lt;br /&gt;
===Edit Models===&lt;br /&gt;
====public function relations()====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public function relations()&lt;br /&gt;
	{&lt;br /&gt;
		return array(&lt;br /&gt;
				'created_by'=&amp;gt;array(self::BELONGS_TO, 'User', 'created_by_ID'),&lt;br /&gt;
        		'modified_by'=&amp;gt;array(self::BELONGS_TO, 'User', 'modified_by_ID'),&lt;br /&gt;
        		'sales_tax_type'=&amp;gt;array(self::BELONGS_TO, 'Sales_tax_types', 'sales_tax_type_ID'),&lt;br /&gt;
            	&lt;br /&gt;
		);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====public function rules()====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public function rules()&lt;br /&gt;
	{&lt;br /&gt;
		return array(&lt;br /&gt;
        array('tax_code', 'required'),&lt;br /&gt;
        array('tax_code', 'length', 'max'=&amp;gt;64),&lt;br /&gt;
        array('tax_description', 'required'),&lt;br /&gt;
        array('tax_description', 'length', 'max'=&amp;gt;256),&lt;br /&gt;
        );&lt;br /&gt;
       &lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====public function safeAttributes()====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public function safeAttributes()&lt;br /&gt;
{&lt;br /&gt;
    return array('title', 'content', 'status', 'tags');&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RBAC Authorization===&lt;br /&gt;
RBAC table scheme it can be found at /framework/web/auth/schema.sql&lt;br /&gt;
&lt;br /&gt;
Add this to config/main.php&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
'authManager'=&amp;gt;array(&lt;br /&gt;
            'class'=&amp;gt;'CDbAuthManager',&lt;br /&gt;
            'connectionID'=&amp;gt;'db',&lt;br /&gt;
        ),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>60.234.148.95</name></author>
		
	</entry>
</feed>