Wiki

Sorted by commentsX
Displaying 131-140 of 765 result(s).

Using phpseclib with Yii

Created 3 years ago by nkdHow-tos8 comments – viewed 8,490 times – ( +2 ) – version 1.1
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

Escape from Default's Yii2 Delete Confirm Box

Created about a year ago by Antonio RamirezHow-tos8 comments – viewed 13,484 times – ( +8 ) – version 2.0
If you started playing with Yii2's new GridView, you will soon realize that some things have improved quite a lot, but I am sure its going to be a bit confusing at first glance when you try to modify certain javascript behaviors like for example, its delete confirmation dialog box.

Syncing sessions between Yii and KCFinder

Created 3 years ago by Thanasis FotisHow-tos8 comments – viewed 7,237 times – ( +2 ) – version 1.1
Info: As KCFinder's documentation mentions, if your application (Yii in our case) session handling is using the PHP environment configuration - meaning no change in session handling at all, then no change is needed also on KCFinder side to be able to use this session and thus have this simple interface between your Yii webapp and KCFinder. If that's your case then you probably need not read the rest of this article but rather just make sure that before a user attempts to upload or browse your server a session variable is already set for him (or her) with his specific configuration already waiting for KCFinder there. What can this session interface be useful for? For example, for having per-user upload directory. You could have uploadURL variable established in the session variable to contain the user's id. When an upload or browse use case will occur, the client side will trigger the KCFinder completely decoupled from the Yii application. Yet, since you've already synced your user-specific-configuration with KCFinder via the session, KCFinder will pick it up and use it.
tags: File upload

An easy way to use escopes and CActiveDataProvider

Created 4 years ago by Rafael GarciaTips8 comments – viewed 26,023 times – ( +1 / -1 ) – version 1.1
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

Single table inheritance

Created 4 years ago by samdarkHow-tos8 comments – viewed 30,081 times – ( +41 ) – version 1.1
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.

Integrating HybridAuth directly into Yii without an extension

Created 2 years ago by biz devHow-tos8 comments – viewed 34,024 times – ( +14 ) – version 1.1
This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

Using CJuiDialog to edit rows in a CGridView

Created 4 years ago by Russell EnglandTips8 comments – viewed 31,281 times – ( +4 / -1 ) – version 1.1
I have a CGridView with a list of clients/events. For each row (EventClient) I wanted a quick edit dialog.

Using Grunt for deploying client scripts

Created 2 years ago by Chris83How-tos8 comments – viewed 14,858 times – ( +11 ) – version 1.1
For a long time I have struggled to find a suitable tool for doing server tasks such as compiling LESS files, concatenating and minifying of JavaScript files and copying the minified JavaScript files. While most of these tasks can be done with Yii extensions I would still not recommend using them because it requires you to include these extensions in your project, and therefore also deploying them in your production environment.

Integrating Wordpress and Yii: yet another approach

Created 4 years ago by goncinHow-tos8 comments – viewed 22,524 times – ( +8 / -2 ) – version 1.1
It seems many people is trying to make Wordpress and Yii work together. I got stuck with the same problem, but now I think I have achieved doing it, after a lot of hard thinking and many work hours spent.

[Updated] How to create & call custom global function in whole application?

Created about a year ago by Rohit SutharTutorials8 comments – viewed 9,639 times – ( +5 / -2 ) – version 1.1
In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.