Wiki articles in category How-tos

Showing 301-320 of 373 items.

Reliable Alternative For Yii::app()->request->isAjaxRequest AND Adding Data To Ajax Form With JS

Created 13 years ago by ibo_s ibo_s, updated 13 years ago by ibo_s ibo_s.

In this How-To I'll show you:

12 1
10 followers
Viewed: 62 164 times
Version: 1.1
Category: How-tos

How to translate and do the translations the easy way

Created 13 years ago by Roman Solomatin Roman Solomatin, updated 9 years ago by Roman Solomatin 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: 89 425 times
Version: 1.1
Category: How-tos

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

Created 13 years ago by dckurushin dckurushin, updated 12 years ago by resurtm 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: 38 616 times
Version: 1.1
Category: How-tos

Authenticating against phpass hashes with Yii

Created 13 years ago by Da:Sourcerer Da:Sourcerer, updated 11 years ago by Da:Sourcerer 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: 41 638 times
Version: 1.1
Category: How-tos

Creating a jQueryUI Sortable CGridView

Created 13 years ago by blindMoe blindMoe, updated 12 years ago by rAWTAZ 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: 54 045 times
Version: 1.1
Category: How-tos

Using filters with CGridView and CArrayDataProvider

Created 13 years ago by marcovtwout marcovtwout, updated 11 years ago by yugene yugene.

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

19 0
29 followers
Viewed: 95 798 times
Version: 1.1
Category: How-tos

Filter / Search with CListView

Created 13 years ago by JohnPollard JohnPollard, updated 12 years ago by JohnPollard 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: 56 976 times
Version: 1.1
Category: How-tos

Run Yiic directly from your app without a shell

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

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

13 0
20 followers
Viewed: 50 671 times
Version: 1.1
Category: How-tos

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

Created 14 years ago by Revelis Luc Bonnin Revelis Luc Bonnin, updated 14 years ago by Revelis Luc Bonnin 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: 60 036 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 14 years ago by RusAlex RusAlex, updated 13 years ago by Darwin Wen 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: 74 867 times
Version: 1.1
Category: How-tos

Custom Autocomplete Display and Value Submission

Created 14 years ago by Antonio Ramirez Antonio Ramirez, updated 13 years ago by SebK 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: 62 830 times
Version: 1.1
Category: How-tos

Url: hide index.php

Created 14 years ago by Hermans Hermans, updated 14 years ago by Hermans 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: 327 000 times
Version: 1.1
Category: How-tos

Integrating Wordpress and Yii: yet another approach

Created 14 years ago by goncin goncin, updated 14 years ago by goncin goncin.
6 2
11 followers
Viewed: 77 656 times
Version: 1.1
Category: How-tos

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

Created 14 years ago by pligor pligor, updated 14 years ago by pligor 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: 17 787 times
Version: 1.1
Category: How-tos

Creating a CSS Driven Drop Down Menu using CMenu

Created 14 years ago by blindMoe blindMoe, updated 13 years ago by blindMoe 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: 100 519 times
Version: 1.1
Category: How-tos

How to use an application behavior to maintain runtime configuration

Created 14 years ago by zaccaria zaccaria, updated 13 years ago by Pablovp 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: 44 397 times
Version: 1.1
Category: How-tos

How to show ajax delete status in CGridView like flash messages

Created 14 years ago by hasanavi hasanavi, updated 12 years ago by adlersd 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: 58 087 times
Version: 1.1
Category: How-tos

How to create a wrapper for a js library

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

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

16 1
20 followers
Viewed: 24 374 times
Version: 1.1
Category: How-tos

How to use EzComponents in Yii

Created 14 years ago by Ehsanjs Ehsanjs, updated 13 years ago by samdark samdark.

change your index.php

4 0
6 followers
Viewed: 14 431 times
Version: 1.1
Category: How-tos

Sub-domains with different databases in Yii!

Created 14 years ago by jwerd jwerd, updated 14 years ago by jwerd 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: 27 047 times
Version: 1.1
Category: How-tos