Once you have installed and configured the rights extension in your application, you can change the table name from 'User' to any table name you want and similarly for 'username' column to any other column name.
Once you have installed and configured the rights extension in your application, you can change the table name from 'User' to any table name you want and similarly for 'username' column to any other column name.
My CMS supports multiple sites using one code base therefore the db connection can only be configured by detecting the site's domain.
This wiki shows how to get the geolocation info of the client using another server API It could be write also as extension but there are a lots of APIs that change the below code So, I wrote the below code that works for one of them (using www.geoplugin.net)
In some cases, we have to limit the number of page views for the guests users. Yii provide an efficient method to get this.
I recently built a tarpit for bad bots.
To replace the application component 'format', which is registered by CApplication by default, you can put this in your application 'components' config:
In order to get your Yii logs into Heroku's logs, you have to work a little bit of magic. You'll need to modify the boot.sh script and add the following two lines: ~~~ touch /app/apache/logs/app_log tail -F /app/apache/logs/app_log & ~~~ This will set up the log and tail it so that when you request "heroku logs", this log is included.
To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.
I needed all messages with their translation into javascript. This is my solution:
hello guys now i am going to show you how to Reuse File Upload Code across multiple projects.
by: Christian Salazar (bluyell, @salazachris74, christiansalazarh@gmail.com)
The number of languages supported by the standard CJuiDatePicker implementation is limited and the language code to use is different from the application's language code. This Wiki shows how to improve on that.
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $...
Note: Before reading this wiki you should have read the caching part in the Yii guide
Taking futher the idea from Piotr Masełkowski - http://www.yiiframework.com/extension/elipsum/ here's how to generate multilanguage Lorem Ipsum text. This example uses English and Bulgarian sample paragraphs. Create a class in /protected/components/LoremIpsum.php. Wall of text incoming wohoo...
This behavior enable you to command the RBAC via console. This avoids you to install a entire rbac graphic toolkit to set up some rules in the rbac, maybe you are running inside a ssh console.
PHPIDS é conhecido projeto que pode ser visto em php-ids.org.
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.