Блоги

Блоги 1.0.0

Нет прав для скачивания
Совместимость
не проверялся на совместимость
Изменения в БД
требуются
Автор
frost444
Общественное достояние
да
Описание: добавляет пользователям возможность вести блоги.

Основные возможности:
  • Добавление комментариев
  • Переключение капчи, recaptcha или стандартная
  • Поиск как по комментариям так и по статьям
  • Облако тегов генерируется из тех которые есть в блогах
  • Гибкая настройка
  • Возможность добавить быструю запись в блог, при создании темы или раздачи( с редиректом в форум)
  • Отдельная система доступа к категориям и новостям
  • Нагрузка сведена к минимуму
Инструкция по установке
PHP:
Автор мода: frost444
//Кеширование было удвлено, по запросу заказчика.

//-----[Обновления]-----\\

|--(00.00.0000)
   1) измененный код: ---
   2) ---
   info: (1) ---
  
\\-----[Обновления]-----//

####[ВЫПОЛНИТЬ]-----SQL

CREATE TABLE `bb_blog_auth_access` (
  `group_id` mediumint(8) NOT NULL DEFAULT '0',
  `blog_cat_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `blog_cat_perm` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`group_id`,`blog_cat_id`),
  KEY `blog_cat_id` (`blog_cat_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_auth_access_snap` (
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `blog_cat_id` smallint(6) NOT NULL DEFAULT '0',
  `blog_cat_perm` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`blog_cat_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_cat` (
  `blog_cat_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `blog_cat_name` varchar(150) NOT NULL DEFAULT '',
  `blog_cat_desc` text NOT NULL,
  `blog_cat_status` tinyint(4) NOT NULL DEFAULT '0',
  `blog_cat_posts` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_cat_topics` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_cat_order` smallint(5) unsigned NOT NULL DEFAULT '1',
  `blog_cat_show_on_index` tinyint(1) NOT NULL DEFAULT '1',
  `blog_cat_icon` varchar(100) NOT NULL DEFAULT '0',
  `blog_cat_auth_view` tinyint(2) NOT NULL DEFAULT '0',
  `blog_cat_auth_read` tinyint(2) NOT NULL DEFAULT '0',
  `blog_cat_auth_post` tinyint(2) NOT NULL DEFAULT '0',
  `blog_cat_auth_post_view` tinyint(2) NOT NULL DEFAULT '0',
  `blog_cat_auth_reply` tinyint(2) NOT NULL DEFAULT '0',
  `blog_cat_auth_edit` tinyint(2) NOT NULL DEFAULT '0',
  `blog_cat_auth_delete` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`blog_cat_id`),
  KEY `blog_cat_order` (`blog_cat_order`),
  KEY `blog_cat_id` (`blog_cat_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_config` (
  `config_name` varchar(255) NOT NULL DEFAULT '',
  `config_value` text NOT NULL,
  PRIMARY KEY (`config_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_rating` (
  `blog_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `user_ip` char(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `blog_like` tinyint(1) NOT NULL DEFAULT '0',
  `blog_rate` int(2) NOT NULL DEFAULT '0',
  `time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`blog_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_reply` (
  `blog_reply_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `blog_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_reply_user_id` mediumint(8) NOT NULL DEFAULT '0',
  `blog_reply_user_name` varchar(25) NOT NULL DEFAULT '0',
  `blog_reply_time` int(11) NOT NULL DEFAULT '0',
  `blog_reply_user_ip` char(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0',
  `blog_reply_email` varchar(30) NOT NULL,
  `blog_reply_avatar` varchar(250) NOT NULL DEFAULT '0',
  `blog_reply_active` tinyint(1) NOT NULL DEFAULT '0',
  `blog_reply_active_key` varchar(64) NOT NULL DEFAULT '0',
  `blog_reply_edit_time` int(11) NOT NULL DEFAULT '0',
  `blog_reply_edit_count` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`blog_reply_id`),
  KEY `blog_id` (`blog_id`),
  KEY `blog_reply_user_id` (`blog_reply_user_id`),
  KEY `blog_reply_time` (`blog_reply_time`),
  KEY `blog_reply_id_post_time` (`blog_reply_time`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_reply_html` (
  `blog_reply_id` mediumint(9) NOT NULL DEFAULT '0',
  `blog_reply_html_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `blog_reply_html` mediumtext NOT NULL,
  PRIMARY KEY (`blog_reply_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_reply_text` (
  `blog_reply_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_reply_text` text NOT NULL,
  PRIMARY KEY (`blog_reply_id`),
  FULLTEXT KEY `blog_reply_text` (`blog_reply_text`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_tag` (
  `blog_topics_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_tag` text NOT NULL,
  PRIMARY KEY (`blog_topics_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_topics` (
  `blog_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `blog_cat_id` varchar(250) NOT NULL DEFAULT '0',
  `blog_title` varchar(250) NOT NULL DEFAULT '',
  `blog_autor` mediumint(8) NOT NULL DEFAULT '0',
  `blog_time` int(11) NOT NULL DEFAULT '0',
  `blog_views` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_replies` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_lock` tinyint(1) NOT NULL DEFAULT '0',
  `blog_dost` tinyint(1) NOT NULL DEFAULT '0',
  `blog_first_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_last_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_last_post_time` int(11) NOT NULL DEFAULT '0',
  `blog_like` int(11) NOT NULL DEFAULT '0',
  `blog_like_count` mediumint(8) NOT NULL DEFAULT '0',
  `blog_rating_sum` int(11) NOT NULL DEFAULT '0',
  `blog_rating_count` mediumint(8) NOT NULL DEFAULT '0',
  PRIMARY KEY (`blog_id`),
  KEY `blog_cat_id` (`blog_cat_id`),
  KEY `blog_last_post_id` (`blog_last_post_id`),
  KEY `blog_last_post_time` (`blog_last_post_time`),
  FULLTEXT KEY `blog_title` (`blog_title`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_topics_prev` (
  `blog_topics_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_topics_prev` text NOT NULL,
  `blog_topics_img` text NOT NULL,
  PRIMARY KEY (`blog_topics_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `bb_blog_topics_text` (
  `blog_topics_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_topics_text` text NOT NULL,
  PRIMARY KEY (`blog_topics_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

CREATE TABLE `buf_blog_view` (
  `blog_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `blog_views` mediumint(8) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`blog_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8    ;

####[КОНЕЦ]-----SQL


####[ОТКРЫТЬ]----- init_bb.php

-----[найти]-----

define('BB_PRIVMSGS_TEXT',        'bb_privmsgs_text');

-----[добавить после]-----

//Blog table
define('BUF_BLOG_VIEW',                    'buf_blog_view');
define('BB_BLOG_CONFIG',                'bb_blog_config');
define('BB_BLOG_TOPICS',                'bb_blog_topics');
define('BB_BLOG_TAG',                    'bb_blog_tag');
define('BB_BLOG_TOPICS_TEXT',            'bb_blog_topics_text');
define('BB_BLOG_TOPICS_PREV',            'bb_blog_topics_prev');
define('BB_BLOG_REPLEY',                'bb_blog_reply');
define('BB_BLOG_REPLEY_TEXT',            'bb_blog_reply_text');
define('BB_BLOG_REPLEY_HTML',            'bb_blog_reply_html');
define('BB_BLOG_RATING',                'bb_blog_rating');
define('BB_BLOG_CAT',                    'bb_blog_cat');

////(START) Blog
define('PAGE_BLOG',                    100);
define('PAGE_BLOG_ALLENTRIES',        101);
define('PAGE_BLOG_BLOCKED',            102);
define('PAGE_BLOG_CFG',                103);
define('PAGE_BLOG_CONTRIBUTORS',    104);
define('PAGE_BLOG_ENTRY',            105);
define('PAGE_BLOG_FRIENDS',            106);
define('PAGE_BLOG_FPOSTING',        107);
define('PAGE_BLOG_RSS',                108);
define('PAGE_BLOGS',                109);
define('PAGE_BLOGS_NEWS',            110);
////(END) Blog

-----[найти]-----

define('POST_USERS_URL',  'u');

-----[добавить после]-----

//Blog URL
define('BLOG_POST_URL',        'p');
define('BLOG_POST_ADD',        'post');
define('BLOG_TOPIC_URL',    'b');
define('BLOG_CAT_URL',        'c');
define('BLOG_TAG_URL',        't');
define('BLOG_TITLE_URL',    'tit');
define('BLOG_TEXT_URL',        'text');
define('BLOG_SEARCH_MODE',    'search_mode');
define('BLOG_PAGE_URL',        'start');
define('BLOG_MODE_URL',        "blog.php?" .'mode=');
define('BLOG_URL',            'b=');
define('BLOG_POSTS_URL',    'p=');
define('BLOG_CATEGORY_URL',    'c=');
define('BLOG_TAGS_URL',        't=');

####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- sessions.php

-----[найти]-----

        require(LANG_DIR .'lang_main.php');

-----[добавить после]-----

        require(LANG_DIR .'lang_blog_main.php');
       
-----[найти]-----

            require(LANG_DIR .'lang_admin_attach.php');

-----[добавить после]-----

            require(LANG_DIR .'lang_blog_admin.php');
       
-----[найти]-----

    /**
    *  Enqueue ads
    */
           
-----[добавить перед]-----

    function get_not_auth_blog_cat ($auth_type)
    {
        global $datastore, $blog;

        if (IS_ADMIN) return '';

        if (!$forums = $datastore->get('blog_cat_forums'))
        {
            $datastore->update('blog_cat_forums');
            $forums = $datastore->get('blog_cat_forums');
        }

        if ($auth_type == AUTH_VIEW)
        {
            if (IS_GUEST)
            {
                return $forums['blog_cat_not_auth_forums']['blog_cat_guest_view'];
            }
        }
        if ($auth_type == AUTH_READ)
        {
            if (IS_GUEST)
            {
                return $forums['blog_cat_not_auth_forums']['blog_cat_guest_read'];
            }
        }

        $auth_field_match = array(
            AUTH_VIEW       => 'blog_cat_auth_view',
            AUTH_READ       => 'blog_cat_auth_read',
            AUTH_POST       => 'blog_cat_auth_post',
            AUTH_REPLY      => 'blog_cat_auth_reply',
            AUTH_EDIT       => 'blog_cat_auth_edit',
            AUTH_DELETE     => 'blog_cat_auth_delete',
        );

        $not_auth_forums = array();
        $auth_field = $auth_field_match[$auth_type];
        $is_auth_ary = $blog->auth($auth_type, AUTH_LIST_ALL, $this->data);

        foreach ($is_auth_ary as $forum_id => $is_auth)
        {
            if (!$is_auth[$auth_field])
            {
                $not_auth_forums[] = $forum_id;
            }
        }

        return join(',', $not_auth_forums);
    }

    /**
    *  Get excluded blog
    */
    function get_excluded_blog ($auth_type, $return_as = 'csv')
    {
        $excluded = array();

        if ($not_auth = $this->get_not_auth_blog_cat($auth_type))
        {
            $excluded[] = $not_auth;
        }
       
        switch ($return_as)
        {
            case   'csv': return join(',', $excluded);
            case 'array': return $excluded;
            case  'flip': return array_flip(explode(',', $excluded));
        }
    }
   
####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- tpl_config.php

-----[найти]-----

$images['release_new']         = $_lang .'release.gif';

-----[добавить после]-----

$images['blog_news_new']       = $_lang .'blog_news.gif';

####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- functions.php

-----[найти]-----

define('AUTH_DOWNLOAD',   13);

-----[добавить после]-----

define('AUTH_POST_VIEW',  14);

-----[найти]-----

        require($bb_cfg['default_lang_dir'] .'lang_main.php');

-----[добавить после]-----

        require($bb_cfg['default_lang_dir'] .'lang_blog_main.php');

-----[найти]-----

        'adm_user_unban'     => 9,

-----[добавить после]-----

        'blog_post_delete'   => 10,
        'blog_topic_delete'  => 11,


-----[найти]-----

$bf['forum_perm'] = array(
...
);

-----[добавить после]-----

$bf['blog_auth'] = array(
    'blog_cat_auth_view'        => AUTH_VIEW,
    'blog_cat_auth_read'        => AUTH_READ,
    'blog_cat_auth_mod'         => AUTH_MOD,
    'blog_cat_auth_post'        => AUTH_POST,
    'blog_cat_auth_post_view'   => AUTH_POST_VIEW,
    'blog_cat_auth_reply'       => AUTH_REPLY,
    'blog_cat_auth_edit'        => AUTH_EDIT,
    'blog_cat_auth_delete'      => AUTH_DELETE,
);

-----[добавить в конец]-----

function int_check ($value, $array = false)
{
    if(isset($value))
    {
        if(!empty($array))
        {
            foreach ( $value as $v )
            {
                if (!is_numeric($v))
                {
                    return false;
                }   
            }
            return true;
        }else{
            $int = ( !is_int($value) ? (ctype_digit($value)) : true );
            return $int;
        }
    }   
    return false;
}
function implode_wrap($before, $after, $array)
{
    return $before . implode($after . $before, $array) . $after;
}
function is_level()
{
    global $template;
    $template->assign_vars(array(
        'IS_GUEST'           => IS_GUEST,
        'IS_USER'            => IS_USER,
        'IS_ADMIN'           => IS_ADMIN,
        'IS_MOD'             => IS_MOD,
        'IS_AM'              => IS_AM,
    ));
}
function syte_realpath($path)
{
    return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path);
}
function limit_words ($string, $word_limit)
{
    $words = explode(" ",$string);
    return implode(" ",array_splice($words,0,$word_limit));
}
function chek_qb_mail ($email)
{
    $mail = htmlspecialchars(strip_tags(trim($email)));

    return $mail;
}
function generate_code ($length = 12)
{
   $chars = 'abdefhiknrstyz1234567890';
   $numChars = strlen($chars);
   $string = '';
   for ($i = 0; $i < $length; $i++)
   {
      $string .= substr($chars, rand(1, $numChars) - 1, 1);
   }
   return $string;
}
function specified_array_unique($array, $value)
{
    $count = 0;
  
    foreach($array as $array_key => $array_value)
    {
        if ( ($count > 0) && ($array_value == $value) )
        {
            unset($array[$array_key]);
        }
      
        if ($array_value == $value) $count++;
    }
  
    return array_filter($array);
}

####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- ajax.php

-----[найти]-----

    case 'group_membership':
        require(INC_DIR .'functions_group.php');
    break;

-----[добавить после]-----

    case 'blog':
        require(INC_DIR .'bbcode.php');
        require(INC_DIR .'functions_post.php');
        require(INC_DIR .'functions_admin.php');
        require(INC_DIR .'functions_blog.php');
    break;

-----[найти]-----

        'index_data'        => array('guest'),

-----[добавить после]-----


        'rate_blogs'        => array('user'),
        'blog'                => array('guest'),

-----[найти]-----

    последнюю скобку }

-----[добавить перед]-----

    function rate_blogs()
    {
        require(AJAX_DIR .'rate_blogs.php');
    }
    function blog()
    {
        require(AJAX_DIR .'blog.php');
    }

####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- build_cat_forums.php

-----[найти]-----

$this->store('cat_forums', $data);

-----[добавить после]-----

//
// cat_blog
//
$data = array(
    'blog_cat_not_auth_forums' => array(
        'blog_cat_guest_view' => array(),
        'blog_cat_guest_read' => array(),
        'blog_cat_user_view'  => array(),
        'blog_cat_user_read'  => array(),
    ),
    'blog_cat_title_html'  => array(),
    'blog_cat_name_html' => array(),
    'c' => array(),                // also has $data['c']['cat_id']['forums'] key
    'f' => array(),                // also has $data['f']['forum_id']['subforums'] key
);

// Store only these fields from BB_FORUMS in $data['f']
$forum_store_fields += array_flip(array(
  'blog_cat_id',
  'blog_cat_name',
  'blog_cat_desc',
  'blog_cat_status',
  'blog_cat_posts',
  'blog_cat_topics',
));

// Categories
$sql = "SELECT * FROM ". BB_BLOG_CAT ." ORDER BY blog_cat_order";

foreach(DB()->fetch_rowset($sql) as $row)
{
    $data['c'][$row['blog_cat_id']] = $row;
    $data['blog_cat_title_html'][$row['blog_cat_id']] = htmlCHR($row['blog_cat_name']);
}

foreach (DB()->fetch_rowset($sql) as $row)
{
    $fid = $row['blog_cat_id'];
    $not_auth =& $data['blog_cat_not_auth_forums'];

    // Find not auth forums
    if ($row['blog_cat_auth_view'] != AUTH_ALL)
    {
        $not_auth['blog_cat_guest_view'][] = $fid;
    }
    if ($row['blog_cat_auth_view'] != AUTH_ALL && $row['blog_cat_auth_view'] != AUTH_REG)
    {
        $not_auth['blog_cat_user_view'][] = $fid;
    }
    if ($row['blog_cat_auth_read'] != AUTH_ALL)
    {
        $not_auth['blog_cat_guest_read'][] = $fid;
    }
    if ($row['blog_cat_auth_read'] != AUTH_ALL && $row['blog_cat_auth_read'] != AUTH_REG)
    {
        $not_auth['blog_cat_user_read'][] = $fid;
    }

    $data['forum'][$fid] = $row;

    // Store forums data

    $data['f'][$fid] = array_intersect_key($row, $forum_store_fields);
    $data['blog_cat_name_html'][$fid] = htmlCHR($row['blog_cat_name']);

    // Forum ids in cat
    $data['c'][$row['blog_cat_id']]['forums'][] = $fid;
}
foreach ($data['blog_cat_not_auth_forums'] as $key => $val)
{
    $data['blog_cat_not_auth_forums'][$key] = join(',', $val);
}

$this->store('blog_cat_forums', $data);

####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- common.php

-----[найти]-----

        'cat_forums'             => 'build_cat_forums.php',

-----[добавить после]-----

        'blog_cat_forums'        => 'build_cat_forums.php',

####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- sessions.php

-----[найти]-----

    /**
    *  Enqueue ads
    */

-----[выше добавить]-----

    function get_not_auth_group_chat ($auth_type)
    {
        global $datastore, $chat;

        if (IS_ADMIN) return '';

        if (!$forums = $datastore->get('group_chat'))
        {
            $datastore->update('group_chat');
            $forums = $datastore->get('group_chat');
        }

        if ($auth_type == AUTH_VIEW)
        {
            if (IS_GUEST)
            {
                return $forums['group_not_auth']['group_guest_view'];
            }
        }
        if ($auth_type == AUTH_READ)
        {
            if (IS_GUEST)
            {
                return $forums['group_not_auth']['group_guest_read'];
            }
        }

        $auth_field_match = array(
            AUTH_VIEW       => 'group_auth_view',
            AUTH_REPLY      => 'group_auth_reply',
            AUTH_EDIT       => 'group_auth_edit',
            AUTH_DELETE     => 'group_auth_delete',
        );

        $not_auth_forums = array();
        $auth_field = $auth_field_match[$auth_type];
        $is_auth_ary = $chat->auth($auth_type, AUTH_LIST_ALL, $this->data);
        foreach ($is_auth_ary as $forum_id => $is_auth)
        {
            if (!$is_auth[$auth_field])
            {
                $not_auth_forums[] = $forum_id;
            }
        }

        return join(',', $not_auth_forums);
    }

    function get_excluded_group_chat ($auth_type, $return_as = 'csv')
    {
        $excluded = array();

        if ($not_auth = $this->get_not_auth_group_chat($auth_type))
        {
            $excluded[] = $not_auth;
        }
       
        switch ($return_as)
        {
            case   'csv': return join(',', $excluded);
            case 'array': return $excluded;
            case  'flip': return array_flip(explode(',', $excluded));
        }
    }
####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- config.php

-----[в самый низ добавить]-----

$bb_cfg['blog'] = array(
  'on'                => true,
  'on_rate'            => true,
  'cache'            => 24, //кеш держится в часах
  'cache_rate'        => 24, //кеш держится в часах
  'captcha_on'         => true,
  'captcha'            => 'captcha', // может иметь значения recaptcha или captcha
  'chek_user'          => true, // true - user, false - administrator/moderator
);
$bb_cfg['dir_blog_cat_icon'] = BB_ROOT .'images/blog_icons/';
$bb_cfg['dir_blog_cat_icon_s'] = 'images/blog_icons/';
$recaptcha_public_key = '6LeD4s8SAAAAAKue7AK1Nlali1iuyabJwwMViAZq';  // You need to put your public key here
$recaptcha_private_key = '6LeD4s8SAAAAALuKkXp6WAyiFnjXwqN01rsUkNDJ'; // You need to put your private key here
$recaptchaData['lang'] = "ru";    // reCAPTCHA Язык
$recaptchaData['theme'] = "white";  // red, white, blackglass, clean, custom
$recaptcha_code = null;

####[СОХРАНИТЬ_ФАЙЛ]####

####[ОТКРЫТЬ]----- posting_editor.tpl

-----[найти]-----

<div class="mrg_8 tCenter">
    <div id="post-buttons-block" style="display: none;">
        <div class="pad_4">{CAPTCHA_HTML}</div>
        <input type="submit" name="preview" value="{L_PREVIEW}" id="post-preview-btn" onclick="$('#post-submit').remove();">&nbsp;&nbsp;
        <input onclick="submitted = true;" title="Ctrl+Enter" type="submit" name="post" class="bold" value="{L_SUBMIT}" id="post-submit-btn">&nbsp;&nbsp;
        <input type="button" value="{L_AJAX_PREVIEW}" onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#message').val()});">
    </div>
    <div id="post-js-warn">{L_JAVASCRIPT_ON}</div>
</div>

-----[заменить]-----

<div class="mrg_8 tCenter">
    <!-- IF CAPTCHA_ON -->
    <!-- IF CAPTCHA_IS == 'captcha' -->
        <div align="center"><span id="refresh_captcha">{CAPTCHA_HTML}</span> <img align="middle" src="images/pic_loading.gif" title="{L_UPDATE}" onclick="ajax.exec({ action: 'user_register', mode: 'refresh_captcha'}); return false;"></div>
    <!-- ENDIF -->
    <!-- IF CAPTCHA_IS == 'recaptcha' -->
        <div align="center">{RECAPTCHA_CODE}</div>
    <!-- ENDIF -->
    <!-- ENDIF -->
    <div id="post-buttons-block" style="display: none;">
        <!-- IF CAPTCHA_ON --><!-- ELSE --><div class="pad_4">{CAPTCHA_HTML}</div><!-- ENDIF -->
        <!-- IF QUESTS_REPLY --><!-- ELSE --><input type="submit" name="preview" value="{L_PREVIEW}" id="post-preview-btn" onclick="$('#post-submit').remove();">&nbsp;&nbsp;<!-- ENDIF -->
        <input onclick="submitted = true;" title="Ctrl+Enter" type="submit" name="post" class="bold" value="{L_SUBMIT}" id="post-submit-btn">&nbsp;&nbsp;
        <input type="button" value="{L_AJAX_PREVIEW}" onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#message').val()});">
    </div>
    <div id="post-js-warn">{L_JAVASCRIPT_ON}</div>
</div>

-----[найти]-----

<!-- IF QUICK_REPLY -->
<!-- IF IN_PM -->
<!-- ELSE -->

-----[заменить]-----

<!-- IF QUESTS_REPLY -->
<!-- ELSE -->
<!-- IF QUICK_REPLY -->
<!-- IF IN_PM -->
<!-- ELSE -->

-----[найти]-----

<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->

-----[заменить]-----

<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->

####[СОХРАНИТЬ_ФАЙЛ]####

|||||||||||||||||||||||||||||||||||||
|        ЗАПУСТИТЕ CRON ЗАДАЧУ        |
|                И                    |
|           ОЧИСТИТЕ КЕШ!!!!!        |
|||||||||||||||||||||||||||||||||||||
  • 1.JPG
    1.JPG
    61 KB · Просмотры: 136
  • 2.JPG
    2.JPG
    85.9 KB · Просмотры: 133
  • 3.JPG
    3.JPG
    40.2 KB · Просмотры: 129
  • 4.JPG
    4.JPG
    50.7 KB · Просмотры: 128
  • 5.JPG
    5.JPG
    47.1 KB · Просмотры: 127
  • 6.JPG
    6.JPG
    353.4 KB · Просмотры: 125
Автор
Exile
Скачивания
16
Просмотры
146
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок

Другие ресурсы пользователя Exile

Сверху