Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 151-160 of 350 result(s).

Configuring different sessions for backend and frontend in Yii advanced app

Created 2 years ago by Kartik VHow-tos2 comments – viewed 19,877 times – ( +46 ) – version 2.0
After you have setup your Yii2 advanced application, you now have setup your user authentication for both frontend and backend. However, if you have first logged into frontend, and try to access backend from the same client machine, you see no login screen, but find yourself automatically logged in.

Image resize on the fly

Created 3 years ago by TpoxaHow-tos4 comments – viewed 19,816 times – ( +4 ) – version 1.1
For example have folder with image resources which are public accessible
tags: yii, image-resize

A Multi-Tenant Strategy using Yii and MySQL

Created 2 years ago by JFReyesHow-tos9 comments – viewed 19,733 times – ( +10 ) – version 1.1
This article describes an implementation of multi-tenancy using Yii and MySQL.

defaultScope

Created 3 years ago by Gerhard LiebenbergHow-tos4 comments – viewed 19,494 times – ( +5 / -1 ) – version 1.1
This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().

Show captcha after <N> unsuccessfull attempts

Created 4 years ago by zitterHow-tos7 comments – viewed 19,474 times – ( +15 / -4 ) – version 1.1
In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).

Multilanguage and SEO friendly

Created 2 years ago by InterboyHow-tos1 comment – viewed 19,268 times – ( +5 ) – version 1.1
In your application configuration (protected/config/main.php), set the sourceLanguage parameter to English:

Load the Yii-Bootstrap Extension on Specific Actions

Created 3 years ago by chuntleyHow-tos5 comments – viewed 19,258 times – ( +10 ) – version 1.1
A big problem I've hit with the Yii-Bootstrap extension is that all AJAX requests are initializing Bootstrap because of preload. This is a huge waste of resources, especially when using AJAX-based file uploaders that split the file into chunks. Large file uploads using that method could be initializing bootstrap hundreds of times.
tags: bootstrap, filter

multiple CActiveDataProviders in one CGridView

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos7 comments – viewed 19,166 times – ( +8 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

pass variables or content block from view file to layout file

Created 3 years ago by yiqing95How-tos0 comments – viewed 18,870 times – ( +2 ) – version 1.1
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

How to use Smarty renderer in Yii

Created 5 years ago by dongbetaHow-tos2 comments – viewed 18,868 times – ( +4 ) – version 1.1
At first, create a class named SmartyRenderer under application/components or any directory you want.
tags: smarty, renderer