This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{* Вставить этот код примерно внутрь <span class="extrabtns"> | |
Классы кнопок (spritebtn) могут не совпадать в твоими, там разберешься. Надо оформлять так же как кнопки скрытия треда и т. п. | |
Главное оставть data- свойства и класс "qrl" | |
*} | |
{* img_board_page.tpl, ОП-пост (первое появление) *} | |
<a href="#" data-parent="{if $post.parentid eq 0}{$post.id}{else}{$post.parentid}{/if}" class="qrl" title="{t}Quick Reply{/t}"><img src="{$boardpath}css/icons/blank.gif" border="0" class="quickreply spritebtn" alt="quickreply" /></a> | |
{* img_board_page.tpl, Обычный пост (второе появление) *} | |
<a href="#" data-parent="{$post.parentid}" data-postnum="{$post.id}" class="qrl" title="{t}Quick Reply{/t} в тред {$post.parentid}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Вставить это в $(document).ready(funciton() {}) */ | |
//Вешаем обработчкик на кнопки быстрого ответа | |
$('body').on('click', '.qrl', quickreply); | |
//Клонируем форму, присваиваем ей ID #postclone, добавляем проверку введенной капчи (функцию checkcaptcha нужно будет модифицировать, см. ниже), добавляем классы для придания стиля, убираем из формы .rules | |
$('#postform').clone().attr({'id': 'postclone', 'onsubmit': "return checkcaptcha('postclone');"}).appendTo('body').hide().addClass('reflinkpreview content-background qreplyform').find('.rules').remove(); | |
//Меняем id инпутов и сответствующих лейблов в клоне формы (для того, чтобы по клике по лейблу кликались чекбоксы) | |
$('#postclone label').each(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#de-btn-settings')[0].click(); | |
$('.de-cfg-tab[info=posts]')[0].click(); | |
if($('input[info=ajaxUpdThr]:checked').length) { $('input[info=ajaxUpdThr]:checked')[0].click(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var node_ip = '127.0.0.1', node_port = 9001; | |
var express = require('express'), app = express(); | |
var server = require('http').createServer(app); | |
var cheerio = require('cheerio'); | |
var _ = require('lodash'); | |
app.get('/boards/:chid', function (req, res) { | |
if(getBoards.hasOwnProperty(req.params.chid)) | |
getBoards[req.params.chid](res); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'Roboto'; | |
font-style: normal; | |
font-weight: 400; | |
src: local('Roboto Regular'),local('Roboto-Regular'),url(//fonts.gstatic.com/s/roboto/v15/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2)format('woff2'); | |
unicode-range: U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F; | |
} | |
@font-face { | |
font-family:'Roboto';font-style:normal;font-weight:400;src:local('Roboto Regular'),local('Roboto-Regular'),url(//fonts.gstatic.com/s/roboto/v15/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2)format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Math.radians = function(degrees) { | |
return degrees * Math.PI / 180; | |
}; | |
Math.degrees = function(radians) { | |
return radians * 180 / Math.PI; | |
}; | |
Math.ctg = function(val) { | |
return 1/Math.tan(val); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var target = document.querySelector('#target'), | |
targetContext = target.getContext('2d'), | |
buffer = document.querySelector('#buffer'), | |
bufferContext = buffer.getContext('2d'), | |
height = target.height, width = target.width, | |
opacity = 1, | |
radius = 10; | |
function onStroke() { | |
var data = '<svg xmlns="http://www.w3.org/2000/svg" width="800" height="450">' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function smiley_callback($matches) { | |
$src = FALSE; | |
foreach(array('.gif','.png') as $extension) { | |
if(file_exists(KU_ROOTDIR.KU_SMILEDIR.$matches[1].$extension)) { | |
$src = KU_WEBPATH.'/'.KU_SMILEDIR.$matches[1].$extension; | |
break; | |
} | |
} | |
$return = ($src) ? '<img style="vertical-align: middle;" src="'.$src.'" />': ':'.$matches[1].':'; | |
return $return; |
OlderNewer