I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.
I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs...
Original source code and idea are from: PHP, PDO & Nested Transactions.
This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.
I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.
Hey guys, I'm hoping other people will find this helpful. Today I went through the process of adding CKEditor to one of my projects, and then integrating KCFinder as the image uploader. It will be used in a CActiveForm, without the use of any crazy weird widgets. All paths are relative, using Yii functions, so this will work no matter where you install. Here it is:
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.
var formData = new FormData($("#post-form")[0]);
$.ajax({
url: '<?php echo Yii::app()->createUrl("forumPost/uploadPost"); ?>',
type: 'POST',
data: formData,
datatype:'json',
// as...
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch
having 0 or 1 values.
After that we want a user to see on
or off
instead 1 or 0.
So we do the usual thing:
<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
'name'=>'...
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
An application component is a confortable way for share information among all component of the application
Yii comes with a set of powerful classes for logging. If you have read the documentation about logging messages, you have noticed that we can actually decide which messages we wish to log. And this is exactly what we are going to do, using [CWebLogRoute](http://www.yiiframework.com/doc/api/1.1/CWebLog...
Yii have a CJuiProgressBar, but it is static. If we want a dynamic progress bar to show the percentage or status, we have to do more things. I make it successfully and am glad to share it with you.
When you're finished following this article, you'll have a website that integrates WordPress and Yii routes in under one path. For example, you can setup /widgets and /customers to point to Yii controllers and /about-us, /contact-us, /blog/* and /faq pointing to WordPress pages.
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.
Here I am describing how you can install and update Yii in WAMP sever.
When i had created this functionality then i found some difficulties and not got much idea from wiki and forums. so, i think this will be useful for newbie users and save time of other developers when create related functionality. I refer Collecting Tabular Input tutorial but not got clear idea for create/update...
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.