Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 141-150 of 309 result(s).

Alternative folder structure for a standard Yii app

Created about a year ago by TrejderHow-tos4 comments – viewed 8,097 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 implement an event and attach it in a behavior

Created about a year ago by seb7How-tos0 comments – viewed 9,990 times – ( +5 ) – version 1.1
This page explains how to implement an event and catch that event in a behavior.
tags: event, behavior

How to get & store Last Login DateTime in database?

Created about a month ago by Rohit SutharHow-tos0 comments – viewed 2,220 times – ( +5 ) – version 1.1
In this wiki I will show how could be store last login date & time in database. First we need a field LastLoginTime (Type must be datetime). this field store a user login detalis (like - Date & Time).

How to provide a fallback or mapping for translation messages?

Created about a year ago by schmunkHow-tos1 comment – viewed 3,344 times – ( +5 )
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 12,714 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.

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

Created 2 years ago by sirin kHow-tos6 comments – viewed 21,008 times – ( +8 / -1 ) – version 1.1
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.
tags: blob, image

Include Yii framework in a Joomla module

Created 3 years ago by zaccariaHow-tos7 comments – viewed 19,840 times – ( +8 / -1 ) – version 1.1
Delploying anything using joomla's framework is quite difficult. The framework don't provide a good MVC structure and the documentation is very poor.

Yet another implementation of CPhpAuthManager.

Created about a year ago by seenivasanHow-tos3 comments – viewed 8,116 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.

Show captcha after <N> unsuccessfull attempts

Created 2 years ago by zitterHow-tos7 comments – viewed 13,897 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).

How to write a simple application component

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