Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 71-80 of 342 result(s).

Limit a CGridView field to some preset length.

Created 2 years ago by le_topHow-tos1 comment – viewed 10,208 times – ( +13 ) – version 1.1
Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.

YiiBooster: How to implement files and images upload on TbRedactor Widget

Created 2 years ago by Antonio RamirezHow-tos3 comments – viewed 21,876 times – ( +13 ) – version 1.1
I have been requested to provide a tutorial on how to use the file upload feature of the TbRedactor widget, and even though I am no longer supporting the library due that the work belongs to Clevertech, I feel that I owe that to the Yii developers. So, here is the  tutorial.

How to avoid multiple Ajax Request

Created 4 years ago by nickcvHow-tos26 comments – viewed 46,919 times – ( +25 / -2 ) – version 1.1
CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs: the sent ajax requests will multiply themselves.

Displaying uploaded file from DB for update with FileInput widget

Created about a year ago by Kartik VHow-tos3 comments – viewed 13,967 times – ( +39 / -5 ) – version 2.0
This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

File uploads in CForm (Form builder)

Created 3 years ago by Luke JurgsHow-tos2 comments – viewed 38,187 times – ( +12 ) – version 1.1
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

Render Form in popup via AJAX (Create and Update) with ajax validation & Also load any page via ajax Yii 2.0 (2.3)

Created 4 months ago by skwordenHow-tos6 comments – viewed 17,036 times – ( +12 ) – version 2.0
There are a few issues with the other solutions I originally used that I found from other wikis. I address the issues I had in this much simpler and shorter way. I am also going to explain what is going into way more detail than others to help people understand what's going on.

Real-time display of server push data using Server-Sent Events (SSE)

Created 3 years ago by bennounaHow-tos16 comments – viewed 37,904 times – ( +12 ) – version 1.1
There are several methods and techniques that come handy in the case you need to call an external resource periodically or if you are waiting for a server push, but I present here an easy and straightforward one using HTML5's Server-Sent Events (SSE).

How to use GridView with AJAX

Created about a year ago by Antonio RamirezHow-tos6 comments – viewed 23,342 times – ( +12 ) – version 2.0
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.
tags: yii2, pjax, widget

Run an Yii Application inside an Wordpress page

Created 4 years ago by Paul ApostolHow-tos3 comments – viewed 22,167 times – ( +12 ) – version 1.1
Install a Wordpress site (mine is in "http://localhost/test/wordpress")

Configuring controller access rules to default-deny

Created 4 years ago by Steve FriedlHow-tos3 comments – viewed 69,229 times – ( +12 ) – version 1.1
Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.