Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 21-30 of 255 result(s).

Authenticating against phpass hashes with Yii

Created 2 years ago by Da:SourcererHow-tos18 comments – viewed 20,529 times – ( +26 ) – version 1.1
The Portable PHP password hashing framework allows advanced password hashing offering increased security over simple MD5- or SHA1-hashed passwords. phpass is already in use in some larger projects such as WordPress (since v2.5), Drupal 7 and phpBB 3.

Keeping a running total in a CGridView

Created 3 years ago by Steve FriedlHow-tos4 comments – viewed 20,388 times – ( +24 ) – version 1.1
This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!
tags: CGridView

Filter / Search with CListView

Created 2 years ago by JohnPollardHow-tos7 comments – viewed 27,113 times – ( +24 ) – version 1.1
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

URL management for Websites with secure and nonsecure pages

Created about a year ago by qiangHow-tos9 comments – viewed 15,682 times – ( +23 ) – version 1.1
In this article, I will describe how to manage URLs for a Website that has both secure and nonsecure content.
tags: URL

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 3 years ago by xrxHow-tos14 comments – viewed 29,745 times – ( +22 ) – version 1.1
Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

Using Yii with PHP 5.4 built-in webserver instead of Apache

Created 2 years ago by samdarkHow-tos1 comment – viewed 8,697 times – ( +21 ) – version 1.1
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it:

Dynamic Sidebar using CClipWidget

Created 3 years ago by SheldmanduHow-tos5 comments – viewed 20,527 times – ( +21 ) – version 1.1
Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly.

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 2 years ago by RusAlexHow-tos9 comments – viewed 34,934 times – ( +21 ) – version 1.1
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

Integrating Wordpress and Yii: still another approach, using Yii as the router/controller

Created 2 years ago by acorncomHow-tos22 comments – viewed 26,826 times – ( +20 ) – version 1.1
A lot of people have written posts on integrating Yii and WordPress. This article combines goncin's approach with an article I read about integrating Symfony and WordPress and applies it all to Yii and WordPress.

How to show ajax delete status in CGridView like flash messages

Created 2 years ago by hasanaviHow-tos12 comments – viewed 29,349 times – ( +20 ) – version 1.1
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())