Wiki articles

Showing 21-40 of 651 items.

CSS Naming Conventions

Created 13 years ago by qiang, updated 5 years ago by samdark.

In this article, we introduce a set of CSS naming conventions that we have applied in several big projects and achieved success. The goal of these naming conventions is to eliminate the possibility of naming conflicts, facilitate debugging and maintenance, and to simplify the naming process.

35 0
24 followers
Viewed: 48 480 times
Version: 1.1
Category: Tutorials

Drills : Search by a HAS_MANY relation in Yii 1.1

Created 11 years ago by softark, updated 5 years ago by softark.

Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider in Yii 1.1. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.

22 0
27 followers
Viewed: 76 476 times
Version: 1.1
Category: Tutorials

Guidelines for good schema design

Created 12 years ago by Steve Friedl, updated 5 years ago by softark.

Virtually all Yii applications are built on top of a database, and though Yii is very flexible in how it addresses your DB, some design choices make things more convenient than others.

124 0
71 followers
Viewed: 121 553 times
Version: 1.1
Category: Tips

What SQL-Statement creates yii?

Created 5 years ago by Necip, updated 5 years ago by Necip.

The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.

0 0
1 follower
Viewed: 12 229 times
Version: 1.1
Category: Tips

Organize directories for applications with front-end and back-end

Created 14 years ago by qiang, updated 6 years ago by CeBe.

Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing direc...

25 0
34 followers
Viewed: 97 565 times
Version: 1.1
Category: Tutorials
Tags:

Adding Yii Search to Your Browser Search Box

Created 13 years ago by qiang, updated 6 years ago by CeBe.

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6 followers
Viewed: 63 472 times
Version: all
Category: Tips

Configuring PhpStorm IDE for Yii 1.1

Created 13 years ago by samdark, updated 6 years ago by samdark.
  • Complete code: Ctrl+Space.
  • Show method arguments: Ctrl+Q.
59 1
53 followers
Viewed: 152 655 times
Version: 1.1
Category: Tips
Tags: IDE, PhpStorm

An important tip when you are using CArrayDataProvider.

Created 11 years ago by sirin k, updated 6 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: 19 748 times
Version: 1.1
Category: Tips

Ajax form submiting in Yii

Created 11 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

hi guys, Here I'm going to give you a working example of ajax form submiting in Yii.

4 3
23 followers
Viewed: 168 001 times
Version: 1.1
Category: Tutorials

Facebook DeAuthorize callback URL and its response data.

Created 11 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

Facebook Deauthorize callback is used to getting notification to the app owner when a user uninstall our app from their fan page or profile.

3 0
6 followers
Viewed: 24 474 times
Version: 1.1
Category: Tutorials
Tags: facebook

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

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

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

Created 11 years ago by sirin k, updated 6 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: 69 651 times
Version: 1.1
Category: Tips
Tags: csv, import, mysql

Displaying image in a CGridView column.

Created 11 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.

9 1
14 followers
Viewed: 74 640 times
Version: 1.1
Category: How-tos

Storing your images in your table's blob field and displaying that stored images.

Created 11 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

He im giving you a very simple example ie how you can store an image to your blob field in a table.Hope you already familiar with the normal image upload.

8 2
11 followers
Viewed: 48 486 times
Version: 1.1
Category: How-tos
Tags: blob, image

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

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

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 10 years ago by Luis Lobo Borobia, updated 6 years ago by Luis Lobo Borobia.

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2 followers
Viewed: 14 450 times
Version: all
Category: Tips

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Created 10 years ago by Gerhard Liebenberg, updated 7 years ago by Gerhard Liebenberg.

Countries sometimes change their laws pertaining to time zones and daylight saving times. This means that GMT+2 can be a different local time this August compared to last August! It could even be a different date!

6 0
13 followers
Viewed: 32 881 times
Version: 1.1
Category: How-tos

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 12 years ago by Rutger, updated 7 years ago by Rutger.

This solution requires Yii 1.1.9 or above

12 0
16 followers
Viewed: 36 654 times
Version: 1.1
Category: How-tos

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 11 years ago by Boaz, updated 7 years ago by mrun.

Consider the following use case:

5 1
6 followers
Viewed: 25 520 times
Version: 1.1
Category: How-tos

Interactive mode command-line command for Yii1

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

For one of my projects I needed an interactive console command in Yii 1, i.e. the one that is gathering all information from user in an interactive mode (a serie of questions and answers displayed directly in the console), ignoring command-line arguments at all.

0 0
1 follower
Viewed: 19 024 times
Version: 1.1
Category: How-tos