Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 161-170 of 341 result(s).

Alternative folder structure for a standard Yii app

Created 2 years ago by TrejderHow-tos4 comments – viewed 10,159 times – ( +5 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.

How to provide a fallback or mapping for translation messages?

Created about a year ago by schmunkHow-tos1 comment – viewed 4,156 times – ( +5 ) – version 1.1
Sometimes you want to use exisiting translations for locales, which do not directly match. An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.

Checking for "expired" sessions/logins on the client side

Created about a year ago by le_topHow-tos0 comments – viewed 16,283 times – ( +5 ) – version 1.1
Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

Yii2: Configuring different sessions for backend and frontend in Yii Advanced Application Template

Created 7 months ago by hrnairHow-tos2 comments – viewed 7,484 times – ( +5 ) – version 2.0
This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend.

Popup AJAX DialogBox without any extension

Created about a year ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 15,185 times – ( +8 / -1 )
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.

Yet another implementation of CPhpAuthManager.

Created 2 years ago by seenivasanHow-tos3 comments – viewed 9,455 times – ( +8 / -1 ) – version 1.1
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at main application level to controller level. This way we have pulverised auth data for entire site into smaller units. Finally we are going to look at couple of examples.

How to write a simple application component

Created 4 years ago by zaccariaHow-tos5 comments – viewed 45,147 times – ( +20 / -7 ) – version 1.1
An application component is a confortable way for share information among all component of the application

Add Beautiful Radio/Checkbox Buttons To Grid

Created about a year ago by waterloomattHow-tos1 comment – viewed 17,751 times – ( +10 / -2 ) – version 1.1
This is a tutorial on how to create slick looking status buttons to update a model's status via a grid. Note** This tutorial uses Yii Bootstrap for styling.

Date Picker by examples

Created about a year ago by InterboyHow-tos6 comments – viewed 60,825 times – ( +10 / -2 ) – version 1.1
CJuiDatePicker displays a datepicker. CJuiDatePicker encapsulates the JUI datepicker plugin.

Show captcha after <N> unsuccessfull attempts

Created 2 years ago by zitterHow-tos7 comments – viewed 16,427 times – ( +14 / -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).