Wiki articles

Showing 81-100 of 826 items.

How to get SEO friendly URL using Model and new getUrl() function

Created 8 years ago by shiv shiv, updated 8 years ago by shiv shiv.

We all need SEO friendly URLs for our projects. its not always good to call route with params so we can generalise it for all models using a common function.

2 0
1 follower
Viewed: 30 714 times
Version: 2.0
Category: How-tos

Write & use a custom Component in Yii2.0

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

This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

14 0
11 followers
Viewed: 130 961 times
Version: 2.0
Category: How-tos

Building a REST API in Yii2.0

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

This is wiki page is useful if you are trying to build a customized REST API in Yii2.0

4 0
16 followers
Viewed: 156 419 times
Version: 2.0
Category: Tutorials

An important tip when you are using CArrayDataProvider.

Created 13 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 22 791 times
Version: 1.1
Category: Tips

Ajax form submiting in Yii

Created 13 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 174 728 times
Version: 1.1
Category: Tutorials

Facebook DeAuthorize callback URL and its response data.

Created 13 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 30 959 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 13 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 19 362 times
Version: 1.1
Category: Tips
Tags: facebook, user

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

Created 14 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 75 707 times
Version: 1.1
Category: Tips
Tags: csv, import, mysql

Displaying image in a CGridView column.

Created 14 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 79 127 times
Version: 1.1
Category: How-tos

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

Created 14 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 52 910 times
Version: 1.1
Category: How-tos
Tags: blob, image

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

Created 13 years ago by sirin k sirin k, updated 9 years ago by Maurizio Domba Cerin 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: 17 451 times
Version: 1.1
Category: Tips

Working with relational removals by yii2

Created 9 years ago by AndroideLP AndroideLP, updated 9 years ago by Jairus Martin Jairus Martin.

This tutorial shows you how to safely remove records between relationships.

0 0
2 followers
Viewed: 41 446 times
Version: 2.0
Category: Tutorials

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

Created 13 years ago by Luis Lobo Borobia Luis Lobo Borobia, updated 9 years ago by Luis Lobo Borobia 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: 18 212 times
Version: all
Category: Tips

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

Created 12 years ago by Gerhard Liebenberg Gerhard Liebenberg, updated 9 years ago by Gerhard Liebenberg 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: 40 212 times
Version: 1.1
Category: How-tos

Show raw SQL query

Created 9 years ago by darioo darioo, updated 9 years ago by darioo darioo.

Here's a quick tip to dump the SQL for query.

20 1
5 followers
Viewed: 266 342 times
Version: 2.0
Category: FAQs

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 14 years ago by Rutger Rutger, updated 9 years ago by Rutger Rutger.

This solution requires Yii 1.1.9 or above

12 0
16 followers
Viewed: 44 027 times
Version: 1.1
Category: How-tos

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

Created 13 years ago by Boaz Boaz, updated 9 years ago by mrun mrun.

Consider the following use case:

5 1
6 followers
Viewed: 28 813 times
Version: 1.1
Category: How-tos

Interactive mode command-line command for Yii1

Created 9 years ago by Trejder Trejder, updated 9 years ago by Trejder 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: 23 117 times
Version: 1.1
Category: How-tos

REST API and null values in XML

Created 9 years ago by marko60 marko60, updated 9 years ago by marko60 marko60.

I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the eleme...

0 0
0 follower
Viewed: 25 816 times
Version: 2.0
Category: Tips
Tags: null, REST, XML

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Created 9 years ago by Amjad Khan Amjad Khan, updated 9 years ago by Amjad Khan Amjad Khan.

Following is the table structure

tblgroups

CREATE TABLE IF NOT EXISTS `tblgroups` (
  `id` int(11) NOT NULL,
  `groupname` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive',
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

tblcontacts

4 2
7 followers
Viewed: 97 685 times
Version: 2.0
Category: Tutorials