I’ve installed the basic application example, just by donwloading it.
I would like to test extensions, and widgets, for understand how do them work. Is it better to use Compozer for install them ? Or in witch directory do I have to download them.
For example, for install this one :
Thanks a lot,
the best way is use composer, is very easy manage the project dependence and update packages.
After use composer, they say to add lines to the config/main.php file. But I don’t find this one, don’t have a config directory in the basic app…
If you don’t see config/main.php, then it means that you have failed to install the basic app.
You have to be successful in installing and running the basic app without any extension before you try to test some extension.
Just start step by step, reading the guide:
No, the application is running, and I can go to all the pages. All seems good.
In /config, I don’t have main.php but these files :
"web.php" is what you have to edit.
I’m trying this :
I’ve downloded the directory in /vendor
But I have an error :
Calling unknown method: yii\web\View::widget()
I have this in my /config/web.php :
$config = [
'id' => 'basic',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'YiiFeedWidget' => 'ext.yii-feed-widget.YiiFeedWidgetController'
'components' => [
And simply this in my view :
What I’m doing wrong ?
Ah, um, OK. I’m sorry, but I have overlooked an important thing.
Both of the extensions that you wanted to try are for Yii 1.1. They are not meant to be used with Yii 2.0.
You have to consider using Yii 2.0 compatible extensions if there are any.
Or, you have to use Yii 1.1 for the sake of those extensions that you want to use.
Ok. I didn’t notice this…
This extension is ok with Yii 2 :
But I don’t know how to use it. Do I just have to copy / paste these lines in a view after installation ?
Because it’s not working.
I’ve got this :
Class 'SystemInfo' not found
Perhaps not installed in the good directory ?