Wiki articles

Showing 101-120 of 822 items.

Getting the Most out of APC for Yii

Created 12 years ago by Da:Sourcerer, updated 10 years ago by Da:Sourcerer.

In addition to the opcode cache, APC can also serve as a user cache for Yii via [CApcCache]. It should be noted that this will make APC's memory needs less predictable.

15 0
19 followers
Viewed: 49 062 times
Version: 1.1
Category: How-tos
Tags: apc, caching

Display an AJAX tree from your DB using CTreeView

Created 14 years ago by François Gannaz, updated 11 years ago by François Gannaz.

This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).

19 0
21 followers
Viewed: 72 003 times
Version: 1.1
Category: Tutorials

A Multi-Tenant Strategy using Yii and MySQL

Created 10 years ago by JFReyes, updated 10 years ago by CeBe.

This article describes an implementation of multi-tenancy using Yii and MySQL.

7 0
23 followers
Viewed: 48 010 times
Version: 1.1
Category: How-tos

How to implement cron in Yii 2

Created 9 years ago by hemc, updated 9 years ago by hemc.

In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.

3 0
13 followers
Viewed: 100 187 times
Version: 2.0
Category: How-tos
Tags: console, cron, yii2

Update CGridview row separately using ajax request

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

There are cases you want to update a record on CGridview directly

5 0
8 followers
Viewed: 25 063 times
Version: 1.1
Category: How-tos

A simple action for CJuiAutoComplete

Created 13 years ago by tydeas_dr, updated 12 years ago by Thiago Souza.

Simple as that. I have placed this action in my extension folder like:

15 1
19 followers
Viewed: 49 028 times
Version: 1.1
Category: Tips

Filter & Sort by Summary Data in GridView Yii 2.0

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

This wiki explains how to add summary data from related models into your Yii Framework 2.0 gridview with filtering and sorting by the summary columns.

5 2
48 followers
Viewed: 71 731 times
Version: 2.0
Category: Tutorials

Creating a CSS Driven Drop Down Menu using CMenu

Created 12 years ago by blindMoe, updated 12 years ago by blindMoe.

[CMenu] offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.

19 1
25 followers
Viewed: 98 615 times
Version: 1.1
Category: How-tos

Send mail using YiiMail extension

Created 11 years ago by RKA, updated 11 years ago by RKA.

Step1: Download the extension from path 'http://code.google.com/p/yii-mail/downloads/list' .

7 0
18 followers
Viewed: 118 438 times
Version: 1.1
Category: Tutorials
Tags: YiiMail

Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

Created 9 years ago by ThePr0f3550r, updated 9 years ago by YiiJeka.

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"

9 0
22 followers
Viewed: 131 864 times
Version: 2.0
Category: How-tos

How to automate timestamps in ActiveRecord models

Created 15 years ago by dalip, updated 11 years ago by Yang He.

There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here:

26 0
34 followers
Viewed: 178 712 times
Version: 1.1
Category: Tutorials
Tags:

Using counters with ActiveRecord

Created 12 years ago by davi_alexandre, updated 9 years ago by marcovtwout.

Let's say, for example, that you are developing a blog or some kind of CMS and you want to track the number of times each post was viewed (maybe to show a list of the most viewed ones).

11 1
17 followers
Viewed: 44 608 times
Version: 1.1
Category: Tips

Exporting CGridView results to CSV file

Created 12 years ago by RusAlex, updated 12 years ago by RusAlex.

A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.

6 3
18 followers
Viewed: 69 408 times
Version: 1.1
Category: Tutorials

YII2: Create console commands inside a module or extension

Created 8 years ago by MetaCrawler, updated 5 years ago by Luis Armando.

Here is a small guide how to get console commands running inside modules & extensions. For this guide I used a fresh yii2 basic application template.

8 0
6 followers
Viewed: 63 987 times
Version: 2.0
Category: Tutorials

Creating a database-driven hierarchical Structure combined with CMenu and superfish

Created 14 years ago by thyseus, updated 12 years ago by thyseus.

Note: Please also take a look at the newer EMenu extension. This works even better that the deprecated CDropDownMenu!

15 0
24 followers
Viewed: 62 972 times
Version: 1.1
Category: Tutorials
Tags: menu

Caching strategy

Created 10 years ago by darkheir, updated 10 years ago by CeBe.

Note: Before reading this wiki you should have read the caching part in the Yii guide

3 1
12 followers
Viewed: 11 793 times
Version: 1.1
Category: How-tos

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

Created 11 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

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.

8 2
11 followers
Viewed: 48 472 times
Version: 1.1
Category: How-tos
Tags: blob, image

Using phpseclib with Yii

Created 11 years ago by nkd, updated 11 years ago by nkd.

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...

0 0
6 followers
Viewed: 19 056 times
Version: 1.1
Category: How-tos
Tags: security

Escape from Default's Yii2 Delete Confirm Box

Created 9 years ago by Antonio Ramirez, updated 8 years ago by Cozumel.

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.

4 1
16 followers
Viewed: 45 052 times
Version: 2.0
Category: How-tos

Relations: BELONGS_TO versus HAS_ONE

Created 12 years ago by Steve Friedl, updated 10 years ago by Jorgee.

It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

56 0
35 followers
Viewed: 163 007 times
Version: 1.1
Category: FAQs