Wiki

Articles in category "how-tos", sorted by date (updated)X
Displaying 121-130 of 182 result(s).

Authenticating against phpass hashes with Yii

Updated about a year ago by Da:SourcererHow-tos18 comments – viewed 15,743 times – ( +25 )
The Portable PHP password hashing framework allows advanced password hashing offering increased security over simple MD5- or SHA1-hashed passwords. phpass is already in use in some larger projects such as WordPress (since v2.5), Drupal 7 and phpBB 3.

How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView

Updated about a year ago by c@cbaHow-tos2 comments – viewed 5,403 times – ( +9 )
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.

How to obtain a grammatically correct translation of the model name in giix-generated view files

Updated about a year ago by c@cbaHow-tos0 comments – viewed 4,969 times – ( +4 )
The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) . But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.

X-Sendfile - serve large static files efficiently from web applications

Updated about a year ago by Maurizio DombaHow-tos5 comments – viewed 23,032 times – ( +24 )
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

How to handle decimal separators (e.g comma instead of dot) for l18n

Updated about a year ago by jpabloHow-tos2 comments – viewed 6,259 times – ( +1 )
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

How to use a Widget as an Action Provider

Updated about a year ago by Antonio RamirezHow-tos8 comments – viewed 18,290 times – ( +22 )
As written on the API docs: An Action Provider Widget is a widget that has declared several actions by using its 'public static function actions()'. After, a Controller can easily import all its declared actions on its 'public function actions()'.
tags: Widgets, CAction

Tarpit for bad bots

Updated about a year ago by mitherealHow-tos4 comments – viewed 3,801 times – ( +1 )
I recently built a tarpit for bad bots.
tags: tarpit, bots

Database driven Cmenu

Updated about a year ago by twisted1919How-tos1 comment – viewed 10,709 times – ( +12 )
This is a simple example that will give you a base for designing a database driven menu system that will use CMenu to be rendered.

Rendering a view file in a console application

Updated about a year ago by TompiHow-tos1 comment – viewed 4,370 times – ( +2 )
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.

CPhpAuthManager - how it works, and when to use it

Updated about a year ago by François GannazHow-tos5 comments – viewed 12,321 times – ( +1 / -3 )
Before reading this article, you should first learn this How to setup RBAC with a php file