Skip to content

Commit

Permalink
Нотисы + fix pagehash
Browse files Browse the repository at this point in the history
  • Loading branch information
zikkuratvk committed Jun 5, 2020
1 parent 9fc7ef2 commit 4de4f11
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tolstoycomments.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ class plgContentTolstoycomments extends JPlugin

public function onContentAfterDisplay($context, &$article, &$params, $limitstart = 0){
if($context == 'com_content.article'){


JPlugin::loadLanguage( 'plg_content_tolstoycomments' );



if (strpos($article->text, '{tolstoycomments-off}') !== false) {
Expand All @@ -37,11 +38,11 @@ public function onContentAfterDisplay($context, &$article, &$params, $limitstart
$view = JRequest::getCmd('view');
if ($view == 'article') {

$doc = &JFactory::getDocument();
$doc = JFactory::getDocument();

$apiId = $this->params->def('apiId');


$scriptPage = "";
$pagehash = $article->id;
$scriptPage .= <<<HTML
Expand All @@ -53,7 +54,7 @@ public function onContentAfterDisplay($context, &$article, &$params, $limitstart
window['tolstoycomments'].push({
action: 'init',
values: {
identity: "$scriptPage",
identity: "$pagehash",
visible: true
}
});
Expand Down

0 comments on commit 4de4f11

Please sign in to comment.