Wiki

Sorted by viewsX
Displaying 521-530 of 782 result(s).

Getting nulls from database instead of empty strings

Created 5 years ago by samdarkTips2 comments – viewed 11,609 times – ( +13 ) – version 1.1
To get null from database instead of empty strings you need to set up your DB connection as follows:
tags: database, null

Yii code completion and calltips in Komodo Edit

Created 5 years ago by viterTips1 comment – viewed 11,598 times – ( +6 ) – version 1.1
My favourite editor is Komodo Edit (free and crossplatform) and I use it for my everyday coding work. Just recently I found out how to make it help me to work with Yii. :) So follow these steps:
tags: Komodo Edit

Installare Yii 2.0.* usando XAMPP su Windows in versione portabile

Created 2 years ago by realteboTutorials0 comments – viewed 11,577 times – ( +2 ) – version 2.0
Una delle soluzioni che preferisco per studiare un framework PHP è avere a disposizione un webserver portabile, ovvero che non richiede una vera e propria installazione. Questo mi permette spesso di lavorare direttamente su una chiavetta USB, potendo passare da un computer ad un altro di casa, o al lavoro, o dai clienti per le demo, senza alcun problema, avendo sempre con me l'ambiente server completo: server web, server MySQL, interprete php.

How to customize error handling in console-mode applications

Created 5 years ago by Steve FriedlHow-tos1 comment – viewed 11,569 times – ( +3 ) – version 1.1
One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor them.

PHP built-in server integration

Created about a year ago by HeadshakerHow-tos1 comment – viewed 11,564 times – version 2.0
I was playing around with another PHP framework which I didn't really liked anyway but it had simple and nice integration for PHP built in web server so I decided to write one for Yii (since this is my primary PHP framework)

An important tip when you are using CArrayDataProvider.

Created 4 years ago by sirin kTips0 comments – viewed 11,560 times – ( +8 / -1 ) – version 1.1
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “yourmodel.id is not defined”.

Yet another implementation of CPhpAuthManager.

Created 3 years ago by seenivasanHow-tos3 comments – viewed 11,540 times – ( +8 / -1 ) – version 1.1
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at main application level to controller level. This way we have pulverised auth data for entire site into smaller units. Finally we are going to look at couple of examples.

Update specific cgridview html row after AJAX request

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 11,524 times – ( +2 ) – version 1.1
After of model update (successfull or not) throught CGridView (check the below link) you probably need to updates the specific row html in cgridview (not entire cgridview)

CGridView customized CCheckBoxColumn

Created 2 years ago by chandranTips2 comments – viewed 11,486 times – ( +5 ) – version 1.1
Hi friends,

Rendering a view file in a console application

Created 5 years ago by TompiHow-tos1 comment – viewed 11,479 times – ( +4 / -2 ) – version 1.1
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.