Wiki

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

How to avoid multiple Ajax Request

Created 4 years ago by nickcvHow-tos26 comments – viewed 44,465 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-tos0 comments – viewed 10,215 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 36,793 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.

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

Created 3 years ago by bennounaHow-tos16 comments – viewed 36,309 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-tos4 comments – viewed 17,810 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 21,254 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 66,100 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.

How to hide /frontend/web in url addresses on apache

Created 7 months ago by raminiousHow-tos12 comments – viewed 36,672 times – ( +12 ) – version 2.0
There is an issue on Yii2 to redirecting / urls to /frontend/web. In other words we need a way to hidden /frontend/web from addresses. We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

Managing a star rating with the StarRating widget in Yii 2

Created about a year ago by Kartik VHow-tos4 comments – viewed 4,568 times – ( +38 / -5 ) – version 2.0
In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

Using the jqueryslidemenu plugin with CMenu

Created 4 years ago by Antonio RamirezHow-tos0 comments – viewed 28,813 times – ( +18 / -1 ) – version 1.1
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.