Wiki articles in category How-tos

Showing 221-240 of 292 items.

How to translate and do the translations the easy way

Created 12 years ago by Roman Solomatin, updated 8 years ago by Roman Solomatin.

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.

16 2
17 followers
Viewed: 87 494 times
Version: 1.1
Category: How-tos

Yii registry, how to use it, does it exist at all?

Created 12 years ago by dckurushin, updated 11 years ago by resurtm.

If you coming to Yii with experience with Zend Framework for example, most likely you get used to

Zend_Registry::get('paramName');
Zend_Registry::set('paramName');
6 0
9 followers
Viewed: 36 008 times
Version: 1.1
Category: How-tos

Authenticating against phpass hashes with Yii

Created 12 years ago by Da:Sourcerer, updated 9 years ago by Da:Sourcerer.
  • iteration_count_log2 controls the number of iterations for key stretching. A setting of 8 means the hash algorithm will be applied 2^8 = 256 times. This setting should be kept between 4 and 31.
  • portable_hashes controls whether portable hashes should be used or not. Portable hashes are salted MD5 hashes prefixed by $P$.
22 0
28 followers
Viewed: 39 221 times
Version: 1.1
Category: How-tos

Creating a jQueryUI Sortable CGridView

Created 12 years ago by blindMoe, updated 11 years ago by rAWTAZ.

I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

36 0
54 followers
Viewed: 52 208 times
Version: 1.1
Category: How-tos

Using filters with CGridView and CArrayDataProvider

Created 12 years ago by marcovtwout, updated 10 years ago by yugene.

Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

19 0
29 followers
Viewed: 92 835 times
Version: 1.1
Category: How-tos

Filter / Search with CListView

Created 12 years ago by JohnPollard, updated 11 years ago by JohnPollard.

This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

22 0
26 followers
Viewed: 55 315 times
Version: 1.1
Category: How-tos

Run Yiic directly from your app without a shell

Created 12 years ago by jacmoe, updated 12 years ago by jacmoe.

Whatever reason, it turns out to be easy enough to add that feature to your application. :)

13 0
20 followers
Viewed: 48 736 times
Version: 1.1
Category: How-tos

Using a CDbDataReader (sql query result) in a zii widget (such as CGridView or CListView)

Created 12 years ago by Revelis Luc Bonnin, updated 12 years ago by Revelis Luc Bonnin.

If in your application you have to proceed to a complex SQL query that is not associated to a model, you will use CDbDataReader like it is described in the Yii documentation. An example could be

8 1
8 followers
Viewed: 59 299 times
Version: 1.1
Category: How-tos

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

Created 12 years ago by RusAlex, updated 12 years ago by Darwin Wen.

With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

16 0
33 followers
Viewed: 72 441 times
Version: 1.1
Category: How-tos

Custom Autocomplete Display and Value Submission

Created 12 years ago by Antonio Ramirez, updated 11 years ago by SebK.

I was looking around wiki and found that was no approach as the one I did so I guessed this is worth to write.

12 0
18 followers
Viewed: 60 884 times
Version: 1.1
Category: How-tos

Url: hide index.php

Created 12 years ago by Hermans, updated 12 years ago by Hermans.

Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.

19 0
31 followers
Viewed: 315 972 times
Version: 1.1
Category: How-tos

Integrating Wordpress and Yii: yet another approach

Created 12 years ago by goncin, updated 12 years ago by goncin.
6 2
11 followers
Viewed: 74 005 times
Version: 1.1
Category: How-tos

ISA hierarchy of tables inside a database and how to implement a single form

Created 12 years ago by pligor, updated 12 years ago by pligor.

Please consider the following Dear software engineers imagine I have a simple ISA hierarchy: parent A with children B and C. So let's say we have the corresponding tables named "a", "b", "c" and (created with the help of the gii model creator) the classes A, B, C The following is a screenshot from MySQL workbench: ![MySQL workbench screenshot](http://s4.postimage.org/4tuwkm43d/Screenshot.pn...

1 0
3 followers
Viewed: 16 715 times
Version: 1.1
Category: How-tos

Creating a CSS Driven Drop Down Menu using CMenu

Created 12 years ago by blindMoe, updated 12 years ago by blindMoe.

[CMenu] offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.

19 1
25 followers
Viewed: 98 623 times
Version: 1.1
Category: How-tos

How to use an application behavior to maintain runtime configuration

Created 12 years ago by zaccaria, updated 11 years ago by Pablovp.

In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.

26 0
25 followers
Viewed: 42 357 times
Version: 1.1
Category: How-tos

How to show ajax delete status in CGridView like flash messages

Created 12 years ago by hasanavi, updated 11 years ago by adlersd.

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 dele...

17 0
30 followers
Viewed: 56 064 times
Version: 1.1
Category: How-tos

How to create a wrapper for a js library

Created 12 years ago by zaccaria, updated 12 years ago by Maurizio Domba Cerin.

This wiki will explain how to include a javascript library in a widget.

16 1
20 followers
Viewed: 22 796 times
Version: 1.1
Category: How-tos

How to use EzComponents in Yii

Created 12 years ago by Ehsanjs, updated 12 years ago by samdark.

change your index.php

4 0
6 followers
Viewed: 13 296 times
Version: 1.1
Category: How-tos

Sub-domains with different databases in Yii!

Created 12 years ago by jwerd, updated 12 years ago by jwerd.

I used another example posted here a while back where the person was modifying the index.php and adding in a switch case for different domains and loading separate config files. This was actually too much for me, because all my portals are the exact same (as far as routes, modules, extensions, etc) and if I ever wanted to add another route it wouldn't be feasible opening up all the config files t...

2 0
12 followers
Viewed: 25 727 times
Version: 1.1
Category: How-tos

Single table inheritance

Created 12 years ago by samdark, updated 12 years ago by samdark.

Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...

34 0
35 followers
Viewed: 52 913 times
Version: 1.1
Category: How-tos