Wiki

Displaying 411-420 of 693 result(s).

Tarpit for bad bots

Created 2 years ago by mitherealHow-tos4 comments – viewed 5,091 times – ( +1 ) – version 1.1
I recently built a tarpit for bad bots.
tags: tarpit, bots

Troubleshooting Rights Extension

Created 2 years ago by junxiongTips6 comments – viewed 18,064 times – ( +8 ) – version 1.1
Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.

Database driven Cmenu

Created 2 years ago by twisted1919How-tos0 comments – viewed 20,964 times – ( +13 / -1 ) – version 1.1
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.

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Created 2 years ago by c@cbaTutorials35 comments – viewed 40,066 times – ( +29 ) – version 1.1
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen. Note that currently selected language is always a part of the URL, and thus available to the application through $_GET. You don't have to use sessions variables to keep track of the language if you don't want to.

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created 2 years ago by c@cbaTutorials10 comments – viewed 26,628 times – ( +15 ) – version 1.1
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this. We implement an event handler for the onBeginRequest event; as the name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.

Secure password hashing with bCrypt

Created 2 years ago by waitforitHow-tos3 comments – viewed 18,183 times – ( +9 ) – version 1.1
In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.

Update two models with one view

Created 2 years ago by sensorarioTips11 comments – viewed 31,369 times – ( +10 / -2 ) – version 1.1
Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).
tags: database, model, view, form

Change buttons on our CGridView extending yii

Created 2 years ago by sensorarioTips5 comments – viewed 23,201 times – ( +10 ) – version 1.1
In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

Use application on production/development environment without making changes

Created 2 years ago by ifdatticTips3 comments – viewed 30,441 times – ( +8 / -1 ) – version 1.1
I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

Managing constants easily

Created 2 years ago by briiC.lvTips4 comments – viewed 10,321 times – ( +4 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.