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
2 answers

Yii: How to set up roles in yii-user extensions?

I installed the yii user extension and now i am wandering how i can add an extra role. I added a new column in the User db table and edited the UserModule like this: public static function isEmployee() { if(Yii::app()->user->isGuest) …
Gunnit
  • 1,064
  • 5
  • 22
  • 45
1
vote
1 answer

Yii - Populating a dropdown list

I want to get a list of productTypes from the database and output them to a dropdownlist which will then be used to ajax populate a second dropdown list. Step 1: Controller gets productTypes from database Step 2: Controller converts the productTypes…
Gravy
  • 12,264
  • 26
  • 124
  • 193
1
vote
2 answers

How to sort the fields from relation table in Yii?

I am trying to implement sorting with Yii list view. I have joined 2 tables named provider_favourite and service_request in list view. And the fields and contents from both tables are listing in the list view. But sorting is working only in…
anu
  • 458
  • 2
  • 13
  • 36
1
vote
3 answers

Hidden Pagination summary text

I use CGridView in Yii to create tables. I would like to show my table with pagination but hide the summary text at the top, which indicates the number of page restance (Displaying 1-4 of 4 results.) Is that possible? thank you Sorry for my English
Florent
  • 761
  • 1
  • 10
  • 24
1
vote
1 answer

How do i get Module, Controller, action and request params of a Yii based url without using Yii

Scenario I have one YII project and its working fine with URL Manager (SEO friendly URL), so that the URL will be like the following http://example.com/Controllername/action/paramName/ParamValue I implemented another php application which is in row…
Sreeraj
  • 2,690
  • 6
  • 26
  • 37
1
vote
1 answer

How to display multiple star rating in yii?

I am working on CStar rating widget in yii. I have done as follows: $review = Reviews::model()->findAll(); foreach($review as $review) { $rate=$review['rating']; $this->widget('CStarRating',array( …
user1983366
1
vote
1 answer

CButtonColumn, Visibility Nested Exception in CGridView

I have currently created a CButtonColumn in my CGridView to display several options for related models. Like this 'buttons' => array( 'publish' => array( 'label' => 'Publish', 'visible' =>…
user1845192
1
vote
1 answer

Including JS file in View In YII

I want to load the JS file in view to avoid heavy-loading of my application. I am using this JS file for CgrdView in view. SO i tried…
tnchalise
  • 1,573
  • 2
  • 18
  • 38
1
vote
1 answer

yii. can't logout from module

I have admin module and different CWebUser(adminuser) for that module. It works good for login. So I can login in main app and in module by different users. But when I call logout method in…
Anton G
  • 129
  • 1
  • 12
1
vote
1 answer

Url parameters values with special characters are providing errors in view

I have edited Url manager to provide SEO friendly urls but getting problem when the url have values with special characters such as . or () or - or any other special character http://localhost/nbnd/search/city/delhi In city…
Bipin Chandra Tripathi
  • 2,550
  • 4
  • 28
  • 45
1
vote
1 answer

calling action with id when dropdown change in yii

cate_id, CHtml::listData(Category::model() -> findAll(), 'id', 'name'), array('empty' => 'Select Category','submit'=>array('advert/loadAdvert','id'=>'5'))); ?> i need to get selected dropdown…
Viswa
  • 3,211
  • 5
  • 34
  • 65
1
vote
1 answer

How to build MVC on yii if i already have model, view and controller files?

Starting to learn yii, read some articles and most popular tutorials. Created 1st application using this one http://www.yiiframework.com/tour/ . Now I want to make real registration-authorization, have found very decent example which does contain…
Alik M
  • 11
  • 1
1
vote
2 answers

Yii Criteria with "with" yields duplicates

This is my Criteria: $criteria = new CDbCriteria(); $criteria->with = array('userUrls'); $criteria->together = true; $criteria->compare('userUrls.community_id',Yii::app()->params['currentCommunity']->id); $criteria->order = 't.weight DESC, t.id…
Nathan H
  • 48,033
  • 60
  • 165
  • 247
1
vote
1 answer

wysiwyg-text-editor not showing in a jquery dialog box in yii

I am using a wysiwyg-text-editor for a text area in my form. But it is not showing inside a jquery dialog box having that form can any one help me in doing this Thanks in advance ;)
am123
  • 191
  • 2
  • 5
  • 10
1
vote
1 answer

How to select a column of data from table with WHERE closure and display

How to select a column of data from table with WHERE closure and list as combo-box in yii?
raghul
  • 1,480
  • 6
  • 22
  • 39