Articles in category "how-tos", sorted by commentsX
Displaying 61-70 of 354 result(s).

Using phpseclib with Yii

Created 4 years ago by nkdHow-tos8 comments – viewed 9,498 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 2 years ago by Antonio RamirezHow-tos8 comments – viewed 20,312 times – ( +9 / -1 ) – 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 8,366 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

Single table inheritance

Created 5 years ago by samdarkHow-tos8 comments – viewed 34,007 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 3 years ago by biz devHow-tos8 comments – viewed 37,514 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 Grunt for deploying client scripts

Created 3 years ago by Chris83How-tos8 comments – viewed 16,698 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 5 years ago by goncinHow-tos8 comments – viewed 24,281 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.

Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

Created 2 years ago by ThePr0f3550rHow-tos8 comments – viewed 74,568 times – ( +16 / -1 ) – version 2.0
Yii2 comes with a charming twitter bootstrap version 3. But if it is less, then you can integrate with web templates that you like. One example is wonderfull template "adminLTE"
tags: yii2, theme, adminLTE

multiple CActiveDataProviders in one CGridView

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos7 comments – viewed 20,208 times – ( +8 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

Reference: Model rules validation

Created 6 years ago by krillzipHow-tos7 comments – viewed 694,256 times – ( +126 ) – version 1.1
This is a reference to be used for Model rule validation and is compiled from the Yii documentation and code. The purpose is to have all the information gathered in one place instead of scattered. This reference is not an intro. See The Definitive Guide to Yii, Declaring Validation Rules for a tutorial.