yii

File upload with Yii's ActiveForm

I am trying to use Yii's ActiveForm to create a basic registration page with an image upload field. However, I am running into problems. I am using the following code to create the form tags: $form=$this->beginWidget('CActiveForm', array('id'=>'activity_form', 'enableAjaxValidation'=>true, 'stateful'=>true, 'enctype'=>'multipart/form-...

Combining a Form and CPagination in Yii

I've set up a page that displays server logs and added a filter form so I can filter the logs on specific actions, dates, etc. I can't seem to figure out how to use CPagination to split the results into pages, however. If I add the CPagination widget, when a page is selected from the widget, the filter form isn't resubmitted and my fil...

What's the point of Yii's AssetManager?

I can't find much information about Yii's AssetManager for the management of JS and CSS files. My question here is what is the point of using the AssetManager? I'm not sure what value it adds to my development process, in fact, it seems like it complicates my code... every time I change my scripts or css code, I have to go in and dele...

Yii's CJuiDatePicker doesn't work for me

I copied the Yii documentation's example for CJuiDatePicker: $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'name'=>'publishDate', // additional javascript options for the date picker plugin 'options'=>array( 'showAnim'=>'fold', ), 'htmlOptions'=>array( 'style'=>'height:20px;' ), )); The...

What's Yii's equivalent for other MVC's Libraries and Helpers?

What's Yii's way of implementing modular functionality to use from Controllers, as there are Helpers and Libraries on Kohana and CodeIgniter? ...

In Yii controller....

Hi php guru :) I'm newbie and learning Yii framework where Im designing first small application and got stuck on this position where I need your attention as your guys are guru. I have a 'City name' list on main layout in header section where a user select a 'City' then I would like to pass that City_id to 'PostController' and search f...

Unable to create sample application using Yii Framework

Hi, I am new to PHP. downloaded "yii-1[1].1.4.r2429.zip" file. and try to create sample application using Yii PHP framework Extracted yii-1[1].1.4.r2429.zip to this path. C:\xampp\htdocs\yii on windows and try to create sample application using this guidelines http://www.yiiframework.com/doc/guide/quickstart.first-app Run yiic on ...

Yii framework....Calculate total on fly

Hi guys, I'm newbie in Yii framework and start learning on small web project so I got stuck on this position as how to solve it. I have a 'Order_form' where a user has confirm his order and if want to change the 'Qty' so only this can change then bydoing this I need to change the Total value to be calculate on fly on same form if Qty g...

arabic meta tags problem

hello, am trying to show an arabic meta tags, but when ever i load the page, and i view the source it shows some garbage. and this is what i did so far. this is my config.php file define("GAMES_META_DESCRIPTION", "بيسبي"); and this is my header file <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xh...

Yii requirement status...

Hi guys, I try to upload my first small project on new VPS (Linux+php-5.3.3+ apache) and found these problem don't know why any help will be appreciated plz. 1- I have to lowercase all my folders in my project to work on Linux system with php+apache. 2- Strange problem is getting error in calling modlules function if like this....Post:...

Yii flexica CMS download problem

Hi, Yii cms flexicacms.com website disabled the downloading facility by blocking registration, Anyone have backup of this CMS please share with me with a download link Thanks, Nithish. ...

Yii modules internationalization.

Yii Doc: Modules can be nested in unlimited levels. That is, a module can contain another module which can contain yet another module. We call the former parent module while the latter child module. Child modules must be declared in the modules property of their parent module, like we declare modules in the applicati...

how to make url slug like Quora does using yi framework ?

Using Quora has made me wonder how they do their slug like thes : quora.com/topics-slugs , quora.com/questions-slug or quora.com/usernames-slug. Actually i am developing an application with yii framework and i want to have a slugs like quora does? Thanks guys ...

conditional statements inside of 'value' for CDataColumn

Hi There, Does anyone know how to display a conditional value in CGridView column field? I've got an entry in the DB for gender 'M' of 'F', in die CGridView however I would like to display 'Male' and 'Female' respectively and not M or F. Any ideas would be welcome ;-) ...

File upload with Yii

Please for your solution about file upload with Yii. Thanks! ...

Help me to find $htmlOption Description in Yii

I searched in API without success. There is an incomplete description of the keys of $htmlOption. I am particularly interested in some public methods like "fileField($model, $attribute, $htmlOptions=array ())" and others of class CActiveForm. ...

Active Record Query with Calculated Field

I am trying to use a query with a calculated field in a Yii Relationship definition but all I get is errors. Here is my query: $me = new CDbExpression('CONCAT_WS(\', \', last_name, first_name) AS the_name'); Here is my relation: 'author' => array(self::BELONGS_TO, 'Author', 'auth_id', 'select'=>$me), My problem seems to be that CDbExp...

Yii - Ways to do include another view in this view

My layout page: <html> <body> <div id="container"> <ul id="list"></ul> </div> <input id="update" value="update" /> </body> </html> in which the ul list is a partial which will be rendered either when the whole page gets loaded the when the update button gets clicked, an ajax reqeust is issued and the innerHTML of the c...

yii access control filter rules in controllers

When writing rules for access control in yii controllers, possible parameters to be set for a rule are 'action' - sets to which action the rule applies; 'users', 'roles', etc. Now, both the yii guide (pdf) and reference (I have chm file) say that it's possible to set, also, a controller id for the controller the rule should apply to. N...

Error in sample functional tests with Yii

Recently I've discovered Yii framework and started learning it. I've generated app skeleton using yiic tool, installed PHPUnit, SeleniumRC and attempted to run functional tests provided by skeleton app (I didn't change anything). > phpunit functional/SiteTest.php Report said following: There was 1 error: 1) SiteTest::testLoginLog...