Wiki articles

Showing 121-140 of 822 items.

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Created 7 years ago by Amjad Khan, updated 7 years ago by Amjad Khan.

Following is the table structure

tblgroups

CREATE TABLE IF NOT EXISTS `tblgroups` (
  `id` int(11) NOT NULL,
  `groupname` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive',
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

tblcontacts

4 1
7 followers
Viewed: 87 062 times
Version: 2.0
Category: Tutorials

How to create/update a model with its related items using Listbox or CheckboxList

Created 8 years ago by softark, updated 6 years ago by softark.

Assume we have many categories and many posts.

5 0
6 followers
Viewed: 86 594 times
Version: 2.0
Category: Tutorials

Custom Number Formatting or Decimal Separators and i18n

Created 11 years ago by c@cba, updated 11 years ago by c@cba.

By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...

4 0
16 followers
Viewed: 86 360 times
Version: 1.1
Category: Tutorials

"Why do I get a 403 error when trying to use Gii?"

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

After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error: ~~~ Error 403 You are not allowed to access this page. ~~~ This is almost certainly caused by the IP filtering mechanism that Gii uses to protect your system from outsiders - by default it allows localhost only (both IPv4 and IPv6), and r...

6 0
5 followers
Viewed: 86 197 times
Version: 1.1
Category: FAQs
Tags: config, Gii

Yii Related Sites

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

This is a list of blogs, off-site tutorials and other resources about Yii.

31 0
34 followers
Viewed: 85 619 times
Version: 1.1
Category: Others

How to use GridView with AJAX

Created 9 years ago by Antonio Ramirez, updated 6 years ago by CeBe.

With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.

10 0
15 followers
Viewed: 85 586 times
Version: 2.0
Category: How-tos
Tags: pjax, widget, yii2

Yii for beginners 2

Created 11 years ago by rackycz, updated 2 years ago by rackycz.

This is second article with my tutorial. I had to add it, because Wiki article has limited length and as I was extending it's text, older paragraphs were disappearing. So here I am starting from chapter 6.

15 0
21 followers
Viewed: 85 254 times
Version: 1.1
Category: Tutorials

Integrating Wordpress and Yii: still another approach, using Yii as the router/controller

Created 11 years ago by acorncom, updated 10 years ago by acorncom.

When you're finished following this article, you'll have a website that integrates WordPress and Yii routes in under one path. For example, you can setup /widgets and /customers to point to Yii controllers and /about-us, /contact-us, /blog/* and /faq pointing to WordPress pages.

19 0
24 followers
Viewed: 84 795 times
Version: 1.1
Category: How-tos

How to create a breadcrumb widget

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

Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.

10 0
11 followers
Viewed: 83 777 times
Version: 1.1
Category: Tutorials
Tags:

How to display static pages in Yii?

Created 15 years ago by qiang, updated 11 years ago by resurtm.

In a Web application, we often need to display pages like "about this site", "legal information", whose content are mostly static. There are several approaches to deal with this kind of pages.

14 0
13 followers
Viewed: 83 574 times
Version: 1.1
Category: Tutorials

Simple way to implement Dynamic Tabular Inputs

Created 9 years ago by ezekielnoob, updated 5 years ago by samdark.

grid

4 0
10 followers
Viewed: 83 386 times
Version: 2.0
Category: Tutorials

Editing, Deleting, and Viewing model data with the yii2-detail-view extension

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

The yii2-detail-view extension offers you an easy way to EDIT and VIEW your model data, toggle these modes, and adds other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

1 0
43 followers
Viewed: 82 869 times
Version: 2.0
Category: Tutorials

Create / Generate PDF files with TCPDF plugin (Example to generate Table with TCPDF plugin)

Created 10 years ago by codesutra, updated 9 years ago by codesutra.

Few days ago i was playing with TCPF plugin to create a PDF files. Since i have checked few available extension and also checked some forum threads but still i dont get my expected result for PDF file.

4 0
11 followers
Viewed: 81 142 times
Version: 1.1
Category: Tutorials

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 12 years ago by c@cba, updated 12 years ago by c@cba.

    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this:
'value'=>'$data->author->username',.
    Now we might want to use $data in the declaration of the `...

19 1
14 followers
Viewed: 79 776 times
Version: 1.1
Category: Tutorials

Saving files to a blob field in the database

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

As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.

6 2
17 followers
Viewed: 79 438 times
Version: 1.1
Category: Tips

Implementing a Registration Process using the yii-user-management module

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

Hi Folks,

7 0
21 followers
Viewed: 79 389 times
Version: 1.1
Category: Tutorials

How to send email via Gmail SMTP in Yii2 framework

Created 2 years ago by Bartosz Wójcik, updated 2 years ago by Bartosz Wójcik.

One of my sites has been flooded with spam bots and as a result - Gmail gave my mailing domain a bad score and I couldn't send emails to @gmail addresses anymore, not from my email, not from my system, not from any of other domains and websites I host...

3 1
4 followers
Viewed: 79 328 times
Version: 2.0
Category: How-tos

Yii and XAMPP server on Windows

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

This article explains issues about installing XAMPP server package (Lite version) on Windows OS and configuring it for serving webapps written in Yii. Please note, that XAMPP is available for many more platforms and systems. I write about Windows edition as it was the only one tested by me.

3 0
0 follower
Viewed: 79 204 times
Version: 1.1
Category: Tutorials

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 259 times
Version: 1.1
Category: How-tos
Tags: Logging

CListView AJAX filtering

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

This tutorial shows how to filter CListView items by AJAX, and it's compatible with disabled JavaScript users
In my case this has been done to filter users list

13 0
27 followers
Viewed: 78 132 times
Version: 1.1
Category: Tutorials