Wiki articles in category Tips

Showing 81-100 of 162 items.

Setting static modules' properties in config

Created 12 years ago by Alexander Palamarchuk, updated 12 years ago by Alexander Palamarchuk.

You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.

1 1
2 followers
Viewed: 14 604 times
Version: 1.1
Category: Tips
Tags: config, module

Making friends' configs, DB credentials and paths with version control

Created 12 years ago by Alexander Palamarchuk, updated 11 years ago by ajsharma.

In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test s...

1 1
4 followers
Viewed: 18 200 times
Version: 1.1
Category: Tips
Tags: config

[pt-br] O guia de estudos do Yii para iniciantes

Created 12 years ago by Rodrigo Coelho, updated 12 years ago by Rodrigo Coelho.

You can find the english version of this wiki here: The complete beginner's study guide for the Yii Framework.

1 0
3 followers
Viewed: 14 188 times
Version: 1.1
Category: Tips
Tags:

The complete beginner's study guide for the Yii Framework

Created 12 years ago by Rodrigo Coelho, updated 12 years ago by Rodrigo Coelho.

Start studying the MVC pattern. You will understand the roles of the model, the view and the controller and know where goes each part of the code.

12 0
19 followers
Viewed: 115 607 times
Version: 1.1
Category: Tips

CJuiTabs Content

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

When I used CJuiTabs I did something. They are

2 0
7 followers
Viewed: 20 079 times
Version: 1.1
Category: Tips
Tags: CJuiTabs

An important tip when you are using CArrayDataProvider.

Created 12 years ago by sirin k, updated 7 years ago by Maurizio Domba Cerin.

Yii's CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an...

5 1
5 followers
Viewed: 20 235 times
Version: 1.1
Category: Tips

Solution for session lose of Facebook iframe application in Internet Explorer .

Created 12 years ago by sirin k, updated 7 years ago by Maurizio Domba Cerin.

Facebook iframe app’s session is losing in Internet Explorer when doing a second redirection inside the facebook iframe app.The main reason is ,by default IE wont allow cookies in its priavacy settings If cookies not available means session is also not available for our Facebook iframe app in IE.

2 0
4 followers
Viewed: 14 898 times
Version: 1.1
Category: Tips

Get notified about the status of a Facebook user in your web app using periodic Ajax calls.

Created 12 years ago by sirin k, updated 7 years ago by Maurizio Domba Cerin.

hello,

 This article is helpful only if you have the following situation:
 A web app which uses facebook login to login its users and if a user is logged out from his/her facebook account through another browser tab, then your app dont know that he is logged out  out or not from his facebook account and he/she will remain as logged in your web application.Its ok if you have no problem wi...
4 0
6 followers
Viewed: 16 255 times
Version: 1.1
Category: Tips
Tags: facebook, user

Custom Archive in Blog system

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

Hi I had made simple archive system for blog system that can handle tbl_post. I had used simple CDbCriteria not more than that. I know there is more and many better way to this but I think this will give some idea to users to generate new idea or customized or modified this version of code.

1 0
2 followers
Viewed: 10 616 times
Version: 1.1
Category: Tips

Customize CGridView columns directly in your view

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

You usually take a model instance passed into your view to provide data to a CGridView in this way:

2 1
5 followers
Viewed: 39 563 times
Version: 1.1
Category: Tips

Using sub query for doubletts

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

find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

$model=new MyModel('search');
$model->unsetAttributes();

3 0
10 followers
Viewed: 25 550 times
Version: 1.1
Category: Tips

Yii behind a reverse proxy, SSL support and correct IP logging

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

If you are hosting Yii behind a reverse proxy, for example nginx, and you are having issues with your logs showing the proxies IP, or the urls being created arn't being created for SSL because your SSL certs are located on your reverse proxy instead of the Yii server, this code may be able to help you. I placed them in the very top of Yii's entry script, index.php

0 0
2 followers
Viewed: 18 566 times
Version: 1.1
Category: Tips

How to upload image(photo), and path entry in database with update functionality

Created 12 years ago by kiran sharma, updated 11 years ago by Shahcheraghean.

I saw many posts that community newbie is confuse in image/photo upload with random name. so I post this topic covering all useful things regarding to image/photo upload(not covering image attribute related functionality)

15 0
39 followers
Viewed: 211 312 times
Version: 1.1
Category: Tips

BootProgressColumn - Progress Bar Inside GridView Column compatible with 'bootstrap' extension

Created 12 years ago by Luiz, updated 11 years ago by robregonm.

A little hint of how to create a progress bar inside the column of the grid, using the 'bootstrap' extension.

5 0
7 followers
Viewed: 25 052 times
Version: 1.1
Category: Tips

How to filter CGridView with From Date and To Date datepicker

Created 12 years ago by kiran sharma, updated 12 years ago by kiran sharma.

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.

9 0
26 followers
Viewed: 63 954 times
Version: 1.1
Category: Tips

Access log output from unit tests

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

Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

3 0
2 followers
Viewed: 16 025 times
Version: 1.1
Category: Tips

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

Created 12 years ago by sirin k, updated 7 years ago by Maurizio Domba Cerin.

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.

5 0
20 followers
Viewed: 70 760 times
Version: 1.1
Category: Tips
Tags: csv, import, mysql

How to catch and log MySQL deadlock errors

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

This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.

4 0
7 followers
Viewed: 21 261 times
Version: 1.1
Category: Tips
Tags: database

using multiple radio button

Created 12 years ago by francis ja, updated 10 years ago by Rohit Suthar.

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().

6 0
13 followers
Viewed: 74 584 times
Version: 1.1
Category: Tips

Troubleshooting Rights Extension

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

Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.

5 0
14 followers
Viewed: 31 526 times
Version: 1.1
Category: Tips