Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 41-50 of 182 result(s).

Using phpseclib with Yii

Created 7 months ago by nkdHow-tos6 comments – viewed 3,324 times – ( +2 )
I installed phpseclib because I needed to do some AES encryption in my project. After all the hassle of installing php lib, I found out that Yii already has a security module (securityManager). I finally decided to keep using phpseclib because it has one big advantage over Yii securityManager module, it does not requite mcrypt to be installed in the phpserver!
tags: security

How to generate Yii-like Documentation

Created 2 years ago by AsgarothHow-tos6 comments – viewed 15,230 times – ( +42 )
Something a good application cant miss is documentation, and what would be better than some nice formatted HTML documentation that can be auto-generated from your code, we know several tools that already do this like phpDocumentor, but today we are introducing Yii Docs Generator which is a modification of the code that Yii itself uses to generate its documentation, thank phpnode for this wonderful work.
tags: doc

Single table inheritance

Created about a year ago by samdarkHow-tos6 comments – viewed 13,644 times – ( +31 )
Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field of the same table.

Model password confirmation field.

Created about a year ago by twisted1919How-tos5 comments – viewed 24,301 times – ( +7 )
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.

Displaying image in a CGridView column.

Created about a year ago by sirin kHow-tos5 comments – viewed 22,640 times – ( +12 / -1 )
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
tags: CGridView, image

Storing your images in your table's blob field and displaying that stored images.

Created about a year ago by sirin kHow-tos5 comments – viewed 10,821 times – ( +8 / -1 )
He im giving you a very simple example ie how you can store an image to your blob field in a table.Hope you already familiar with the normal image upload.
tags: blob, image

CSV Export

Created 11 months ago by JohnPollardHow-tos5 comments – viewed 5,569 times – ( +4 )
I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.
tags: csv, export

Moving project code outside of webroot (plus multiple project support)

Created 2 years ago by Steve FriedlHow-tos5 comments – viewed 24,234 times – ( +22 / -1 )
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
tags: config, security

X-Sendfile - serve large static files efficiently from web applications

Created 2 years ago by Maurizio DombaHow-tos5 comments – viewed 22,974 times – ( +24 )
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

Additional form data with XUpload

Created 7 months ago by AsgarothHow-tos5 comments – viewed 10,034 times – ( +5 )
In this article you'll learn how to send additional form data when uploading files using XUpload widget