Skip to content

Commit

Permalink
stable
Browse files Browse the repository at this point in the history
  • Loading branch information
CB9TOIIIA committed Aug 30, 2016
1 parent 0e311c9 commit 430f31f
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# Игнорирование по типу файла, будут игнорироваться в АБСОЛЮТНО всех директориях
# Например /files/data.zip, /server.log, /uploads/users/data/info.xls
/vendor/*
*.tar
*.tar
*.zip
7 changes: 7 additions & 0 deletions assets/css/metrika.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.vergit {
clear: both;
float: right;
margin-right: 15px;
font-size: 0.9em;
font-family: monospace;
}
.sweet-overlay {
background-color: black;
/* IE8 */
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
type="text"
label="RegExp для популярного"
description=""
default="/item/"/>
default="//"/>
</fieldset>
<fieldset name="disqus" label="Disqus" addfieldpath="administrator/components/com_myjbzoostat/elements">
<field
Expand Down
2 changes: 1 addition & 1 deletion myjbzoostat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<authorUrl>http://cb9t.ru</authorUrl>
<copyright></copyright>
<license></license>
<version>1.0</version>
<version>1.3</version>
<description>Компонент статистики: 1) Яндекс.Метрика 2) JBZoo 3) Стандартных материалов (com_conent). А также менеджер комментариев системы комментирования - Disqus.</description>
<creationDate>28 June 2016</creationDate>
<administration>
Expand Down
6 changes: 6 additions & 0 deletions views/auhorsprofile/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

<?php


function rdate($param, $time=0) {
if(intval($time)==0)$time=time();
$MonthNames=array("январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь");
Expand Down Expand Up @@ -171,6 +172,11 @@ function rdate($param, $time=0) {

//jbdump($itemIdsResult,0,'Массив');

// if (empty($authorid)) {
// $user = JFactory::getUser();
// $authorid = $user->id;
// }

$querys = $db->getQuery(true);
$querys
->select($db->quoteName('publish_up'))
Expand Down
25 changes: 25 additions & 0 deletions views/index/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,31 @@



$url = 'https://api.github.com/repos/cb9toiiia/myjbzoostat/releases/latest';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2" );
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$gitjversion = curl_exec($ch);
curl_close($ch);

if (empty($gitjversion)) { $gitjversion = file_get_contents($url); }

$content = json_decode($gitjversion, true);
$latestjoomla = $content['tag_name'];
$datejoomla = $content['published_at'];
$daterelease = date('d.m.Y', strtotime($datejoomla));
if (empty($latestjoomla)) {
$latestjoomla = "Временно невозможно получить версию";
}

echo "<div class='vergit'>Версия - <b>{$latestjoomla}</b> ({$daterelease})</div>";


if (!empty($counter_id)) :


Expand Down

0 comments on commit 430f31f

Please sign in to comment.