Commit 07e00feb13f9a2512c5928a46301ac1b62b866a3
1 parent
be03b779
comments in blog
Showing
3 changed files
with
43 additions
and
4 deletions
Show diff stats
frontend/views/blog/_article_item.php
@@ -34,8 +34,21 @@ | @@ -34,8 +34,21 @@ | ||
34 | </div> | 34 | </div> |
35 | <div class="col-sm-6"> | 35 | <div class="col-sm-6"> |
36 | <p class="date-comments"> | 36 | <p class="date-comments"> |
37 | - <a href="blog-post.html"><i class="fa fa-calendar-o"></i> 20 июня 2013</a> | ||
38 | - <a href="blog-post.html"><i class="fa fa-comment-o"></i> 8 комментариев</a> | 37 | + <a href="#"> |
38 | + <i class="fa fa-calendar-o"></i> | ||
39 | + <?=date("j M Y", $model->updated_at)?> | ||
40 | + </a> | ||
41 | + <a | ||
42 | + href="<?=Url::toRoute( | ||
43 | + [ | ||
44 | + 'blog/article', | ||
45 | + 'alias' => $model->lang->alias, | ||
46 | + '#' => "disqus_thread" | ||
47 | + ] | ||
48 | + )?>" | ||
49 | + > | ||
50 | + <i class="fa fa-comment-o"></i> 0 Comments | ||
51 | + </a> | ||
39 | </p> | 52 | </p> |
40 | </div> | 53 | </div> |
41 | </div> | 54 | </div> |
frontend/views/blog/view.php
@@ -56,8 +56,31 @@ | @@ -56,8 +56,31 @@ | ||
56 | 56 | ||
57 | </div> | 57 | </div> |
58 | <!-- /#post-content --> | 58 | <!-- /#post-content --> |
59 | - | ||
60 | -<!-- <div id="comments">--> | 59 | + |
60 | + <div id="disqus_thread"></div> | ||
61 | + <script> | ||
62 | + | ||
63 | + /** | ||
64 | + * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. | ||
65 | + * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ | ||
66 | + /* | ||
67 | + var disqus_config = function () { | ||
68 | + this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable | ||
69 | + this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable | ||
70 | + }; | ||
71 | + */ | ||
72 | + (function() { // DON'T EDIT BELOW THIS LINE | ||
73 | + var d = document, s = d.createElement('script'); | ||
74 | + s.src = 'https://new-kbenergy-test.disqus.com/embed.js'; | ||
75 | + s.setAttribute('data-timestamp', +new Date()); | ||
76 | + (d.head || d.body).appendChild(s); | ||
77 | + })(); | ||
78 | + </script> | ||
79 | + <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | ||
80 | + | ||
81 | + | ||
82 | + | ||
83 | + <!-- <div id="comments">--> | ||
61 | <!-- <h4 class="text-uppercase">2 комментария</h4>--> | 84 | <!-- <h4 class="text-uppercase">2 комментария</h4>--> |
62 | <!-- --> | 85 | <!-- --> |
63 | <!-- --> | 86 | <!-- --> |
frontend/views/layouts/main.php
@@ -841,6 +841,9 @@ | @@ -841,6 +841,9 @@ | ||
841 | <span id="back-to-top" title="<?=\Yii::t('app', 'Back to top')?>"><i class="fa fa-arrow-up"></i></span> | 841 | <span id="back-to-top" title="<?=\Yii::t('app', 'Back to top')?>"><i class="fa fa-arrow-up"></i></span> |
842 | 842 | ||
843 | </div> | 843 | </div> |
844 | + | ||
845 | + <script id="dsq-count-scr" src="//new-kbenergy-test.disqus.com/count.js" async></script> | ||
846 | + | ||
844 | <!-- /#all --> | 847 | <!-- /#all --> |
845 | <?php $this->endBody() ?> | 848 | <?php $this->endBody() ?> |
846 | </body> | 849 | </body> |