• Yii Framework

    How to install Yii Framework

    1). Installation: can be done by two methods: The preferred way to install this extension is through composer. Either run composer require 2amigos/yii2-ckeditor-widget or add "2amigos/yii2-ckeditor-widget" : "~2.1" to the require section of your application's composer.json file. 2). Usage: The library comes with two widgets: CKEditor and CKEditorInline. One is for classic edition and the other for inline editing respectively. Using a model with a basic preset: NOTE:(you have to use this code to frontend/views/ and your respective folder where you want to use ckeditor) use dosamigos\ckeditor\CKEditor; <?= $form->field($model, 'text')->widget(CKEditor::className(), [ 'options' => ['rows' => 6], 'preset' => 'basic' ]) ?> Using inline edition with basic preset: use dosamigos\ckeditor\CKEditorInline; <?php…

  • Yii Framework

    How to add image to dashboard using Yii

    Images (stored in a folder of my web-project) via a GridView in Yii2. The images are associated to an URL which is stored in a database … MySQL -> Platform table: ID | Name | Img (Image’s URL) [ ‘attribute’ => ‘col_6’, ‘format’ => ‘html’, ‘label’ => ‘ImageColumnLable’, ‘value’ => function ($data) { return Html::img(‘/ss/frontend/images/’ . $data[‘col_6’], [‘width’ => ’60px’]); }, ],

  • Linux Commands

    How To Set Relay Postfix on Server

    I recently had to re-provision a VM which I use to run a bunch of cron jobs and email me reports. I use Ubuntu as my OS, Postfix as my mail server, and Gmail for my email account.. The details to make this happen can be found in quite a few places online, but the information was a bit scattered and didn’t match my situation exactly. Steps to Success 1. Edit /etc/postfix/main.cf # sets gmail as relay relayhost = [smtp.gmail.com]:587 # use tls smtp_use_tls=yes # use sasl when authenticating to foreign SMTP servers smtp_sasl_auth_enable = yes # path to password map file smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd # list of CAs to trust…