Перейти к содержанию

oranges4567

Пользователи
  • Постов

    15
  • Зарегистрирован

  • Посещение

Сообщения, опубликованные oranges4567

  1. Только что, WOLF сказал:

    логично

    ибо в файлах хука прописан светлый цвет 

    А вы мне не можете показать что именно нужно изменить?

    <?xml version="1.0" encoding="utf-8"?>
    <hookexport>
      <hookdata>
        <config>
          <hook_name>(WA 3.4) Последний бан AmxBans</hook_name>
          <hook_desc>Хук выведет последний бан из системы банов AmxBans (Автор Mr. Nobody talk.web-ask.ru)</hook_desc>
          <hook_author>Mr. Nobody (TALK.WEB-ASK.RU)</hook_author>
          <hook_email>[email protected]</hook_email>
          <hook_website>http://talk.web-ask.ru</hook_website>
          <hook_update_check/>
          <hook_requirements><![CDATA[a:3:{s:21:"required_applications";a:0:{}s:20:"hook_php_version_min";s:1:"0";s:20:"hook_php_version_max";s:1:"0";}]]></hook_requirements>
          <hook_version_human>1.0.0</hook_version_human>
          <hook_version_long>10000</hook_version_long>
          <hook_extra_data><![CDATA[a:4:{s:7:"display";N;s:13:"settingGroups";a:1:{i:0;s:24:"WAlast_amxbans";}s:8:"settings";a:3:{i:1;s:27:"wa_last_amxbans_on";}s:9:"templates";a:1:{s:11:"skin_boards";a:1:{s:21:"WAlast_amxbans";}}}]]></hook_extra_data>
          <hook_key>wa_last_amxbans</hook_key>
          <hook_global_caches/>
        </config>
      </hookdata>
      <hookfiles>
        <file>
          <hook_file_real>wa_last_amxbans.php</hook_file_real>
          <hook_type>templateHooks</hook_type>
          <hook_classname>WAlast_amxbans</hook_classname>
          <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:11:"skin_boards";s:12:"skinFunction";s:18:"boardIndexTemplate";s:4:"type";s:7:"foreach";s:2:"id";s:11:"side_blocks";s:8:"position";s:9:"outer.pre";}]]></hook_data>
          <hooks_source><![CDATA[<?php
          /**
          *   Mr. Nobody (TALK.WEB-ASK.RU)
          */
          class WAlast_amxbans
          {
            public function __construct()
            {
              $this->registry = ipsRegistry::instance();
              $this->settings =& $this->registry->fetchSettings();
              $this->memberData =& $this->registry->member()->fetchMemberData();
            }

            public function getOutput()
            {
              if($this->settings['wa_last_amxbans_on']){

                $db_host = $this->settings['wa_last_amxbans_host'];
                $db_user = $this->settings['wa_last_amxbans_user'];
                $db_pass = $this->settings['wa_last_amxbans_pass'];
                $db_name = $this->settings['wa_last_amxbans_name'];

                $data['connect'] = TRUE;

                $db_connect = @mysql_connect($db_host, $db_user, $db_pass) OR $data['connect'] = FALSE;
                @mysql_select_db($db_name, $db_connect) OR $data['connect'] = FALSE;
                
                if($data['connect']){
                  mysql_query('SET NAMES utf8');
                  $result=mysql_query("SELECT * FROM `amx_bans` ORDER BY `bid` DESC LIMIT 1");
                  while($row = mysql_fetch_array($result)){

                    if(time() < ($row['ban_created'] + (60 * $row['ban_length']))){
                      $rrr = date("d.m.Y в H:i:s", ($row['ban_created'] + (60 * $row['ban_length'])));
                      $unban = '<span class="badge badge-warning">'.$rrr.'</span>';
                    }
                    else{
                      $unban = '<span class="badge badge-success">Бан истек</span>';
                    }
                    
                    if($row['ban_length'] == 0){
                      $unban = '<span class="badge badge-important">Никогда</span>';
                    }
                    if($row['ban_length'] == -1){
                      $unban = '<span class="badge badge-success">Разбанен</span>';
                    }

                    if($row['ban_reason'] == NULL){
                      $reason = "Не указана!"; 
                    }
                    else{
                      $reason = $row['ban_reason'];
                    }

                    if($row['ban_length'] > 0){
                      $bantime = $row['ban_length'];
                      
                      if($bantime < 60){
                        $bantime = round($bantime).' мин.';
                      }
                      elseif($bantime == 60){
                        $bantime = round($bantime / 60).' час';
                      }
                      elseif($bantime > 60 && $bantime <= 240){
                        $bantime = round($bantime / 60).' часа';
                      }
                      elseif($bantime > 240 && $bantime <= 1200){
                        $bantime = round($bantime / 60).' часов';
                      }
                      elseif($bantime == 1440 || $bantime == 30240){
                        $bantime = round($bantime/60/24).' день';
                      }
                      elseif(($bantime > 1440 && $bantime <= 5760) || ($bantime >= 31680 && $bantime <= 34560)){
                        $bantime = round($bantime/60/24).' дня';
                      }
                      elseif(($bantime >= 7200 && $bantime <= 28800) || ($bantime >= 36000 && $bantime < 43200)){
                        $bantime = round($bantime/60/24).' дней';
                      }
                      elseif($bantime == 43200){
                        $bantime = round($bantime/60/24/30).' месяц';
                      }
                      elseif($bantime >= 43200 && $bantime <=175317){
                        $bantime = round($bantime/60/24/30).' месяца';
                      }
                      else{
                        $bantime = round($bantime/60/24/30).' месяцев';
                      }
                    }
                    if($row['ban_length'] == 0)
                      $bantime = 'навсегда';
                    if($row['ban_length'] == -1)
                      $bantime = 'разбанен';

                    $pos = strpos($servername, '(');
                    $nameserver = substr($servername,0,$pos-1);
                    $bandate = date("d.m.Y в H:i:s", $row['ban_created']);

                    $data['s_banname'] = $row['player_nick'];
                    $data['s_steam'] = $row['player_id'];
                    $data['s_reason'] = $reason;
                    $data['s_bantime'] = $bantime;
                    $data['s_bandate'] = $bandate;
                    $data['s_unban'] = $unban;

                    $subject = explode(" (", $row['server_name']);

                    $pos = strpos($row['server_name'], '(');
                    $data['s_s_name'] = substr($row['server_name'],0,$pos-1);
                    $data['s_s_map'] = substr($subject[1],0,-1);
                    $data['s_s_ip'] = $row['server_ip'];

                    if(mb_strlen($row['admin_nick'], 'UTF-8') > 18)
                      $data['s_admin'] = mb_substr($row['admin_nick'], 0, 18, 'UTF-8').'..';
                    else
                      $data['s_admin'] = $row['admin_nick'];

                    if(mb_strlen($data['s_s_name'], 'UTF-8') > 30)
                      $data['s_s_name'] = mb_substr($data['s_s_name'], 0, 30, 'UTF-8').'..';
                    else
                      $data['s_s_name'] = $data['s_s_name'];

                  }
                }

                return $this->registry->getClass('output')->getTemplate('boards')->WAlast_amxbans( $data );
              }
            }
          }
          ?>]]></hooks_source>
        </file>
      </hookfiles>
      <hookextras_settings>
        <setting>
          <conf_is_title>1</conf_is_title>
          <conf_title_title><![CDATA[(WA 34) Последний бан AmxBans]]></conf_title_title>
          <conf_title_desc>Настройки хука (talk.web-ask.ru)</conf_title_desc>
          <conf_title_noshow>0</conf_title_noshow>
          <conf_title_keyword>wa_last_amxbans</conf_title_keyword>
          <conf_title_app>core</conf_title_app>
          <conf_title_tab>Hooks</conf_title_tab>
        </setting>
        <setting>
          <conf_title>Включить хук?</conf_title>
          <conf_description>Настройка включения.</conf_description>
          <conf_group>50</conf_group>
          <conf_type>yes_no</conf_type>
          <conf_key>wa_last_amxbans_on</conf_key>
          <conf_value/>
          <conf_default>0</conf_default>
          <conf_extra/>
          <conf_evalphp/>
          <conf_protected>1</conf_protected>
          <conf_position>1</conf_position>
          <conf_start_group/>
          <conf_add_cache>1</conf_add_cache>
          <conf_keywords/>
          <conf_title_keyword>wa_last_amxbans</conf_title_keyword>
          <conf_is_title>0</conf_is_title>
        </setting>
        <setting>
          <conf_title>Хост</conf_title>
          <conf_description>Хост базы данных</conf_description>
          <conf_group>50</conf_group>
          <conf_type>input</conf_type>
          <conf_key>wa_last_amxbans_host</conf_key>
          <conf_value/>
          <conf_default>localhost</conf_default>
          <conf_extra/>
          <conf_evalphp/>
          <conf_protected>1</conf_protected>
          <conf_position>2</conf_position>
          <conf_start_group/>
          <conf_add_cache>1</conf_add_cache>
          <conf_keywords/>
          <conf_title_keyword>wa_last_amxbans</conf_title_keyword>
          <conf_is_title>0</conf_is_title>
        </setting>
        <setting>
          <conf_title>Пользователь</conf_title>
          <conf_description>Пользователь базы данных</conf_description>
          <conf_group>50</conf_group>
          <conf_type>input</conf_type>
          <conf_key>wa_last_amxbans_user</conf_key>
          <conf_value/>
          <conf_default/>
          <conf_extra/>
          <conf_evalphp/>
          <conf_protected>1</conf_protected>
          <conf_position>3</conf_position>
          <conf_start_group/>
          <conf_add_cache>1</conf_add_cache>
          <conf_keywords/>
          <conf_title_keyword>wa_last_amxbans</conf_title_keyword>
          <conf_is_title>0</conf_is_title>
        </setting>
        <setting>
          <conf_title>Пароль</conf_title>
          <conf_description>Пароль базы данных</conf_description>
          <conf_group>50</conf_group>
          <conf_type>input</conf_type>
          <conf_key>wa_last_amxbans_pass</conf_key>
          <conf_value/>
          <conf_default/>
          <conf_extra/>
          <conf_evalphp/>
          <conf_protected>1</conf_protected>
          <conf_position>4</conf_position>
          <conf_start_group/>
          <conf_add_cache>1</conf_add_cache>
          <conf_keywords/>
          <conf_title_keyword>wa_last_amxbans</conf_title_keyword>
          <conf_is_title>0</conf_is_title>
        </setting>
        <setting>
          <conf_title>Имя</conf_title>
          <conf_description>Имя базы данных</conf_description>
          <conf_group>50</conf_group>
          <conf_type>input</conf_type>
          <conf_key>wa_last_amxbans_name</conf_key>
          <conf_value/>
          <conf_default/>
          <conf_extra/>
          <conf_evalphp/>
          <conf_protected>1</conf_protected>
          <conf_position>5</conf_position>
          <conf_start_group/>
          <conf_add_cache>1</conf_add_cache>
          <conf_keywords/>
          <conf_title_keyword>wa_last_amxbans</conf_title_keyword>
          <conf_is_title>0</conf_is_title>
        </setting>
      </hookextras_settings>
      <hookextras_language/>
      <hookextras_modules/>
      <hookextras_help/>
      <hookextras_templates>
        <templates>
          <template_group>skin_boards</template_group>
    <template_content><![CDATA[<div class="ipsSideBlock clearfix">
    <h3>Последний бан</h3>
      <div class="_sbcollapsable">
        <if test="$data['connect'] == TRUE">
          <table class="table table-striped table-bordered table-condensed">
            <thead>
              <tr>
                <th colspan="2">
                  <center><font color="#DAA520"><b>{$data['s_s_name']}</b></font></center>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <th><font color="black"><b>IP сервера</b></font></th>
                <td><span class="label label-info">{$data['s_s_ip']}</span></td>
              </tr>
              <tr>
                <th><font color="black"><b>Карта</b></font></th>
                <td><span class="label label-info">{$data['s_s_map']}</span></td>
              </tr>
              <tr>
                <th><font color="black"><b>Ник</b></font></th>
                <td><span class="label label-info">{$data['s_banname']}</span></td>
              </tr>
              <tr>
                <th><font color="black"><b>STEAM_ID</b></font></th>
                <td><span class="label label-info">{$data['s_steam']}</span></td>
              </tr>
              <tr>
                <th><font color="black"><b>Причина</b></font></th>
                <td><span class="label label-info">{$data['s_reason']}</span></td>
              </tr>
              <tr>
                <th><font color="black"><b>Срок</b></font></th>
                <td><span class="label label-important">{$data['s_bantime']}</span></td>
              </tr>
              <tr>
                <th><font color="black"><b>Забанен</b></font></th>
                <td><span class="label label-warning">{$data['s_bandate']}</span></td>
              </tr>
              <tr>
                <th><font color="black"><b>Истекает</b></font></th>
                <td>{$data['s_unban']}</td>
              </tr>
              <tr>
                <th><font color="black"><b>Админ</b></font></th>
                <td><span class="label label-important">{$data['s_admin']}</span></td>
              </tr>
            </tbody>
          </table>
        <else />
          Не удается подключиться к базе AmxBans
        </if>
      </div>
    </div>
    <style>
    .table {
      width: 100%;
    }
     
    .table th,
    .table td {
      padding: 8px;
      line-height: 20px;
      text-align: left;
      vertical-align: top;
      border-top: 1px solid #dddddd;
    }
     
    .table th {
      font-weight: bold;
    }
     
    .table thead th {
      vertical-align: bottom;
    }
     
    .table caption + thead tr:first-child th,
    .table caption + thead tr:first-child td,
    .table colgroup + thead tr:first-child th,
    .table colgroup + thead tr:first-child td,
    .table thead:first-child tr:first-child th,
    .table thead:first-child tr:first-child td {
      border-top: 0;
    }
     
    .table tbody + tbody {
      border-top: 2px solid #dddddd;
    }
     
    .table .table {
      background-color: #ffffff;
    }
     
    .table-condensed th,
    .table-condensed td {
      padding: 4px 5px;
    }
     
    .table-bordered {
      border: 1px solid #dddddd;
      border-collapse: separate;
      *border-collapse: collapse;
      border-left: 0;
      -webkit-border-radius: 4px;
         -moz-border-radius: 4px;
              border-radius: 4px;
    }
     
    .table-bordered th,
    .table-bordered td {
      border-left: 1px solid #dddddd;
    }
     
    .table-bordered caption + thead tr:first-child th,
    .table-bordered caption + tbody tr:first-child th,
    .table-bordered caption + tbody tr:first-child td,
    .table-bordered colgroup + thead tr:first-child th,
    .table-bordered colgroup + tbody tr:first-child th,
    .table-bordered colgroup + tbody tr:first-child td,
    .table-bordered thead:first-child tr:first-child th,
    .table-bordered tbody:first-child tr:first-child th,
    .table-bordered tbody:first-child tr:first-child td {
      border-top: 0;
    }
     
    .table-bordered thead:first-child tr:first-child > th:first-child,
    .table-bordered tbody:first-child tr:first-child > td:first-child,
    .table-bordered tbody:first-child tr:first-child > th:first-child {
      -webkit-border-top-left-radius: 4px;
              border-top-left-radius: 4px;
      -moz-border-radius-topleft: 4px;
    }
     
    .table-bordered thead:first-child tr:first-child > th:last-child,
    .table-bordered tbody:first-child tr:first-child > td:last-child,
    .table-bordered tbody:first-child tr:first-child > th:last-child {
      -webkit-border-top-right-radius: 4px;
              border-top-right-radius: 4px;
      -moz-border-radius-topright: 4px;
    }
     
    .table-bordered thead:last-child tr:last-child > th:first-child,
    .table-bordered tbody:last-child tr:last-child > td:first-child,
    .table-bordered tbody:last-child tr:last-child > th:first-child,
    .table-bordered tfoot:last-child tr:last-child > td:first-child,
    .table-bordered tfoot:last-child tr:last-child > th:first-child {
      -webkit-border-bottom-left-radius: 4px;
              border-bottom-left-radius: 4px;
      -moz-border-radius-bottomleft: 4px;
    }
     
    .table-bordered thead:last-child tr:last-child > th:last-child,
    .table-bordered tbody:last-child tr:last-child > td:last-child,
    .table-bordered tbody:last-child tr:last-child > th:last-child,
    .table-bordered tfoot:last-child tr:last-child > td:last-child,
    .table-bordered tfoot:last-child tr:last-child > th:last-child {
      -webkit-border-bottom-right-radius: 4px;
              border-bottom-right-radius: 4px;
      -moz-border-radius-bottomright: 4px;
    }
     
    .table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
      -webkit-border-bottom-left-radius: 0;
              border-bottom-left-radius: 0;
      -moz-border-radius-bottomleft: 0;
    }
     
    .table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
      -webkit-border-bottom-right-radius: 0;
              border-bottom-right-radius: 0;
      -moz-border-radius-bottomright: 0;
    }
     
    .table-bordered caption + thead tr:first-child th:first-child,
    .table-bordered caption + tbody tr:first-child td:first-child,
    .table-bordered colgroup + thead tr:first-child th:first-child,
    .table-bordered colgroup + tbody tr:first-child td:first-child {
      -webkit-border-top-left-radius: 4px;
              border-top-left-radius: 4px;
      -moz-border-radius-topleft: 4px;
    }
     
    .table-bordered caption + thead tr:first-child th:last-child,
    .table-bordered caption + tbody tr:first-child td:last-child,
    .table-bordered colgroup + thead tr:first-child th:last-child,
    .table-bordered colgroup + tbody tr:first-child td:last-child {
      -webkit-border-top-right-radius: 4px;
              border-top-right-radius: 4px;
      -moz-border-radius-topright: 4px;
    }
     
    .table-striped tbody > tr:nth-child(odd) > td,
    .table-striped tbody > tr:nth-child(odd) > th {
      background-color: #f9f9f9;
    }
     
    .table-hover tbody tr:hover > td,
    .table-hover tbody tr:hover > th {
      background-color: #f5f5f5;
    }
     
    table td[class*="span"],
    table th[class*="span"],
    .row-fluid table td[class*="span"],
    .row-fluid table th[class*="span"] {
      display: table-cell;
      float: none;
      margin-left: 0;
    }
     
    .table td.span1,
    .table th.span1 {
      float: none;
      width: 44px;
      margin-left: 0;
    }
     
    .table td.span2,
    .table th.span2 {
      float: none;
      width: 124px;
      margin-left: 0;
    }
     
    .table td.span3,
    .table th.span3 {
      float: none;
      width: 204px;
      margin-left: 0;
    }
     
    .table td.span4,
    .table th.span4 {
      float: none;
      width: 284px;
      margin-left: 0;
    }
     
    .table td.span5,
    .table th.span5 {
      float: none;
      width: 364px;
      margin-left: 0;
    }
     
    .table td.span6,
    .table th.span6 {
      float: none;
      width: 444px;
      margin-left: 0;
    }
     
    .table td.span7,
    .table th.span7 {
      float: none;
      width: 524px;
      margin-left: 0;
    }
     
    .table td.span8,
    .table th.span8 {
      float: none;
      width: 604px;
      margin-left: 0;
    }
     
    .table td.span9,
    .table th.span9 {
      float: none;
      width: 684px;
      margin-left: 0;
    }
     
    .table td.span10,
    .table th.span10 {
      float: none;
      width: 764px;
      margin-left: 0;
    }
     
    .table td.span11,
    .table th.span11 {
      float: none;
      width: 844px;
      margin-left: 0;
    }
     
    .table td.span12,
    .table th.span12 {
      float: none;
      width: 924px;
      margin-left: 0;
    }
     
    .table tbody tr.success > td {
      background-color: #dff0d8;
    }
     
    .table tbody tr.error > td {
      background-color: #f2dede;
    }
     
    .table tbody tr.warning > td {
      background-color: #fcf8e3;
    }
     
    .table tbody tr.info > td {
      background-color: #d9edf7;
    }
     
    .table-hover tbody tr.success:hover > td {
      background-color: #d0e9c6;
    }
     
    .table-hover tbody tr.error:hover > td {
      background-color: #ebcccc;
    }
     
    .table-hover tbody tr.warning:hover > td {
      background-color: #faf2cc;
    }
     
    .table-hover tbody tr.info:hover > td {
      background-color: #c4e3f3;
    }
     
    .label {
      -webkit-border-radius: 3px;
         -moz-border-radius: 3px;
              border-radius: 3px;
              padding: 2px 4px;
              color:#fff;
    }
     
    .badge {
      padding-right: 9px;
      padding-left: 9px;
      -webkit-border-radius: 9px;
         -moz-border-radius: 9px;
              border-radius: 9px;
              color:#fff;
    }
     
    .label:empty,
    .badge:empty {
      display: none;
    }
     
    a.label:hover,
    a.label:focus,
    a.badge:hover,
    a.badge:focus {
      color: #ffffff;
      text-decoration: none;
      cursor: pointer;
    }
     
    .label-important,
    .badge-important {
      background-color: #b94a48;
    }
     
    .label-important[href],
    .badge-important[href] {
      background-color: #953b39;
    }
     
    .label-warning,
    .badge-warning {
      background-color: #f89406;
    }
     
    .label-warning[href],
    .badge-warning[href] {
      background-color: #c67605;
    }
     
    .label-success,
    .badge-success {
      background-color: #468847;
    }
     
    .label-success[href],
    .badge-success[href] {
      background-color: #356635;
    }
     
    .label-info,
    .badge-info {
      background-color: #3a87ad;
    }
     
    .label-info[href],
    .badge-info[href] {
      background-color: #2d6987;
    }
     
    .label-inverse,
    .badge-inverse {
      background-color: #333333;
    }
     
    .label-inverse[href],
    .badge-inverse[href] {
      background-color: #1a1a1a;
    }
     
    .btn .label,
    .btn .badge {
      position: relative;
      top: -1px;
    }
     
    .btn-mini .label,
    .btn-mini .badge {
      top: 0;
    }
    </style>]]></template_content>
          <template_name>WAlast_amxbans</template_name>
          <template_data>$data</template_data>
          <template_updated>0</template_updated>
          <template_removable>0</template_removable>
          <template_added_to>0</template_added_to>
          <template_user_added>1</template_user_added>
          <template_user_edited>0</template_user_edited>
          <template_master_key>root</template_master_key>
        </templates>
      </hookextras_templates>
      <hookextras_css/>
      <hookextras_replacements/>
      <hookextras_tasks/>
      <hookextras_database_create/>
      <hookextras_database_alter/>
      <hookextras_database_update/>
      <hookextras_database_insert/>
    </hookexport>
     

    упс походу я накосячил так делать нельзя(

     

  2. 12 минут назад, WOLF сказал:

    уберите ссылку которая у вас сейчас и сделайте по инструкции! 

    о боже, хватит советовать бред, раз не знаете, лучше не вводить в заблуждение. Человек итак не любитель искать, в своими советами вы его еще больше в дебри заведете 

    Спасибо вам большое!

     

    12 минут назад, DLab сказал:

    Надо искать вкладку типа "Менеджер меню", "настройки меню"

    И вам спасибо за участие)

  3. версия 3.4.6

    14 минут назад, DLab сказал:

    Админ панель->Система->Возможности->менеджер меню.

    Двигаем пункты меню и нажимаем "Опубликовать меню"

    там нету возможности(

    13 минут назад, WOLF сказал:

    ага, а перед этим берем и смотрим на скрин - по стилю понятно что за версия форума, потом берем выше и смотрим в каком разделе вопрос задан 

    а в каком разделе ее нужно создавать?

  4. 3 минуты назад, WOLF сказал:

    ац-внешний вид-ваш стиль-редактировать-defaultheande

    там текстовое лого

    если нужно картинку разместить, то в этом же файле в правом верхнем углу нажмите кнопку "отменить" и залейте лого как и для дефолтового стиля

    ац-внешний вид-сменить лого

    Спасибо большое)))

×
×
  • Создать...