Usage: echo Disqus::widget([ 'settings' => ['shortname' => 'DISQUS_SHORTNAME'] ]);
Since: 1.0
Author: Kartik Visweswaran (kartikv2@gmail.com)
Inheritance: extends Widget
Example #1
0
<?php

use yii\helpers\Html;
use kartik\social\Disqus;
/**
 * @var yii\web\View $this
 * @var frenzelgmbh\sblog\models\Post $model
 */
$this->title = $model->title;
?>

<?php 
echo Disqus::widget(['settings' => ['id' => 'blog_' . $model->id, 'shortname' => 'simplebutmag', 'identifier' => 'blog_' . $model->id, 'url' => \Yii::$app->urlManager->createAbsoluteUrl(['/posts/post/onlineview', 'id' => $model->id])]]);
Example #2
0
  </div>
  <div class="post-content">
    <?php 
echo str_replace('READMORE', '', $model->content);
?>
    <?php 
echo frenzelgmbh\sblog\widgets\WidgetBlogMapRender::widget(array('module' => 1, 'id' => $model->id));
?>
  </div>
  <div class="post-footer">
    <?php 
echo $model->TagLinks;
?>
  </div>
</div>

<a name="commentreference"></a>

<?php 
if (class_exists('kartik\\social\\Disqus')) {
    echo \kartik\social\Disqus::widget(['settings' => ['id' => 'blog_' . $model->id, 'shortname' => 'myyii2blog', 'identifier' => 'blog_' . $model->id, 'url' => \Yii::$app->urlManager->createAbsoluteUrl(['/posts/post/onlineview', 'id' => $model->id])]]);
}
?>

<?php 
if (class_exists('\\frenzelgmbh\\sblog\\widgets\\PortletPagination')) {
    echo \frenzelgmbh\sblog\widgets\PortletPagination::widget(array('model' => $model));
}
?>

</div>