Wiki

Sorted by commentsX
Displaying 71-80 of 598 result(s).

Shrink Yii, help your IDE and speed up copying

Created 2 years ago by dckurushinTips11 comments – viewed 7,894 times – ( +9 / -9 ) – version 1.1
In this little tip, I will help you to cut Yii size for about half

How to set up Unicode

Created 5 years ago by MikeHow-tos10 comments – viewed 55,215 times – ( +18 ) – version 1.1
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
tags: i18n, unicode

Create / Generate PDF files with TCPDF plugin (Example to generate Table with TCPDF plugin)

Created 9 months ago by codesutraTutorials10 comments – viewed 16,994 times – ( +4 )
Few days ago i was playing with TCPF plugin to create a PDF files. Since i have checked few available extension and also checked some forum threads but still i dont get my expected result for PDF file.

A very easy way to setup yiic on WAMP server (without extra windows settings)

Created 9 months ago by KonApazTutorials10 comments – viewed 13,551 times – ( +5 / -1 )
Assuming that you have already install the wampserver on your windows.

Organize directories for applications with front-end and back-end

Created 4 years ago by qiangTutorials10 comments – viewed 55,310 times – ( +28 ) – version 1.1
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

Update two models with one view

Created 2 years ago by sensorarioTips10 comments – viewed 27,830 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

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

Created 2 years ago by c@cbaTutorials10 comments – viewed 23,591 times – ( +14 ) – 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.

Getting the Most out of APC for Yii

Created 2 years ago by Da:SourcererHow-tos10 comments – viewed 21,770 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Add information to Yii::app()->user by extending CWebUser

Created 4 years ago by atrandafirTutorials10 comments – viewed 83,694 times – ( +30 ) – version 1.1
This little tutorial explains a way how you can retrieve more parameters from Yii::app()->user by adding a component that extends CWebUser and retrieves the user information from database table named User.

Creating and updating model and its related models in one form, inc. image

Created about a year ago by BoazHow-tos10 comments – viewed 38,130 times – ( +5 / -3 ) – version 1.1
We start slowly and simple...