forked from GithubBackups/vichan
Merge /srv/http
This commit is contained in:
commit
958dbb1af6
@ -1332,23 +1332,26 @@ function getPages($mod=false) {
|
|||||||
|
|
||||||
// Stolen with permission from PlainIB (by Frank Usrs)
|
// Stolen with permission from PlainIB (by Frank Usrs)
|
||||||
function make_comment_hex($str) {
|
function make_comment_hex($str) {
|
||||||
|
global $config;
|
||||||
// remove cross-board citations
|
// remove cross-board citations
|
||||||
// the numbers don't matter
|
// the numbers don't matter
|
||||||
$str = preg_replace('!>>>/[A-Za-z0-9]+/!', '', $str);
|
$str = preg_replace("!>>>/[A-Za-z0-9]+/!", '', $str);
|
||||||
|
|
||||||
if (function_exists('iconv')) {
|
if ($config['robot_enable']) {
|
||||||
// remove diacritics and other noise
|
if (function_exists('iconv')) {
|
||||||
// FIXME: this removes cyrillic entirely
|
// remove diacritics and other noise
|
||||||
$oldstr = $str;
|
// FIXME: this removes cyrillic entirely
|
||||||
$str = @iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str);
|
$oldstr = $str;
|
||||||
if (!$str) $str = $oldstr;
|
$str = @iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str);
|
||||||
|
if (!$str) $str = $oldstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
$str = strtolower($str);
|
||||||
|
|
||||||
|
// strip all non-alphabet characters
|
||||||
|
$str = preg_replace('/[^a-z]/', '', $str);
|
||||||
}
|
}
|
||||||
|
|
||||||
$str = strtolower($str);
|
|
||||||
|
|
||||||
// strip all non-alphabet characters
|
|
||||||
$str = preg_replace('/[^a-z]/', '', $str);
|
|
||||||
|
|
||||||
return md5($str);
|
return md5($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
/* gettext-compatible _ function, example of usage:
|
/* gettext-compatible _ function, example of usage:
|
||||||
*
|
*
|
||||||
* > // Loading pl_PL.json here (containing polish translation strings generated by tools/i18n_compile.php)
|
* > // Loading pl_PL.json here (containing polish translation strings generated by tools/i18n_compile.php)
|
||||||
@ -258,7 +257,7 @@ function highlightReply(id) {
|
|||||||
if (typeof window.event != "undefined") {
|
if (typeof window.event != "undefined") {
|
||||||
// don't highlight on middle click
|
// don't highlight on middle click
|
||||||
if (event.which == 2) return true;
|
if (event.which == 2) return true;
|
||||||
window.event.preventDefault();
|
if (active_page == 'thread' && typeof window.event.preventDefault != "undefined") window.event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
var divs = document.getElementsByTagName('div');
|
var divs = document.getElementsByTagName('div');
|
||||||
@ -434,6 +433,9 @@ function ready() {
|
|||||||
|
|
||||||
var post_date = "{{ config.post_date }}";
|
var post_date = "{{ config.post_date }}";
|
||||||
var max_images = {{ config.max_images }};
|
var max_images = {{ config.max_images }};
|
||||||
|
if (typeof active_page === "undefined") {
|
||||||
|
active_page = "page";
|
||||||
|
}
|
||||||
|
|
||||||
{% if config.google_analytics %}{% raw %}
|
{% if config.google_analytics %}{% raw %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user