Wiki

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

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

Created 3 years ago by c@cbaHow-tos3 comments – viewed 10,200 times – ( +9 ) – version 1.1
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.

Using Yii with PHP 5.4 built-in webserver instead of Apache

Created 3 years ago by samdarkHow-tos1 comment – viewed 10,185 times – ( +21 ) – version 1.1
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it:

Upload files in Yii2 with MongoDb and GridFs

Created about a year ago by edoardo849How-tos3 comments – viewed 10,142 times – ( +8 ) – version 2.0
Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

Simple Web APIs for your Yii App

Created about a year ago by shivHow-tos4 comments – viewed 9,973 times – ( +2 / -2 ) – version 1.1
Its very common now-a-days to have Mobile app for web apps. For Mobile apps we need web APIs to fetch data or even post/update on web. We found a very simple method to make such interface. Mobile App can call plain get or post request and receive data back in JSON format. JSON is relatively easy for mobile app to handle while plain standard GET/POST request for easy for Web server to handle. This mixed approach saves lot of time on server side. We not really need to handle actual REST requests and still be able to exchange data between web and mobiles or ajax java-scripts or even node.js.
tags: API, JSON

How to: use github for download yii, create new app, and store our modules or extensions.

Created 2 years ago by sensorarioHow-tos1 comment – viewed 9,948 times – ( +8 ) – version 1.1
Yesterday I've written a module for myself. Just an experiment. When I was feeling satisfied, I've created a repository on github, and pushed my code. My module and yii are on github. So I'll show you a "new" way to start our yii projects.
tags: github, git

Alternative folder structure for a standard Yii app

Created 2 years ago by TrejderHow-tos4 comments – viewed 9,882 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 "masquerade" a non-required form element as 'required' one (in the view only)

Created 2 years ago by BoazHow-tos2 comments – viewed 9,865 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: Use token based authentication

Created about a year ago by le_topHow-tos2 comments – viewed 9,810 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 Module based Login

Created about a year ago by turiHow-tos1 comment – viewed 9,756 times – ( +3 ) – version 1.1
Lets say we have 3 modules (customer, user, admin) in an application and we need, separate logins for each module.

How To : Create Forgot Password in Yii (Sending Email to Reset Password)

Created 8 months ago by ruderbytesHow-tos2 comments – viewed 9,628 times – version 1.1
Assalamualaikum wr.wb Hello yii people i'm Muhammad Fahmi Azain this is tutorial about forgot password in yii framework, and i'm sorry if it does not comply with code standards yii. okay let's begin