I was playing around with another PHP framework which I didn't really liked anyway but it had simple and nice integration for PHP built in web server so I decided to write one for Yii (since this is my primary PHP framework)
I was playing around with another PHP framework which I didn't really liked anyway but it had simple and nice integration for PHP built in web server so I decided to write one for Yii (since this is my primary PHP framework)
Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.
Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php
. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).
Note the tag {{homeUrl}}
will be dynamically replaced at runtime.
The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?
If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.
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?
Alternatively, inline assets (JS/CSS) can be registered at runtime from within the View
.
For example you can clearly simulate the ajaxLink feature using a inline javascript. Its however recommended if you can merge where possible, client code (JS/CSS) into separate JS/CSS files and loaded through the AssetBundle. Note there is no more need of a CClientScript anymore:
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.
I wrote about this on my blog, but wanted to post it here too.
Personalmente trovo che la versione "portable" sia molto più semplice da aggiornare, ed io tengo sempre costantemente aggiornato TUTTO il parco software relativo al mio webserver.
Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components
and modify your
params.php
` file like this:
composer update
does not fetch any new packages (even though the source is updated)composer update
.composer update
earlier, but it was partially done, before you lost network connectivity, and you cannot refresh packages anymore.Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock
file in your application root folder.
The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.
I could make this work following same useful tips from this post.
This wiki will explain how you can use the Field range extension with multiple Bootstrap form layouts (vertical or horizontal). You maybe aware, that the yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.
Implementing a role based access control is a very easy process and you can even load your roles from the database if you want.
This is an extension to Yii 2.0: Write & use a custom Component in Yii2.0 for Advanced Template
This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install.
After installation done, create controller
and action