view.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. <?php
  2. /**
  3. * @var $this \yii\web\View
  4. * @var $model \app\models\front\News
  5. */
  6. use yii\helpers\ArrayHelper;
  7. use app\modules\ldjson\jsonLD;
  8. use yii\web\UrlManager;
  9. use app\models\Authors;
  10. use app\models\base\Image;
  11. use \app\models\news;
  12. use yii\helpers\Url;
  13. /*
  14. $this->registerJsFile('https://platform-api.sharethis.com/js/sharethis.js#property=63ecb32f4a4876001374e328&product=inline-reaction-buttons', [
  15. 'position' => $this::POS_END,
  16. 'async' => 'async',
  17. 'defer' => 'defer'
  18. ]);
  19. */
  20. $preview = $model->image;
  21. $retina = $preview->getUrl(Image::SIZE_HD,"jpg");
  22. $normal = $preview->getUrl(Image::SIZE_1040x586,"webp");
  23. $bad = $preview->getUrl(Image::SIZE_680x383,'jpg');
  24. $bad = $bad?$bad:'/images/default.jpg';
  25. if( $retina === false || $normal === false ){
  26. $normal = $bad;
  27. $retina = $bad;
  28. }
  29. $normal .= "?v=".$model->rev;
  30. $retina .= "?v=".$model->rev;
  31. $bad .= "?v=".$model->rev;
  32. /*
  33. После этой даты не выводить фото до подтверждения юриста
  34. if( isset( $model->dt_pub ) && strtotime( $model->dt_pub ) < strtotime('2015-01-01 00:00:00') ){
  35. $bad = '/images/default.jpg';
  36. $normal = $bad;
  37. $retina = $bad;
  38. };
  39. */
  40. Yii::$app->og->title =($model->meta_title)?$model->meta_title:$model->title;
  41. Yii::$app->og->description = ($model->lid && trim($model->lid) <> '')?str_replace( '"', "&quot;", strip_tags($model->lid) ):trim(str_replace( '"',"'",substr(strip_tags( $model->text ),0,150)))."...";
  42. if( $model->active == 'N' || $model->dt_pub > date("Y-m-d H:i:s") || $model->noindex == 'Y' ){
  43. Yii::$app->og->noindex = 'Y';
  44. }else{
  45. \Yii::$app->og->canonical = $model->getUrl(true);
  46. \Yii::$app->og->amp = Url::base('https').'/amp/news/'.$model->id;
  47. \Yii::$app->og->og_url = $model->getUrl(true);
  48. \Yii::$app->og->og_image = $model->image->url;
  49. \Yii::$app->og->og_type = "article";
  50. \Yii::$app->og->og_title = htmlspecialchars(($model->meta_title)?strip_tags(str_replace( '"',"&quot;",$model->meta_title)):strip_tags(str_replace( '"',"&quot;",$model->title)));
  51. \Yii::$app->og->og_description = ($model->lid && trim($model->lid) <> '')?str_replace( '"',"&quot;",strip_tags($model->lid)):trim(str_replace( '"',"&quot;",substr(strip_tags( $model->text ),0,150)))."...";
  52. \Yii::$app->og->dtpub = date( "r", strtotime( $model->dt_pub ) );
  53. }
  54. jsonLD::addAmicORG();
  55. jsonLD::news( $model->title, preg_replace('/\s+/', ' ', str_replace( ["\n","\r"],' ',Yii::$app->og->description)), $model->image->url, $model->dt_pub, $model->getUrl(), $model->uid, $model->text, $model->meta_title);
  56. jsonLD::addfaq($model->text, $model->title);
  57. $story = new \app\models\base\Story();
  58. $this->params['breadcrumbs'] = [
  59. [
  60. "text"=>"НОВОСТИ",
  61. "url"=>"/news"
  62. ]
  63. ];
  64. $this->params['context'] = "post-view";
  65. //$topic = ArrayHelper::getValue($model->topics,0);
  66. $topic = Yii::$app->cache->getOrSet('topic-news-'.$model->id, function () use($model){
  67. return $model->getTopics()->andWhere(['show'=>"Y","active"=>1])->one();
  68. }, News::$keysCache['topic-news-##']);
  69. if($topic instanceof \app\models\base\NewsTopic){
  70. $this->params['breadcrumbs'][] =
  71. [
  72. "text"=>$topic->title,
  73. "url"=>"/news/".mb_strtolower($topic->url)
  74. ];
  75. }
  76. $i = 1;
  77. foreach($this->params['breadcrumbs'] as $el){
  78. jsonLD::addBreadcrumb($i, $el['url'], $el['text']);
  79. $i++;
  80. }
  81. if( $model->show_author == 'Y' )
  82. {
  83. $author = Authors::getAuthor( $model->author );
  84. $authorName = $author->name;
  85. \Yii::$app->og->author =$authorName;
  86. jsonLD::author( $authorName );
  87. }else{
  88. $authorName = 'ИА Амител';
  89. jsonLD::author( $authorName, false );
  90. }
  91. if( strstr( $model->text, 'id="widgetseting"' ) && strstr( $model->text, 'windows="100"' ) ) $model->type = 2; //старый стиль широкой страницы
  92. $GLOBALS['type_long'] = ($model->type == 6); //лонгрид
  93. ?>
  94. <?php if(!is_null($model->embed_url) && $model->embed_url!=''):?>
  95. <div class="row">
  96. <div class="col-md-12 mb-5">
  97. <div class="picture-cont-16x9">
  98. <picture class="w-100 youtube-iframe-placeholder" data-link="<?=$model->getYoutubeEmbedLink()?>">
  99. <source srcset="<?=$preview->getUrl(Image::SIZE_680x383,"jpg")?>" media="(min-width: 600px)">
  100. <source srcset="<?=$preview->getUrl(Image::SIZE_680x383,"webp")?>" media="(min-width: 600px)">
  101. <img src="<?=$preview->getUrl(Image::SIZE_680x383)?>" alt="<?=$model->photo_title?>" class="w-100" loading="lazy">
  102. </picture>
  103. </div>
  104. </div>
  105. </div>
  106. <?php endif;?>
  107. <div class="row">
  108. <div class="<?=($model->type == 2 || $model->type == 6)?'col-md-12':'col-md-8'?>">
  109. <div id="post" class="post">
  110. <?
  111. if( Yii::$app->user->can('editor') ){
  112. ?>
  113. <span style="position: absolute;background-color: #a9a9a924;right: 30px;top: 10px; box-shadow: 2px 5px 5px 3px #888;"><img onclick="location='/manager/news/update?id=<?=$model['id']?>'" src="/img/edit.svg" width="25px" height="25px" style="padding:3px;cursor:pointer;"><img onclick="navigator.clipboard.writeText('https://www.amic.ru/news/<?=$model['id']?>');elementPopup(this,'Ссылка скопирована в буфер обмена');" src="/img/share-boxed.svg" width="25px" height="25px" style="padding:3px;margin-top: 2px;cursor:pointer;" ></span>
  114. <?
  115. }
  116. ?>
  117. <?=$this->render("/layouts/breadcrumbs")?>
  118. <h1><?=$model->title?></h1>
  119. <p class="lead"><?=$model->lid?></p>
  120. <p class="published_at"><?=$model->getPublishedNorm()?>, <?=$authorName?> <?= ($model->mark!="" && !is_null($model->mark)) ? \yii\helpers\Html::tag('span', $model->mark,['class'=>'float-right']) : ""?></p>
  121. <p class="share_and_comment">
  122. <a href="#comments" class="comments_btn">Комментировать</a>
  123. <a onclick="Share.vkontakte('<?=Yii::$app->og->og_url?>','<?=addslashes(Yii::$app->og->og_title)?>','<?=Yii::$app->og->og_image?>','<?=str_replace( '"',"&quot; ",Yii::$app->og->og_description)?>')" href="#">
  124. <svg class="icon icon-vk"><use xlink:href="/svg/symbol/sprite-clear.svg#vk"></use></svg>
  125. </a>
  126. <a onclick="Share.odnoklassniki('<?=Yii::$app->og->og_url?>','<?=addslashes(Yii::$app->og->og_title)?>','<?=Yii::$app->og->og_image?>','<?=str_replace( '"',"&quot; ",Yii::$app->og->og_description)?>')" href="#">
  127. <svg class="icon icon-ok"><use xlink:href="/svg/symbol/sprite-clear.svg#ok"></use></svg>
  128. </a>
  129. <a onclick="navigator.clipboard.writeText('<?=Yii::$app->og->og_url?>'); elementPopup(this,'Ссылка скопирована в буфер обмена')" class="copy-link" href="#">
  130. <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 8 8">
  131. <use href="/img/share-boxed.svg#share"></use>
  132. </svg>
  133. </a>
  134. </p>
  135. <p>
  136. <?php if($model->photo_include == 'Y' && $model->image instanceof \app\models\base\Image):?>
  137. <div class="picture-cont-16x9">
  138. <picture class="w-100">
  139. <source srcset="<?=$normal?>, <?=$retina?> 2x" media="(min-width: 600px)">
  140. <img src="<?=$bad?>" alt="<?=htmlentities($model->photo_title,ENT_QUOTES)?>" title="<?=htmlentities($model->photo_title,ENT_QUOTES)?>" class="w-100">
  141. </picture>
  142. </div>
  143. <div class="image-title"><?=$model->photo_title?></div>
  144. <?php endif;?>
  145. </p>
  146. <section class="text">
  147. <?=$model->renderBody()?>
  148. <?=($model->inscription == 2)?'<span class="advertisement">Реклама</span>':''?>
  149. <?=($model->inscription == 1)?'<span class="advertisement">Реклама</span><br><span class="med_advertisement">Имеются противопоказания, необходима консультация специалиста</span>':''?>
  150. <?=($model->inscription == 3)?'<span class="advertisement">Партнёр amic.ru</span>':''?>
  151. </section>
  152. <?php
  153. echo $this->render("@app/views/news/view/tags",["model"=>$model]);
  154. ?>
  155. <?
  156. /*
  157. <section class="share-this">
  158. <!-- ShareThis BEGIN -->
  159. <div class="sharethis-inline-reaction-buttons"></div>
  160. <!-- ShareThis END -->
  161. <div style="clear: both;"></div>
  162. </section>
  163. */
  164. // Временно ок для конкурса
  165. ?>
  166. <section class="share-this">
  167. <center><div id="ok_shareWidget"></div></center>
  168. <div style="clear: both;"></div>
  169. </section>
  170. <script>
  171. !function (d, id, did, st, title, description, image) {
  172. function init(){
  173. OK.CONNECT.insertShareWidget(id,did,st, title, description, image);
  174. }
  175. if (!window.OK || !OK.CONNECT || !OK.CONNECT.insertShareWidget) {
  176. var js = d.createElement("script");
  177. js.src = "https://connect.ok.ru/connect.js";
  178. js.onload = js.onreadystatechange = function () {
  179. if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
  180. if (!this.executed) {
  181. this.executed = true;
  182. setTimeout(init, 0);
  183. }
  184. }};
  185. d.documentElement.appendChild(js);
  186. } else {
  187. init();
  188. }
  189. }(document,"ok_shareWidget",document.URL,'{"sz":30,"st":"oval","ck":1,"bgclr":"ED8207","txclr":"FFFFFF"}',"","","");
  190. </script>
  191. <?
  192. $stn = $story->getForNews($model->id);
  193. if( count($stn) > 0 ){
  194. echo $this->render("@app/views/news/view/story",["model"=>$stn, "id"=>$model->id]);
  195. foreach( $stn as $a ){
  196. jsonLD::story( trim( stripslashes( $a['title'] ) ) );
  197. }
  198. }
  199. ?>
  200. <?php if(Yii::$app->deviceDetect->isMobile()): ?>
  201. <section style="height: 300px;">
  202. <?=$this->render('@app/views/_etc/banners/bannerMobile3')?>
  203. </section>
  204. <?php else:?>
  205. <section style="height: 100px;">
  206. <?=$this->render('@app/views/_etc/banners/transparant5')?>
  207. </section>
  208. <?php endif;?>
  209. <section class="comments" id="comments">
  210. <?=$this->render("view/comments/list",["model"=>$model])?>
  211. </section>
  212. </div>
  213. </div>
  214. <script>
  215. (function (){
  216. let main_view_cont = document.getElementById('post');
  217. let height = main_view_cont.offsetHeight;
  218. console.log(height)
  219. let style = document.createElement("style");
  220. style.innerHTML = "#lenta-container{ max-height:"+height+"px;}";
  221. main_view_cont.parentNode.append(style);
  222. })()
  223. </script>
  224. <div class="<?=($model->type == 2 || $model->type == 6)?'hidden':'col-md-4'?>" id="lenta-container">
  225. <?=$this->render("/layouts/lenta/lenta")?>
  226. </div>
  227. <div class="col-md-12">
  228. <h3 class="mt-3" style="font-family: Helvetica,Arial,sans-serif;
  229. font-size: 20px;
  230. font-weight: 700;
  231. line-height: 24px;
  232. color: #373e44;
  233. padding-bottom: 12px;
  234. padding-top: 12px;">Новости партнеров</h3>
  235. <?//=$this->render('@app/views/_etc/banners/partnermetrics')?>
  236. <div id="ferst_partner_block"></div>
  237. <?/*
  238. <?=$this->render('@app/views/_etc/banners/partner3D')?>
  239. <?=$this->render('@app/views/_etc/banners/partner2D')?>
  240. <?=$this->render('@app/views/_etc/banners/partner1D')?>
  241. */?>
  242. <?php
  243. if(Yii::$app->deviceDetect->isMobile()){
  244. echo $this->render('@app/views/_etc/banners/moevideo');
  245. }
  246. ?>
  247. </div>
  248. <div class="col-md-12" id="infinity_newsfeed">
  249. <?=$this->render("view/infinity_newsfeed",['model'=>$model])?>
  250. </div>
  251. <div id="main-carousel" class="splide"></div>
  252. </div>
  253. <?php
  254. if( strpos( $model->text, 'class="InviewElement' ) !== false ){
  255. echo $this->render('view/inview');
  256. }
  257. ?>
  258. <?php
  259. $this->registerJsFile("/js/splide/dist/js/splide.min.js");
  260. $this->registerCssFile("/js/splide/dist/css/splide.min.css")
  261. ?>
  262. <script>
  263. var intersectionObserver = new IntersectionObserver(function(entries) {
  264. if (entries[0].intersectionRatio <= 0 || $(entries[0].target).html().length > 10 ) return;
  265. <?$code = $this->render('@app/views/_etc/banners/mytarget')?>
  266. <?$code .= $this->render('@app/views/_etc/banners/partner3D')?>
  267. <?$code .= $this->render('@app/views/_etc/banners/partner2D')?>
  268. <?$code .= $this->render('@app/views/_etc/banners/partner1D')?>
  269. <?$code .= $this->render('@app/views/_etc/banners/partner4D')?>
  270. var code = <?=json_encode($code)?>;
  271. $(entries[0].target).html(code);
  272. console.log('загрузить партнёрский блок');
  273. });
  274. (function (){
  275. intersectionObserver.observe(document.querySelector('#ferst_partner_block'));
  276. var gallery = document.getElementById("gallery-0");
  277. if(gallery!==null) {
  278. var wrapper = document.createElement("div");
  279. wrapper.classList.add('gallery-wrapper')
  280. gallery.parentNode.insertBefore(wrapper, gallery)
  281. wrapper.append(gallery)
  282. var gallery_items = gallery.getElementsByTagName("img");
  283. var track = document.createElement("div");
  284. var list = document.createElement('ul');
  285. gallery.classList.add("splide")
  286. list.classList.add("splide__list")
  287. track.classList.add("splide__track")
  288. gallery.prepend(track)
  289. track.prepend(list)
  290. for (var i = 0; i < gallery_items.length; i++) {
  291. var img = gallery_items[i];
  292. var img_cont = document.createElement('li')
  293. img_cont.classList.add("splide__slide")
  294. img_cont.append(img)
  295. list.append(img_cont)
  296. }
  297. var main_view = document.createElement("div")
  298. main_view.classList.add("splide", "gallery-view");
  299. main_view.innerHTML = gallery.innerHTML;
  300. gallery.style.paddingBottom = "18px";
  301. gallery.style.marginBottom = 0;
  302. wrapper.prepend(main_view)
  303. }
  304. document.addEventListener( 'DOMContentLoaded', function () {
  305. //return true;
  306. const galleries = document.querySelectorAll('.gallery-view');
  307. if(galleries.length>0){
  308. for (let i=0; i < galleries.length; i++){
  309. let element = galleries[i];
  310. if(element !== null){
  311. var main = new Splide(element, {
  312. type : 'fade',
  313. rewind : true,
  314. pagination: false,
  315. arrows : true,
  316. speed: 1000
  317. } );
  318. var thumbnails =new Splide( element.parentNode.querySelector('.gallery'), {
  319. fixedWidth: 100,
  320. fixedHeight: 60,
  321. gap : 10,
  322. rewind : true,
  323. pagination: false,
  324. isNavigation: true,
  325. arrows : false,
  326. } );
  327. main.sync( thumbnails );
  328. main.mount();
  329. thumbnails.mount();
  330. }
  331. }
  332. }
  333. if(document.querySelector('.gallery-view') !== null){
  334. // var main = new Splide( '.gallery-view', {
  335. // type : 'fade',
  336. // rewind : true,
  337. // pagination: false,
  338. // arrows : true,
  339. // speed: 1000
  340. // } );
  341. // var thumbnails =new Splide( '.gallery', {
  342. // fixedWidth: 100,
  343. // fixedHeight: 60,
  344. // gap : 10,
  345. // rewind : true,
  346. // pagination: false,
  347. // isNavigation: true,
  348. // arrows : false,
  349. // } );
  350. //
  351. // main.sync( thumbnails );
  352. // main.mount();
  353. // thumbnails.mount();
  354. }
  355. let fullscreenBtn = null;
  356. let gallery_wrappers = document.querySelectorAll('.gallery-wrapper');
  357. for (let i = 0; i < gallery_wrappers.length; i++) {
  358. fullscreenBtn = document.createElement('div');
  359. fullscreenBtn.classList.add('fullscreenButton');
  360. gallery_wrappers[i].append(fullscreenBtn)
  361. fullscreenBtn.onclick = function (){
  362. gallery_wrappers[i].classList.toggle('fullscreen')
  363. gallery_wrappers[i].querySelectorAll('.gallery-view img').forEach(function (elem) {
  364. elem.setAttribute('src', elem.dataset.original);
  365. })
  366. }
  367. }
  368. } );
  369. })()
  370. </script>
  371. <script>
  372. Share = {
  373. vkontakte: function(purl, ptitle, pimg, text) {
  374. url = 'https://vkontakte.ru/share.php?';
  375. url += 'url=' + encodeURIComponent(purl);
  376. url += '&title=' + encodeURIComponent(ptitle);
  377. url += '&description=' + encodeURIComponent(text);
  378. url += '&image=' + encodeURIComponent(pimg);
  379. url += '&noparse=true';
  380. Share.popup(url);
  381. },
  382. odnoklassniki: function(purl, text) {
  383. //url = 'https://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1';
  384. url = 'https://connect.ok.ru/offer?';
  385. url += '&st.comments=' + encodeURIComponent(text);
  386. url += '&url=' + encodeURIComponent(purl);
  387. Share.popup(url);
  388. },
  389. facebook: function(purl, ptitle, pimg, text) {
  390. url = 'http://www.facebook.com/sharer.php?s=100';
  391. url += '&p[title]=' + encodeURIComponent(ptitle);
  392. url += '&p[summary]=' + encodeURIComponent(text);
  393. url += '&p[url]=' + encodeURIComponent(purl);
  394. url += '&p[images][0]=' + encodeURIComponent(pimg);
  395. Share.popup(url);
  396. },
  397. twitter: function(purl, ptitle) {
  398. url = 'https://twitter.com/share?';
  399. url += 'text=' + encodeURIComponent(ptitle);
  400. url += '&url=' + encodeURIComponent(purl);
  401. url += '&counturl=' + encodeURIComponent(purl);
  402. Share.popup(url);
  403. },
  404. mailru: function(purl, ptitle, pimg, text) {
  405. url = 'http://connect.mail.ru/share?';
  406. url += 'url=' + encodeURIComponent(purl);
  407. url += '&title=' + encodeURIComponent(ptitle);
  408. url += '&description=' + encodeURIComponent(text);
  409. url += '&imageurl=' + encodeURIComponent(pimg);
  410. Share.popup(url)
  411. },
  412. popup: function(url) {
  413. window.open(url,'','toolbar=0,status=0,width=626,height=436');
  414. }
  415. };
  416. const elementPopup = function (element, text)
  417. {
  418. console.log(element)
  419. const positionY = element.offsetTop;
  420. const positionX = element.offsetLeft;
  421. let popup = document.createElement("div")
  422. popup.style.position = 'absolute';
  423. popup.style.top = (positionY - 35) + 'px';
  424. popup.style.left = positionX + "px";
  425. popup.style.color = "white";
  426. popup.style.background = "#00000052";
  427. popup.style.borderRadius = "5px";
  428. popup.style.padding = "1px 20px";
  429. popup.style.opacity = "1";
  430. popup.style.transition = "0.3s";
  431. popup.innerHTML = text
  432. popup.classList.add('element-popup')
  433. element.parentNode.append(popup)
  434. setTimeout(function (){
  435. popup.style.opacity=0
  436. console.log(popup.style.transition)
  437. },3000)
  438. }
  439. </script>
  440. <?php if($model->mark!="" && !is_null($model->mark) && is_null(\Yii::$app->request->get('erid'))):?>
  441. <script>
  442. (function (){
  443. const url = new URL(location.href);
  444. url.searchParams.append('erid','<?=$model->mark?>')
  445. window.history.pushState({},'',url);
  446. })()
  447. </script>
  448. <?php endif;?>
  449. <script>
  450. (function (){
  451. const placeholders = document.getElementsByClassName('youtube-iframe-placeholder');
  452. if(placeholders.length>0){
  453. for(let i =0;i<placeholders.length;i++){
  454. placeholders[i].onclick = function (){
  455. const waiting = document.createElement("div");
  456. waiting.style.position = "absolute";
  457. waiting.style.width = "100%";
  458. waiting.style.height = "100%";
  459. waiting.style.background = "url('/img/loading.gif')";
  460. waiting.style.backgroundPosition = "center";
  461. waiting.style.backgroundRepeat = "no-repeat";
  462. waiting.style.backgroundSize = "contain";
  463. waiting.style.zIndex = 1;
  464. this.replaceWith(waiting);
  465. const iframe = document.createElement("iframe");
  466. iframe.src = this.dataset.link+"?autoplay=1";
  467. iframe.style.position = "absolute";
  468. iframe.style.zIndex = 2;
  469. iframe.width = "100%";
  470. iframe.height = "100%";
  471. iframe.title = "YouTube video player";
  472. iframe.frameBorder = "0";
  473. iframe.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture";
  474. iframe.allowFullscreen = true;
  475. waiting.parentNode.append(iframe);
  476. }
  477. }
  478. }
  479. })()
  480. </script>
  481. <?
  482. /*
  483. if( Yii::$app->deviceDetect->isMobile() ){
  484. $this->registerJs(
  485. <<<JS
  486. $(function () {
  487. loadScript( 'https://platform-api.sharethis.com/js/sharethis.js#property=63ecb32f4a4876001374e328&product=inline-reaction-buttons', 8000 );
  488. });
  489. JS
  490. ,
  491. $this::POS_READY,
  492. 'sharethis'
  493. );
  494. }else{
  495. $this->registerJs(
  496. <<<JS
  497. $(function () {
  498. loadScript( 'https://platform-api.sharethis.com/js/sharethis.js#property=63ecb32f4a4876001374e328&product=inline-reaction-buttons', 100 );
  499. });
  500. JS
  501. ,
  502. $this::POS_READY,
  503. 'sharethis'
  504. );
  505. }
  506. */