Questions tagged [yii-components]

Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or [ji:] and it's an acronym for "Yes It Is!"

For more information on Yii components, please see the Yii documentation at:

http://www.yiiframework.com/doc/guide/1.1/en/basics.component

434 questions
1
vote
0 answers

Captcha not display image in yii

I try CAPTCHA code in my view page , Model Rule public function rules() { return array( array('verifyCode', 'captcha', 'allowEmpty'=>extension_loaded('gd')), ); } below code about view page control..
AV333
  • 25
  • 5
1
vote
2 answers

Yii2: How do I fix 404 error when changing default controller on advanced template?

I have changed my $defaultRoute on my config which looks like this. This is according to my default controller AdminController? I am getting 404 Error main-local.php 'admin/index', 'components' => [ 'request'…
Zack
  • 1,527
  • 2
  • 20
  • 32
1
vote
2 answers

How to install DateTimePicker in Yii2

I have creating form fields. Here, i want to add DateTimePicker. I have referred in google about some date time picker. i got so many. DateTimePicker jQuery plugin Bootstrap DateTimePicker. My question is which plugin is best among them. and How…
Deen
  • 611
  • 2
  • 16
  • 30
1
vote
1 answer

Yii criteria - modify to include OR Condition

I have the following line of code that does a simple query if ($this->fulfilled) $criteria->addCondition('fulfilled ' . (($this->fulfilled == 1) ? "IS NOT NULL" : "IS NULL")); How can modify this to do a query that contains an OR command to…
Zabs
  • 13,852
  • 45
  • 173
  • 297
1
vote
2 answers

How to properly create different logins for different Modules in Yii framework

In my Yii 1.x application I defined new Admin module. In the init method of the admin module I defined new user component like this: $this->setComponents(array( 'user'=>array( 'class' => 'CWebUser', //…
MrD
  • 2,423
  • 3
  • 33
  • 57
1
vote
1 answer

Auto-logout of session after x seconds for a user type (Yii 1.x)

I have a Yii 1.x application that uses the WebUser component for a login section of the website - within my config/main.php I have the following block within my components section that will automatically timeout the session after 2 hours (e.g 3600 x…
Zabs
  • 13,852
  • 45
  • 173
  • 297
1
vote
1 answer

Observer design pattern in Yii 1.1.16, attaching event handlers and rising events

In Yii 1.1.16 Observer Design Pattern is implemented using events & behaivours (events can be shared between all components that extends CComponents). I have following models: User.php (see below) Work.php (see below) Activity.php what I want…
rolands_usans
  • 35
  • 2
  • 9
1
vote
1 answer

How to create a Enom component in Yii framework

I am new to yii and i have to create a yii component for Enom api .I have followed this url Enom application for refrence . It is in core php and i want to implement this in yii as component or module .I have done in this way put the files…
Manoj Dhiman
  • 5,096
  • 6
  • 29
  • 68
1
vote
1 answer

Yii, set radio button value fetch from database

In Yii, I listed my table which is fetch from database in grid view. 'value'=> 'CHtml::radioButton("set_default",false,array( "value"=>"$data->id", "set"=>"1", "disable"=>"disable", …
1
vote
0 answers

Use from two xupload exntention in one file

I want two user from two exuploded file in one form in yii..how can do this? $this->widget('xupload.XUpload', array( 'url' => Yii::app()->createUrl("site/upload"), 'model' => $photos, 'showForm'=>true, 'htmlOptions'…
1
vote
1 answer

Show cgridview data based on condition

Is this possible to show cgridview data using condition. like only show those data where status=1. $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'user-details-grid', 'dataProvider'=>$model->search(), 'filter'=>$model, 'columns'=>array( …
uiTeam324
  • 1,215
  • 15
  • 34
1
vote
0 answers

I am using Yiistrap. I want to modify content of model

I am using Yiistrap. I want to modify content of model. I want to add some label, text box, drop-down (2 or more fields). I have given the code below & mentioned the region which I want to modify. widget('bootstrap.widgets.TbModal',…
1
vote
1 answer

Yii How to add ajax-loading indicators clistview pagination links

i want's to add ajax loader in my clistview pagination links. how is it possible in yii pagination. Thanks.
aman
  • 135
  • 1
  • 12
1
vote
1 answer

Yii, custom UrlManager::createUrl() crash the widget-create-link

I have create a custom UrlManager for adding language parameter at the beginning of the $route. what it do is make $route="site/index" ---> $route="en/site/index" (or other current using language) It is working, but I there is some page I don't…
Zitty Yam
  • 135
  • 1
  • 12
1
vote
1 answer

Yii - simplify retrieving the $_POST var data using getPost()

I have the following Yii code and would like to minimise it if possible: $request = Yii::app()->request->getPost('request'); $username = $request['model']['username']; Is it possible to minimise this to have this work something like this so its all…
Zabs
  • 13,852
  • 45
  • 173
  • 297