Wiki articles in category How-tos

Showing 121-140 of 373 items.

Login Form With email or Whatever

Created 10 years ago by nabil abdouali, updated 10 years ago by nabil abdouali.

Here is my solution to login with email or anything else This update works with database mysql You must generate the user model with GII

1 2
2 followers
Viewed: 31 783 times
Version: 1.1
Category: How-tos

How to implement cron in Yii 2

Created 10 years ago by hemc, updated 10 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 270 times
Version: 2.0
Category: How-tos
Tags: console, cron, yii2

Select2 Infinite Scroll With Remote Data in Yii

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

I was able to set up the infinite scroll of select2 in Yii. I am glad to share it with you. The demo and source code can be found here. However, select2 for Yii can be found here which uses a widget.

3 0
5 followers
Viewed: 21 473 times
Version: 1.1
Category: How-tos

How to Enhance a CGridView

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

by: Christian Salazar (bluyell, @salazachris74, christiansalazarh@gmail.com)

2 0
5 followers
Viewed: 11 507 times
Version: 1.1
Category: How-tos

Safely checking if a model class exists (without exploding)

Created 10 years ago by Boaz, updated 10 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 629 times
Version: 1.1
Category: How-tos

Simple example for language translation

Created 10 years ago by RKA, updated 10 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 455 times
Version: 1.1
Category: How-tos
Tags: i18n, Yii

Attaching multiple event handlers to onBeginRequest

Created 10 years ago by Boaz, updated 10 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 485 times
Version: 1.1
Category: How-tos

How to limit number of guest page views

Created 10 years ago by PeRoChAk, updated 10 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 979 times
Version: 1.1
Category: How-tos

MongoDb's embedded documents mapping for ActiveRecord in Yii2

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

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

4 0
7 followers
Viewed: 28 110 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 10 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 395 times
Version: 1.1
Category: How-tos

Email by YiiMailer, Call Outlook, IMAP

Created 10 years ago by Scott_Huang, updated 10 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 424 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 6 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 677 times
Version: 2.0
Category: How-tos

Configuring Yii to run on both Windows and OSX

Created 10 years ago by trond, updated 10 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 577 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 10 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 779 times
Version: 1.1
Category: How-tos

How to apply a layout to an AJAX update

Created 10 years ago by trond, updated 10 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 459 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 187 times
Version: 2.0
Category: How-tos

How to implement magento cron on yii

Created 10 years ago by Ankit Modi, updated 10 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 715 times
Version: 1.1
Category: How-tos

How to create Module based Login

Created 10 years ago by Ibrar Turi, updated 10 years ago by CeBe.

Lets say we have 3 modules (customer, user, admin) in an application and we need, separate logins for each module.

1 0
7 followers
Viewed: 21 763 times
Version: 1.1
Category: How-tos

Simple Multiple Environment Setup with Default Yii Installation

Created 10 years ago by Ibrar Turi, updated 10 years ago by CeBe.

After installing Yii basic application on our systems, most of the time we want to have multiple environment such as local, dev and live setup. Most of the times when we want to make changes to configuration file, we have to over-write configurations file for each environment.

2 0
8 followers
Viewed: 16 773 times
Version: 1.1
Category: How-tos

Simple Web APIs for your Yii App

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

Its very common now-a-days to have Mobile app for web apps. For Mobile apps we need web APIs to fetch data or even post/update on web. We found a very simple method to make such interface. Mobile App can call plain get or post request and receive data back in JSON format. JSON is relatively easy for mobile app to handle while plain standard GET/POST request for easy for Web server to handle. This...

1 2
10 followers
Viewed: 32 574 times
Version: 1.1
Category: How-tos
Tags: API, JSON