Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 191-200 of 350 result(s).

HOW TO: Use token based authentication

Created 2 years ago by le_topHow-tos2 comments – viewed 15,837 times – ( +4 ) – version 1.1
After reading the other wiki article regarding token based access, I thought that it might be interesting to share my method.

How to create a criteria condition for a multiple value text search i.e a "LIKE IN"

Created 2 years ago by tophHow-tos2 comments – viewed 29,755 times – ( +1 / -1 ) – version 1.1
This is a shortcut for adding a text search for multiple values i.e.

Simple Multiple Environment Setup with Default Yii Installation

Created 2 years ago by Ibrar TuriHow-tos2 comments – viewed 6,615 times – ( +4 ) – version 1.1
After installing Yii basic application on our systems, most of the time we want to have multiple environment such as local, dev and live setup. Most of the times when we want to make changes to configuration file, we have to over-write configurations file for each environment.

Configuring Yii to run on both Windows and OSX

Created 2 years ago by trondHow-tos2 comments – viewed 4,667 times – ( +2 ) – version 1.1
If you develop your Yii project on both Windows and Mac, there can be a problem setting up the configuration unless the configurations for both system are identical. On my machines I have the following configurations:
tags: config

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 2 years ago by Kartik VHow-tos2 comments – viewed 24,987 times – ( +38 / -4 ) – version 2.0
In Yii 2.0, the yii widgets that use Twitter Bootstrap CSS & JS directly, are part of the yii2-bootstrap extension, starting with yii/bootstrap namespace. For customizing bootstrap extension specific widget assets, you could configure your own assets (CSS/JS) using the new Yii Asset Manager in your Yii Config file. Something like:

MongoDb's embedded documents mapping for ActiveRecord in Yii2

Created 2 years ago by edoardo849How-tos2 comments – viewed 10,085 times – ( +6 ) – version 2.0
You are working with MongoDb and you have embedded documents in your collection that you want to easily map in your Model for CRUD operations.

Simple example for language translation

Created 2 years ago by RKAHow-tos2 comments – viewed 18,366 times – ( +1 ) – version 1.1
Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.
tags: yii, i18n

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 3 years ago by BoazHow-tos2 comments – viewed 12,674 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

How to hide index.php on Microsoft Windows Server with IIS7

Created 3 years ago by GiulianoHow-tos2 comments – viewed 18,274 times – ( +10 ) – version 1.1
I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.

How to send emails using SMTP

Created 2 years ago by robregonmHow-tos2 comments – viewed 38,190 times – ( +7 ) – version 2.0
Follow @robregonm
tags: yii2, email, mail, mailer, smtp