Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 1-10 of 154 result(s).

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Updated 14 days ago by alraziTips7 comments – viewed 42,101 times – ( +39 / -5 ) – version 2.0
With Bootstrap 3 and its inbuilt support in Yii Framework 2.0, you would see quite some new ways of creating HTML markup and styling your site. However, with version 3 of Bootstrap, tooltips and popover are not activated by default on your elements. Assuming you have activated the Bootstrap 3 tooltip plugin - how do you easily enable display of tooltips/popovers across your site?

Yii2 Report Grid

Updated 6 months ago by Chris BackhouseTips0 comments – viewed 8,580 times – ( +3 ) – version 2.0
There are some very advanced grids in the Yii2 community, specifically Kartik's amazing gridview extensions but they all designed for interactive screen use.
tags: GridView, report

An important tip when you are using CArrayDataProvider.

Updated 7 months ago by Maurizio Domba CerinTips0 comments – viewed 13,558 times – ( +8 / -2 ) – version 1.1
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 error like “yourmodel.id is not defined”.

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

Updated 7 months ago by Maurizio Domba CerinTips0 comments – viewed 8,242 times – ( +4 / -1 ) – version 1.1
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 with this situation.But if you want to forcefully logout the user from your application if he is logged out from his facebook account means you can try this example.This example uses periodic ajax calls to facebook's graph api to check whether the user is logged in or not.
tags: facebook, user

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

Updated 7 months ago by Maurizio Domba CerinTips6 comments – viewed 51,031 times – ( +7 / -1 ) – version 1.1
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.
tags: csv, mysql, import

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

Updated 7 months ago by Maurizio Domba CerinTips0 comments – viewed 8,774 times – ( +2 / -1 ) – version 1.1
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.

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

Updated 8 months ago by Luis Lobo BorobiaTips0 comments – viewed 6,931 times – ( +2 / -1 ) – version all
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.

REST API and null values in XML

Updated about a year ago by marko60Tips0 comments – viewed 8,612 times – ( -1 ) – version 2.0
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 element is taken to represent a null value, but this may create problem with some parsers.
tags: REST, XML, null

A universal model attribute for its synthetic representation

Updated about a year ago by Alexandre RodichevskiTips2 comments – viewed 4,776 times – ( -1 ) – version 2.0
It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.

Boost composer-asset-plugin update speed

Updated about a year ago by samdarkTips5 comments – viewed 12,082 times – ( +5 / -1 ) – version 2.0
If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.