Applying A Defaultscope To A Model Based On The Attribute Of A Related Model
Hi guys. Noob here. I am trying to figure out how trim all my listings of models. Trying to use defaultScope but running into problems and wondering if it's the right way to go. The 3 pertinent models...
View ArticleDropdownlist
Hi, I'm new to Yii, I'm trying to create a DropDownList between two Tables: Category and Product. Category Table: create table category ( id integer not null primary key auto_increment, name...
View ArticleAdd Pm / Am Option To Time In Ejuidatetimepicker
Hi I need to add pm/am option but I have no idea how ? This my code <?php $this->widget( 'ext.jui.EJuiDateTimePicker', array( 'model' => $model, 'attribute' => 'time', 'language'=>...
View ArticleLayout Help
I am new to yii and learning layouts. I am using the default application generated by yiic. I went into controller.php and changed //layouts/column1 to //layouts/column2 and nothing changed on the web...
View ArticleGeneral Object Design Question
Hello, Curious about how best to design a few classes. This is a simplified version, but just looking for concepts. Say I have 3 tables: Users, Departments, User_Departments. A Manager is able to add...
View ArticleSolve Problem This Ruels Validator
this is my code what correct this code ? public function rules() { if(isset($_POST['ProfileViewModel']['username'])) { $rulesArray[] = array('username', 'length', 'min' => 3, 'max' => 20,...
View ArticleMultiple Databases In One Model
I am trying to query multiple databases (same table, same structure, just different databases) in a model file. I am using the "mpgii" extension to create the models. Then I override the connectionId()...
View ArticleAnother Layout Question
What is the best way to setup the home page using the column2 layout and all of the other pages set to use the column1 layout?
View ArticleValidate Field That Is Not In Model
Hi, I have the following issue that I cannot solve and also cannot find any solution in this forum (yet) On my page there is an input form with username + group Both fields are select-lists that I...
View ArticleIs It Possible To Force Cgridview To Load Data Via Ajax Only?
Is there a way to make a CGridView not load data on the initial rendering of the view it lives on, and instead make it load the first data page with a subsequent AJAX request after the initial page...
View ArticleYii Playground: collaborative demo app.
Yii Playground Project homepageHow to contributeLive demo Yii Playground is a demo application that uses the PHP Yii Framework to show some features of the framework starting from basic examples. It...
View ArticleObtaining Data From Another Table Cgridview Widget
Hello, I am currently trying to use the CGridView widget. I am posting as I am unsure as to how to get a column from another table (target_name from the target table) and have it displayed in the table...
View ArticleOpenid With Steam
I would like to set up the ability to log in using the LOID extension (sorry, first post so I can't link to it) in conjunction with Valve's OpenID. This is what their development documentation says:...
View ArticleCan I Use Normal Query Instead Criteria Object For Use In Cactivedataprovider?
Can i use normal query instead criteria object for use in CActiveDataProvider?
View ArticleProblem Z Wyświetleniem Osobnego Modelu W Cgridview
Witam, Jestem bardzo początkujący jeśli chodzi o Yii. Do poprawienia mam pewną aplikację, ale natknąłem się na problem nie do obejścia. Istnieje tabela product, category i products_category. W modelach...
View ArticleCactiveform - Nie Aktualizuje Pola W Tabeli
Witam, Do istniejącego, działającego formularza dodałem jedno pole checkbox o id 'archived'. $form=$this->beginWidget('CActiveForm', array( 'id'=>'product-form', 'enableAjaxValidation'=>true,...
View ArticleUtf 8 Decoding Database Data
Hello everybody I am currently trying to get some utf 8 encoded data from the data base: For example the String "Message's" is saved as "Message’s" Without yii when echoing it out it was enough to...
View ArticleSearch By Related Field
Hi, I know there are plenty of topics on this but I searched&tried so many and it is still not working. I tried those for example: 1....
View ArticleFocus First Element In Form
$form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array( 'id'=>'registration-register-form', 'htmlOptions'=>array('class'=>'well'), 'enableAjaxValidation'=>true,...
View ArticleUploaded images management
Hi, I have a structure problem : i have a model named "Projets", and another one named "ImagesProjets". The latter stores image information (location, filename, alt, title) about pictures used to...
View Article