2017 © Pedro Peláez
 

yii2-extension sblog

Smart Weblog Module for yii2

image

frenzelgmbh/sblog

Smart Weblog Module for yii2

  • Sunday, December 13, 2015
  • by philippfrenzel
  • Repository
  • 3 Watchers
  • 1 Stars
  • 74 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

sblog

SMART WebLog Module, (*1)

Installation

Install package via composer "frenzelgmbh/sblog": "dev-master", (*2)

Update config file config/web.php and config/db.php, (*3)

// app/config/web.php
return [
    'modules' => [
        'sblog' => [
            'class' => 'frenzelgmbh\sblog\Module',
            // set custom module properties here ...
        ],
    ],
];
// app/config/db.php
return [
        'class' => 'yii\db\Connection',
        // set up db info
];

Run migration file php yii migrate --migrationPath=@vendor/frenzelgmbh/sblog/migrations, (*4)

Widgets

To use the blog, you can implement the following widgets:, (*5)

Widget for Picture Links (can be used to include advertisement links) * MODULE (e.g. STARTPAGE) * ID (1) * Picture (needs to be uploaded) * Link (whatever you wanna link to), (*6)

if(class_exists('frenzelgmbh\sblog\widgets\WidgetPictureLink')){
  echo frenzelgmbh\sblog\widgets\WidgetPictureLink::widget([
    'title'=>NULL,
    'limit'=>20,
  ]); 
}

This Widget renders all posts in descendending order which is based upon the creation date of the posts., (*7)

if(class_exists('frenzelgmbh\sblog\widgets\PortletPostsStyled')){
  echo frenzelgmbh\sblog\widgets\PortletPostsStyled::widget([
  'title'=>NULL,
    'limit'=>4,
  ]); 
}

The Versions