Wiki articles

Showing 241-260 of 822 items.

Safely checking if a model class exists (without exploding)

Created 9 years ago by Boaz, updated 9 years ago by CeBe.

While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

1 0
2 followers
Viewed: 17 463 times
Version: 1.1
Category: How-tos

Making a CGridView to keep the selection between page changes

Created 10 years ago by bluyell, updated 9 years ago by CeBe.

You may find this usefull when you discover your CGridView lost the selection after an update or after a page change, nicely i have build a new extension to cover this problem in a very easy way.

2 0
3 followers
Viewed: 12 624 times
Version: 1.1
Category: Tutorials

CSqlDataProvider in CGridView

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

In this wiki I will show how could use a CSqlDataProvider in CGridView with specific features

3 0
9 followers
Viewed: 35 777 times
Version: 1.1
Category: Tutorials

Simple example for language translation

Created 10 years ago by RKA, updated 9 years ago by CeBe.

Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.

1 0
5 followers
Viewed: 37 378 times
Version: 1.1
Category: How-tos
Tags: i18n, Yii

Attaching multiple event handlers to onBeginRequest

Created 10 years ago by Boaz, updated 9 years ago by CeBe.

There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).

1 0
2 followers
Viewed: 15 437 times
Version: 1.1
Category: How-tos

Auto-update denormalized attributes with MongoDb and Yii2

Created 10 years ago by edoardo849, updated 9 years ago by CeBe.

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3 followers
Viewed: 17 564 times
Version: 2.0
Category: Tips

How to limit number of guest page views

Created 10 years ago by PeRoChAk, updated 9 years ago by CeBe.

In some cases, we have to limit the number of page views for the guests users. Yii provide an efficient method to get this.

2 0
5 followers
Viewed: 8 925 times
Version: 1.1
Category: How-tos

MongoDb's embedded documents mapping for ActiveRecord in Yii2

Created 10 years ago by edoardo849, updated 9 years ago by CeBe.

suppose to have in Mongo a collection "user" like:

4 0
7 followers
Viewed: 28 024 times
Version: 2.0
Category: How-tos

How to create a simple logout link in the view?

Created 10 years ago by mi.sarah, updated 9 years ago by CeBe.

Here you learn to create and set a simple ahref-link to logout the current user.

0 2
1 follower
Viewed: 47 261 times
Version: 1.1
Category: How-tos

Image Puzzle Game

Created 10 years ago by nachi, updated 9 years ago by CeBe.

I have developed a extension for a image puzzle game. You can use your own images and you can also customize how many rows and columns for the image. It can be used in commercial sites. I just needed your thoughts on the game.

2 0
4 followers
Viewed: 9 373 times
Version: 1.1
Category: Others
Tags: game, image, puzzle

Email by YiiMailer, Call Outlook, IMAP

Created 10 years ago by Scott_Huang, updated 9 years ago by CeBe.

In Yii community we have lots of extention can send emails, such as YiiMailer and Swift and so on, or even IMAPI, thanks for team contribution. However, sometimes, in the intranet enviroment, the program cannot run successfully since SMTP /IMAP port been banded. So you need to seek other ways. The most simple way is call outlook as COM.

0 0
6 followers
Viewed: 19 350 times
Version: 1.1
Category: How-tos

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 10 years ago by Kartik V, updated 5 years ago by CeBe.

An example of customizing the Yii GridView is mentioned here. You can easily override Bootstrap or other styling defaults by changing the GridView default options.

4 2
39 followers
Viewed: 55 464 times
Version: 2.0
Category: How-tos

CGridView customized CCheckBoxColumn

Created 10 years ago by chandran, updated 9 years ago by CeBe.

Hi friends,

3 0
6 followers
Viewed: 19 796 times
Version: 1.1
Category: Tips

Configuring Yii to run on both Windows and OSX

Created 10 years ago by trond, updated 9 years ago by CeBe.

If you develop your Yii project on both Windows and Mac, there can be a problem setting up the configuration unless the configurations for both system are identical. On my machines I have the following configurations:

1 0
4 followers
Viewed: 12 503 times
Version: 1.1
Category: How-tos
Tags: config

Upload image and content using AJAX and Store it in different table

Created 10 years ago by Selvakumar Kaliyappan, updated 9 years ago by CeBe.

var formData = new FormData($("#post-form")[0]);
$.ajax({
    url: '<?php echo Yii::app()->createUrl("forumPost/uploadPost"); ?>',
    type: 'POST',
    data: formData,
    datatype:'json',
    // as...
1 0
5 followers
Viewed: 72 698 times
Version: 1.1
Category: How-tos

How to apply a layout to an AJAX update

Created 10 years ago by trond, updated 9 years ago by CeBe.
  1. The Main template holds the header, main navigation and footer
  2. One or more layout files holds the column setup, sub navigation etc.
  3. The view files hold the actual page content.
1 0
4 followers
Viewed: 16 394 times
Version: 1.1
Category: How-tos
Tags: AJAX, views

Upload files in Yii2 with MongoDb and GridFs

Created 10 years ago by edoardo849, updated 4 years ago by pceuropa.

Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

6 0
6 followers
Viewed: 36 059 times
Version: 2.0
Category: How-tos

Filter & Sort by calculated/related fields in GridView Yii 2.0

Created 10 years ago by Kartik V, updated 5 years ago by softark.

This wiki explains how to add calculated fields into your Yii Framework 2.0 gridview with filtering and sorting.

13 3
64 followers
Viewed: 248 847 times
Version: 2.0
Category: Tutorials

How to implement magento cron on yii

Created 10 years ago by Ankit Modi, updated 9 years ago by CeBe.

Hi Friends, First I would to say sorry but I am not very familiar to magento so after a 1 week spend I will implement the magneto cron functionality on yii I hope it's may be some helpful.

0 0
3 followers
Viewed: 20 661 times
Version: 1.1
Category: How-tos

Saving CGridView filter

Created 10 years ago by sefburhan, updated 9 years ago by CeBe.

In this tutorial we will try to save cgridview filter(search) with title etc. basically we want to save two forms data i.e one represents filters and other data about filters like title, description etc. You can define your own structure for filter saving table here are some basic steps

1 0
31 followers
Viewed: 13 385 times
Version: 1.1
Category: Tutorials