Wiki

Sorted by viewsX
Displaying 151-160 of 774 result(s).

Using Yii with Oracle through PDO

Created 5 years ago by TrejderTips6 comments – viewed 45,886 times – ( +1 ) – version 1.1
When you are developing an webapp with Yii that will be using Oracle RDBMS you should take a look at these issues in which you may run into it.

Customizing the CMenu Widget

Created 3 years ago by mistrybTips1 comment – viewed 45,601 times – ( +5 / -1 ) – version 1.1
The CMenu class provides some useful features for generating menus in your web application.

Upload image and content using AJAX and Store it in different table

Created 2 years ago by SelvakumarHow-tos1 comment – viewed 45,269 times – ( +3 ) – version 1.1
We all know how to upload the content and images at the same time with refreshing the page. And uploading the images using Ajax we have faced some issues, here i have fixed the issues and both content and photos are uploaded using Ajax. And both content and images are stored in the different tables

using multiple radio button

Created 4 years ago by francis jaTips4 comments – viewed 45,100 times – ( +9 / -1 ) – version 1.1
When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().

Importing CSV file to mysql table using "LOAD DATA" command.

Created 4 years ago by sirin kTips6 comments – viewed 45,073 times – ( +7 ) – version 1.1
hi, Here i am giving you some simple step to import huge data from a csv file to your mysql table.this is useful when you have a very huge data to import from csv format.
tags: csv, mysql, import

Use application on production/development environment without making changes

Created 4 years ago by ifdatticTips3 comments – viewed 44,882 times – ( +8 / -1 ) – version 1.1
I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

How to filter CGridView with From Date and To Date datepicker

Created 4 years ago by kiran sharmaTips16 comments – viewed 44,818 times – ( +17 / -4 ) – version 1.1
This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.

A simple way to get Yii client-side form validation run when submitting by ajax

Created 3 years ago by nlacTutorials5 comments – viewed 44,556 times – ( +8 / -2 ) – version 1.1
A time ago i've met the issue that Yii doesn't run any client-side form validation when submitting the form by CHtml::ajaxSubmitButton. The small javascript below helps to fix it.

How to log changes of ActiveRecords?

Created 7 years ago by pfthTutorials7 comments – viewed 43,870 times – ( +40 / -2 ) – version 1.1
A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a CActiveRecord Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecords very easily.
tags: Logging

RBAC Super Simple with Admin and User

Created about a year ago by evercodeTutorials10 comments – viewed 43,785 times – ( +15 / -3 ) – version 2.0
One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for developing your own features or move on to Yii 2's RBAC.