Wiki

Sorted by commentsX
Displaying 521-530 of 719 result(s).

Create custom button button with AJAX function in CGridView

Created 2 years ago by nkdHow-tos1 comment – viewed 36,973 times – ( +15 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

URL component access functions

Created 3 years ago by Steve FriedlTips1 comment – viewed 10,789 times – ( +28 ) – version 1.1
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.
tags: URL, request

Using your own forked version of extensions with composer

Created 7 months ago by Kartik VTutorials1 comment – viewed 1,859 times – ( +32 / -4 ) – version 2.0
So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

Create sitemap.xml file dynamically on root folder with one hit

Created 2 years ago by kiran sharmaHow-tos1 comment – viewed 11,054 times – ( +5 / -5 ) – version 1.1
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML

caching controllers with filters()

Created 3 years ago by RusAlexHow-tos1 comment – viewed 10,117 times – ( +2 ) – version 1.1
Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

Configuring different sessions for backend and frontend in Yii advanced app

Created 7 months ago by Kartik VHow-tos1 comment – viewed 4,799 times – ( +34 ) – version 2.0
After you have setup your Yii2 advanced application, you now have setup your user authentication for both frontend and backend. However, if you have first logged into frontend, and try to access backend from the same client machine, you see no login screen, but find yourself automatically logged in.

MigrateCommand class for multiple sites using one code base

Created 2 years ago by Hudson NguyenHow-tos1 comment – viewed 3,071 times – ( +1 ) – version 1.1
My CMS supports multiple sites using one code base therefore the db connection can only be configured by detecting the site's domain.

Check online users / set specific user offline

Created 7 months ago by KonApazHow-tos1 comment – viewed 2,756 times – ( +4 ) – version 1.1
How to check the online users or how to logout a specific user from your admin panel? This wiki shows how to do that

A simple action for XUpload extension

Created 3 years ago by tydeas_drTips1 comment – viewed 13,305 times – ( +3 ) – version 1.1
All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action
tags: tips, xupload, caction

Yii2 and Pdf files with Mpdf

Created 7 months ago by CTalaHow-tos1 comment – viewed 3,514 times – ( +4 ) – version 2.0
I am still new to composer and packagist, so I want to share how I am creating the pdf files because for me was not as simple as it should be.