Wiki

Sorted by commentsX
Displaying 341-350 of 784 result(s).

Directory independent extensions

Created 6 years ago by GOshaTips3 comments – viewed 11,619 times – ( +16 / -2 ) – version 1.1
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

Using sub query for doubletts

Created 4 years ago by mbTips3 comments – viewed 13,574 times – ( +2 / -1 ) – version 1.1
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

Upload files in Yii2 with MongoDb and GridFs

Created 3 years ago by edoardo849How-tos3 comments – viewed 18,805 times – ( +8 / -1 ) – version 2.0
Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

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

Created 6 years ago by Steve FriedlFAQs3 comments – viewed 65,128 times – ( +7 / -1 ) – version 1.1
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:
tags: Gii, config

Auto TDD - How to auto-run PHPUnit

Created 6 years ago by imeheszTips3 comments – viewed 16,158 times – ( +3 / -2 ) – version 1.1
If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!
tags: PHPUnit, testing, TDD

Setting and getting systemwide static parameters

Created 6 years ago by Steve FriedlHow-tos3 comments – viewed 103,617 times – ( +12 / -1 ) – version 1.1
Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.
tags: config

Enforcing "You must agree" requirements in forms

Created 6 years ago by Steve FriedlHow-tos3 comments – viewed 23,811 times – ( +29 / -1 ) – version 1.1
Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:
tags: validation

CJuiTabs Content

Created 4 years ago by mbalaTips3 comments – viewed 15,189 times – ( +6 / -1 ) – version 1.1
When I used CJuiTabs I did something. They are
tags: CJuiTabs

Javascript and AJAX with Yii

Created 4 years ago by François GannazHow-tos3 comments – viewed 139,206 times – ( +42 / -1 ) – version 1.1
This page intends to provide an exhaustive guide of how to use Javascript (JS) in Yii. It does not explain how to learn coding in JS, but how to deal with it "the Yii way".
tags: javascript, AJAX

How to create nice modal login widget with a CJuiDialog

Created 6 years ago by Igor IvanovicTutorials3 comments – viewed 52,272 times – ( +9 / -2 ) – version 1.1
...folder /protected/components/UserLoginWidget.php... ...extending the CWidget class...
tags: user, login, modal, widget