Wiki

Articles in category "how-tos", sorted by date (updated)X
Displaying 61-70 of 295 result(s).

Checking for "expired" sessions/logins on the client side

Updated 2 months ago by Arno SHow-tos0 comments – viewed 11,454 times – ( +4 ) – version 1.1
Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

Integrating ZF2 into Yii - use case demonstrated

Updated 2 months ago by BoazHow-tos2 comments – viewed 4,333 times – ( +8 ) – version 2.0
I needed to use a class from ZF2 in my Yii project. I've read probably all there is about this subject and still I needed lots of trial & errors to get it working, probably due to my lack of experience working with namepsaces and ZF2 in general. Also, the resources on the web are all partial, at best. Most simply refer to ZF1 where things are technically different. When I got it all working I decided to record my findings and that's how this article was born. The below recipe is what worked for me, accompanied by relevant comments. References: This article is partially based on this guide page. Be sure also to consult Zend Framework 2 documentation.

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Updated 2 months ago by Kartik VHow-tos2 comments – viewed 3,593 times – ( +24 / -4 ) – version 2.0
In Yii 2.0, the yii widgets that use Twitter Bootstrap CSS & JS directly, are part of the yii2-bootstrap extension, starting with yii/bootstrap namespace. For customizing bootstrap extension specific widget assets, you could configure your own assets (CSS/JS) using the new Yii Asset Manager in your Yii Config file. Something like:

two or more different collected data in one CGridView

Updated 2 months ago by CeBeHow-tos2 comments – viewed 4,500 times – ( +3 / -1 ) – version 1.1
Assume that you have teachers and students model.

Caching strategy

Updated 2 months ago by CeBeHow-tos9 comments – viewed 3,431 times – ( +5 / -1 ) – version 1.1
Note: Before reading this wiki you should have read the caching part in the Yii guide
tags: caching, filter

Sort and filter a custom or composite CGridView column - that may even contain data from different tables.

Updated 2 months ago by CeBeHow-tos1 comment – viewed 17,116 times – ( +3 / -1 ) – version 1.1
I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.

Yii CGridView add custom button

Updated 2 months ago by CeBeHow-tos1 comment – viewed 10,777 times – ( +6 ) – version 1.1
Hi buddies !, This tutorial shows about how to add a custom button with your own icon for your CGridView of Yii framework

Create/Develop View files with plain HTML (Without using ActiveForm Class)

Updated 2 months ago by CeBeHow-tos2 comments – viewed 5,584 times – ( +2 / -2 ) – version 1.1
Today i want to share with you is "How can we write HTML Code in view files? I am writing this article because many times we can not use CActiveForm to design our form...
tags: views, tutorial

Update a part of content using AJAX when select a GridView row

Updated 2 months ago by CeBeHow-tos2 comments – viewed 8,435 times – ( +4 ) – version 1.1
Suppose you want to refresh a form or any content when a single row of CGridView is selected

ClientValidation for files (modern browsers)

Updated 2 months ago by CeBeHow-tos0 comments – viewed 3,953 times – ( +4 ) – version 1.1
There are cases that you want to validate the file format, size, extension etc but how to do that without submit the form ?