Wiki articles in category How-tos

Showing 1-20 of 373 items.

How to email error logs to developer on Yii2 apps

Created 3 years ago by Gabriel A. López López.

Logging is a very important feature of the application. It let's you know what is happening in every moment. By default, Yii2 basic and advanced application have just a \yii\log\FileTarget target configured.

2 0
4 followers
Viewed: 61 137 times
Version: 2.0
Category: How-tos
Tags: email, log

How to redirect all emails to one inbox on Yii2 applications

Created 3 years ago by Gabriel A. López López.

\yii\mail\BaseMailer::useFileTransport is a great tool. If you activate it, all emails sent trough this mailer will be saved (by default) on @runtime/mail instead of being sent, allowing the devs to inspect thre result.

6 0
4 followers
Viewed: 103 247 times
Version: 2.0
Category: How-tos

How to Create and Use Validator Using Regular expressions

Created a year ago by aayushmhu.

There are Multiple Ways to Create a Validator But here we use Regular Expression or JavaScript Regular Expression or RegExp for Creation Validators. In this article, we will see the most Frequently Used Expression

4 0
1 follower
Viewed: 75 884 times
Version: 2.0
Category: How-tos

How to add Open Graph and Twitter Card tags to Yii2 website.

Created 3 years ago by Gabriel A. López López.

OpenGraph and Twitter Cards are two metadata sets that allow to describe web pages and make it more understandable for Facebook and Twitter respectively.

2 0
3 followers
Viewed: 59 431 times
Version: 2.0
Category: How-tos

Using the jamselect widget with min and max values

Created 13 years ago by got 2 doodle, updated 13 years ago by wei.

The keywords will be stored in a text field in a comma delimited format. The keywords will be created by the site administrator.

2 0
1 follower
Viewed: 18 700 times
Version: 1.1
Category: How-tos

Implementing cron jobs with Yii

Created 13 years ago by samdark, updated 13 years ago by samdark.

There are two ways to run a cron job:

27 2
27 followers
Viewed: 114 003 times
Version: 1.1
Category: How-tos
Tags: cli, cron

Using recaptchlib in your projects

Created 13 years ago by Antonio Ramirez, updated 13 years ago by Antonio Ramirez.

It is good when someone writes extensions for us but trust, sometimes we forget about other approaches that, if we know the library, we shouldn't forget.

5 0
4 followers
Viewed: 15 293 times
Version: 1.1
Category: How-tos

Using the jqueryslidemenu plugin with CMenu

Created 13 years ago by Antonio Ramirez, updated 13 years ago by pc131.

Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.

18 1
8 followers
Viewed: 41 881 times
Version: 1.1
Category: How-tos

Using setFlash for displaying various kind of messages

Created 13 years ago by Trejder, updated 13 years ago by Trejder.

In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.

5 4
6 followers
Viewed: 91 816 times
Version: 1.1
Category: How-tos

How to customize error handling in console-mode applications

Created 13 years ago by Steve Friedl, updated 13 years ago by Steve Friedl.

One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor th...

3 0
4 followers
Viewed: 21 073 times
Version: 1.1
Category: How-tos

How to log and debug variables using CWebLogRoute

Created 13 years ago by Antonio Ramirez, updated 13 years ago by Antonio Ramirez.

Yii comes with a set of powerful classes for logging. If you have read the documentation about logging messages, you have noticed that we can actually decide which messages we wish to log. And this is exactly what we are going to do, using [CWebLogRoute](http://www.yiiframework.com/doc/api/1.1/CWebLog...

13 0
20 followers
Viewed: 78 309 times
Version: 1.1
Category: How-tos
Tags: Logging

Using standard filters in CGridView custom fields

Created 13 years ago by GOsha, updated 13 years ago by jwerner.

In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0.
So we do the usual thing:

<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
    'name'=>'...
14 0
16 followers
Viewed: 74 065 times
Version: 1.1
Category: How-tos

Setting and getting systemwide static parameters

Created 13 years ago by Steve Friedl, updated 13 years ago by Steve Friedl.

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

11 0
12 followers
Viewed: 146 214 times
Version: 1.1
Category: How-tos
Tags: config

Mais segurança em suas aplicações com Yii e PHPIDS

Created 13 years ago by Rafael Garcia, updated 13 years ago by Rafael Garcia.

PHPIDS é conhecido projeto que pode ser visto em php-ids.org.

2 1
3 followers
Viewed: 12 444 times
Version: 1.1
Category: How-tos

Enforcing "You must agree" requirements in forms

Created 13 years ago by Steve Friedl, updated 13 years ago by Steve Friedl.

Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:

25 0
17 followers
Viewed: 33 279 times
Version: 1.1
Category: How-tos

More security in your applications with Yii and PHPIDS

Created 13 years ago by Rafael Garcia, updated 13 years ago by Gustavo.

PHPIDS is a well known project that can be found in php-ids.org.

6 0
14 followers
Viewed: 20 013 times
Version: 1.1
Category: How-tos

Single sign on across multiple subdomains

Created 13 years ago by ianaré, updated 13 years ago by ianaré.

This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

29 0
37 followers
Viewed: 64 325 times
Version: 1.1
Category: How-tos

Include Yii framework in a Joomla module

Created 13 years ago by zaccaria, updated 13 years ago by Anupam.

Delploying anything using joomla's framework is quite difficult. The framework don't provide a good MVC structure and the documentation is very poor.

8 2
17 followers
Viewed: 34 983 times
Version: 1.1
Category: How-tos

Run an Yii Application inside an Wordpress page

Created 13 years ago by Paul Apostol, updated 13 years ago by Paul Apostol.

Create a folder where to place an Yii app under wordpress folder (mine is "yii')

12 0
14 followers
Viewed: 38 786 times
Version: 1.1
Category: How-tos

How to use Smarty renderer in Yii

Created 13 years ago by dongbeta, updated 13 years ago by dongbeta.

At first, create a class named SmartyRenderer under application/components or any directory you want.

3 0
7 followers
Viewed: 22 646 times
Version: 1.1
Category: How-tos