Wiki articles in category Tips

Showing 41-60 of 118 items.

CJuiTabs Content

Created 6 years ago by mbala, updated 6 years ago by mbala.

When I used CJuiTabs I did something. They are

2 0
7 followers
Viewed: 17 262 times
Version: 1.1
Category: Tips
Tags: CJuiTabs

An important tip when you are using CArrayDataProvider.

Created 6 years ago by sirin k, updated 2 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: 15 707 times
Version: 1.1
Category: Tips

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

Created 6 years ago by sirin k, updated 2 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: 9 932 times
Version: 1.1
Category: Tips

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

Created 6 years ago by sirin k, updated 2 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: 9 744 times
Version: 1.1
Category: Tips
Tags: facebook, user

Custom Archive in Blog system

Created 6 years ago by nirmalroka, updated 6 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: 7 441 times
Version: 1.1
Category: Tips

Customize CGridView columns directly in your view

Created 6 years ago by clapas, updated 6 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: 36 362 times
Version: 1.1
Category: Tips

Using sub query for doubletts

Created 6 years ago by mb, updated 6 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();

2 0
9 followers
Viewed: 18 418 times
Version: 1.1
Category: Tips

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

Created 6 years ago by mrkmg, updated 6 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: 9 925 times
Version: 1.1
Category: Tips

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

Created 6 years ago by kiran sharma, updated 5 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)

14 0
38 followers
Viewed: 190 813 times
Version: 1.1
Category: Tips

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

Created 6 years ago by Luiz, updated 6 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
8 followers
Viewed: 19 614 times
Version: 1.1
Category: Tips

How to filter CGridView with From Date and To Date datepicker

Created 6 years ago by kiran sharma, updated 6 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: 56 282 times
Version: 1.1
Category: Tips

Access log output from unit tests

Created 7 years ago by Mike, updated 7 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: 10 336 times
Version: 1.1
Category: Tips

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

Created 7 years ago by sirin k, updated 2 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: 55 673 times
Version: 1.1
Category: Tips
Tags: csv, import, mysql

How to catch and log MySQL deadlock errors

Created 7 years ago by seb, updated 7 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: 15 079 times
Version: 1.1
Category: Tips
Tags: database

using multiple radio button

Created 7 years ago by francis ja, updated 4 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: 61 977 times
Version: 1.1
Category: Tips

Troubleshooting Rights Extension

Created 7 years ago by junxiong, updated 7 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: 26 802 times
Version: 1.1
Category: Tips

Update two models with one view

Created 7 years ago by sensorario, updated 7 years ago by SebK.

Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).

9 2
13 followers
Viewed: 46 345 times
Version: 1.1
Category: Tips

Change buttons on our CGridView extending yii

Created 7 years ago by sensorario, updated 7 years ago by sensorario.

In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

9 0
9 followers
Viewed: 31 842 times
Version: 1.1
Category: Tips

Use application on production/development environment without making changes

Created 7 years ago by ifdattic, updated 7 years ago by ifdattic.

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11 followers
Viewed: 60 801 times
Version: 1.1
Category: Tips

Managing constants easily

Created 7 years ago by briiC.lv, updated 7 years ago by briiC.lv.

/*

    Get class constants by token.
    If you set constants with same prefix, like:
	MY_STATUS_1
	MY_STATUS_2
	MY_STATUS_3
4 0
7 followers
Viewed: 22 336 times
Version: 1.1
Category: Tips