mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Merge pull request #26 from torrentpier/develop
R596 Основные изменения в данной ревизии: - добавлен опциональный атрибут nofollow для внешних ссылок, размещаемых в сообщениях; - добавлена поддержка добавления ретрекера в скачиваемые торренты (отключаемая глобально и непосредственно пользователем); - добавлена генерация magnet-ссылок для DC++ хабов, в просмотре содержимого торрента; - переделано выделение форумов при их поиске в карте форума; - переделан принцип генерации карты сайта (порядок тем); - переделан принцип сортировки смайликов; - исправлена ошибка с отрицательными размерами файлов, в просмотре содержимого торрента; - исправлена ошибка с несоответствием поля lastmod стандарту у карты сайта; - исправлена ошибка в запросе подписки на тему; - исправлено форматирование картинки bb-кодом [img] по центру; - исправление ошибки в украинской локализации (число скачиваний); - удалены заготовки для чата (чат будет добавлен после стабильной, 600 ревизии); - удален несоответствующий базовому набору смайлик.
This commit is contained in:
commit
4090f9f9c3
27 changed files with 193 additions and 143 deletions
|
@ -1228,7 +1228,6 @@ INSERT INTO `bb_smilies` VALUES (52, ':bz:', 'bz.gif', 'bz');
|
|||
INSERT INTO `bb_smilies` VALUES (53, ':ca:', 'ca.gif', 'ca');
|
||||
INSERT INTO `bb_smilies` VALUES (54, ':cb:', 'cb.gif', 'cb');
|
||||
INSERT INTO `bb_smilies` VALUES (55, ':cc:', 'cc.gif', 'cc');
|
||||
INSERT INTO `bb_smilies` VALUES (56, ':cd:', 'cd.gif', 'cd');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ $default_cfg_bool = array(
|
|||
'update_dlstat' => 1,
|
||||
'limit_active_tor' => 0,
|
||||
'limit_concurrent_ips' => 0,
|
||||
'retracker' => 1,
|
||||
);
|
||||
|
||||
$default_cfg_num = array(
|
||||
|
|
|
@ -32,7 +32,6 @@ switch ($ajax->action)
|
|||
require(INC_DIR . 'bbcode.php');
|
||||
break;
|
||||
|
||||
case 'chat':
|
||||
case 'posts':
|
||||
case 'post_mod_comment':
|
||||
require(INC_DIR . 'bbcode.php');
|
||||
|
@ -99,7 +98,6 @@ class ajax_common
|
|||
'post_mod_comment' => array('mod'),
|
||||
|
||||
'avatar' => array('user'),
|
||||
'chat' => array('user'),
|
||||
'gen_passkey' => array('user'),
|
||||
'change_torrent' => array('user'),
|
||||
'change_tor_status' => array('user'),
|
||||
|
@ -416,11 +414,6 @@ class ajax_common
|
|||
require(AJAX_DIR . 'avatar.php');
|
||||
}
|
||||
|
||||
function chat()
|
||||
{
|
||||
require(AJAX_DIR . 'chat.php');
|
||||
}
|
||||
|
||||
function sitemap()
|
||||
{
|
||||
require(AJAX_DIR .'sitemap.php');
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||
|
||||
// TODO 593
|
|
@ -81,8 +81,6 @@ class torrent
|
|||
|
||||
function build_filelist_array ()
|
||||
{
|
||||
global $lang;
|
||||
|
||||
$info = $this->tor_decoded['info'];
|
||||
|
||||
if (isset($info['name.utf-8']))
|
||||
|
@ -149,7 +147,7 @@ class torrent
|
|||
{
|
||||
$this->multiple = false;
|
||||
$name = isset($info['name']) ? clean_tor_dirname($info['name']) : '';
|
||||
$length = isset($info['length']) ? (int) $info['length'] : 0;
|
||||
$length = isset($info['length']) ? (float) $info['length'] : 0;
|
||||
|
||||
$this->files_ary['/'][] = $this->build_file_item($name, $length);
|
||||
natsort($this->files_ary['/']);
|
||||
|
@ -158,7 +156,17 @@ class torrent
|
|||
|
||||
function build_file_item ($name, $length)
|
||||
{
|
||||
return "$name <i>$length</i>";
|
||||
global $bb_cfg, $images, $lang;
|
||||
|
||||
$magnet_name = $magnet_ext = '';
|
||||
|
||||
if ($bb_cfg['magnet_links_enabled'])
|
||||
{
|
||||
$magnet_name = '<a title="'.$lang['DC_MAGNET'].'" href="dchub:magnet:?kt='.$name.'&xl='.$length.'"><img src="'. $images['icon_dc_magnet'] .'" width="10" height="10" border="0" /></a>';
|
||||
$magnet_ext = '<a title="'.$lang['DC_MAGNET_EXT'].'" href="dchub:magnet:?kt=.'.substr(strrchr($name, '.'), 1).'&xl='.$length.'"><img src="'. $images['icon_dc_magnet_ext'] .'" width="10" height="10" border="0" /></a>';
|
||||
}
|
||||
|
||||
return "$name <i>$length</i> $magnet_name $magnet_ext";
|
||||
}
|
||||
|
||||
function build_filelist_html ()
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
* Misc
|
||||
* Captcha
|
||||
* Atom feed
|
||||
* Nofollow
|
||||
**/
|
||||
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
@ -69,8 +70,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
|
||||
// Version info
|
||||
$bb_cfg['tp_version'] = '2.0.9 (RC)';
|
||||
$bb_cfg['tp_release_date'] = '14-08-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R595';
|
||||
$bb_cfg['tp_release_date'] = '20-08-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R596';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
@ -188,6 +189,8 @@ $tr_cfg = array(
|
|||
'limit_leech_ips' => 0,
|
||||
'tor_topic_up' => true,
|
||||
'gold_silver_enabled' => true,
|
||||
'retracker' => true,
|
||||
'retracker_host' => 'http://retracker.local/announce',
|
||||
);
|
||||
|
||||
$bb_cfg['show_dl_status_in_search'] = true;
|
||||
|
@ -603,4 +606,10 @@ $bb_cfg['atom'] = array(
|
|||
'url' => './atom', # without '/'
|
||||
);
|
||||
|
||||
// Nofollow
|
||||
$bb_cfg['nofollow'] = array(
|
||||
'disabled' => false,
|
||||
'allowed_url' => array($domain_name), // 'allowed.site', 'www.allowed.site'
|
||||
);
|
||||
|
||||
define('BB_CFG_LOADED', true);
|
|
@ -32,19 +32,6 @@ function send_file_to_browser($attachment, $upload_dir)
|
|||
$gotit = true;
|
||||
}
|
||||
|
||||
//
|
||||
// Determine the Browser the User is using, because of some nasty incompatibilities.
|
||||
// Most of the methods used in this function are from phpMyAdmin. :)
|
||||
//
|
||||
if (!empty($_SERVER['HTTP_USER_AGENT']))
|
||||
{
|
||||
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
|
||||
}
|
||||
elseif (!isset($HTTP_USER_AGENT))
|
||||
{
|
||||
$HTTP_USER_AGENT = '';
|
||||
}
|
||||
|
||||
// Correct the mime type - we force application/octet-stream for all files, except images
|
||||
// Please do not change this, it is a security precaution
|
||||
if (!strstr($attachment['mimetype'], 'image'))
|
||||
|
@ -62,8 +49,8 @@ function send_file_to_browser($attachment, $upload_dir)
|
|||
// Now the tricky part... let's dance
|
||||
header('Pragma: public');
|
||||
$real_filename = clean_filename(basename($attachment['real_filename']));
|
||||
$mimetype = "{$attachment['mimetype']};";
|
||||
$charset = (@$lang['CONTENT_ENCODING']) ? "charset={$lang['CONTENT_ENCODING']};" : '';
|
||||
$mimetype = $attachment['mimetype'].';';
|
||||
$charset = (isset($lang['CONTENT_ENCODING'])) ? "charset={$lang['CONTENT_ENCODING']};" : '';
|
||||
|
||||
// Send out the Headers
|
||||
header("Content-Type: $mimetype $charset name=\"$real_filename\"");
|
||||
|
|
BIN
upload/images/dc_magnet.png
Normal file
BIN
upload/images/dc_magnet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
upload/images/dc_magnet_ext.png
Normal file
BIN
upload/images/dc_magnet_ext.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
|
@ -497,10 +497,9 @@ class bbcode
|
|||
*/
|
||||
function init_replacements ()
|
||||
{
|
||||
$tpl = $this->tpl;
|
||||
$img_url_exp = '(https?:)?//[^\s\?&;=\#\"<>]+?\.(jpg|jpeg|gif|png)([a-z0-9/?&%;][^\[\]]*)?';
|
||||
$email_exp = '[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+';
|
||||
$url_exp = '[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+?';
|
||||
$tpl = $this->tpl;
|
||||
$img_exp = '(https?:)?//[^\s\?&;=\#\"<>]+?\.(jpg|jpeg|gif|png)([a-z0-9/?&%;][^\[\]]*)?';
|
||||
$email_exp = '[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+';
|
||||
|
||||
$this->preg = array(
|
||||
'#\[quote="(.+?)"\]#isu' => $tpl['quote_username_open'],
|
||||
|
@ -514,12 +513,8 @@ class bbcode
|
|||
'#\[size=([1-2]?[0-9])\]#isu' => '<span style="font-size: $1px; line-height: normal;">',
|
||||
'#\[align=(left|right|center|justify)\]#isu' => '<span class="post-align" style="text-align: $1;">',
|
||||
'#\[font="([\w\- \']+)"\]#isu' => '<span style="font-family: $1;">',
|
||||
"#\[img\]($img_url_exp)\[/img\]#isu" => $tpl['img'],
|
||||
"#\[img=(left|right)\]($img_url_exp)\[/img\]\s*#isu" => $tpl['img_aligned'],
|
||||
"#\[url\](https?://$url_exp)\[/url\]#isu" => '<a href="$1" class="postLink">$1</a>',
|
||||
"#\[url\](www\.$url_exp)\[/url\]#isu" => '<a href="http://$1" class="postLink">$1</a>',
|
||||
"#\[url=(https?://$url_exp)\]([^?\n\t].*?)\[/url\]#isu" => '<a href="$1" class="postLink">$2</a>',
|
||||
"#\[url=(www\.$url_exp)\]([^?\n\t].*?)\[/url\]#isu" => '<a href="http://$1" class="postLink">$2</a>',
|
||||
"#\[img\]($img_exp)\[/img\]#isu" => $tpl['img'],
|
||||
"#\[img=(left|right|center)\]($img_exp)\[/img\]\s*#isu" => $tpl['img_aligned'],
|
||||
"#\[email\]($email_exp)\[/email\]#isu" => '<a href="mailto:$1">$1</a>',
|
||||
"#\[qpost=([0-9]*)\]#isu" => '<u class="q-post">$1</u>',
|
||||
);
|
||||
|
@ -570,15 +565,22 @@ class bbcode
|
|||
$text = $this->clean_up($text);
|
||||
$text = $this->spam_filter($text);
|
||||
|
||||
// парсинг тегов
|
||||
// Tag parse
|
||||
if (strpos($text, '[') !== false)
|
||||
{
|
||||
// [CODE]
|
||||
// [code]
|
||||
$text = preg_replace_callback('#(\s*)\[code\](.+?)\[/code\](\s*)#s', array(&$this, 'code_callback'), $text);
|
||||
|
||||
// Escape tags inside tiltes in [quote="tilte"]
|
||||
$text = preg_replace_callback('#(\[(quote|spoiler)=")(.+?)("\])#', array(&$this, 'escape_tiltes_callback'), $text);
|
||||
|
||||
// [url]
|
||||
$url_exp = '[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+?';
|
||||
$text = preg_replace_callback("#\[url\](https?://$url_exp)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||
$text = preg_replace_callback("#\[url\](www\.$url_exp)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||
$text = preg_replace_callback("#\[url=(https?://$url_exp)\]([^?\n\t].*?)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||
$text = preg_replace_callback("#\[url=(www\.$url_exp)\]([^?\n\t].*?)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||
|
||||
// Normalize block level tags wrapped with new lines
|
||||
$block_tags = join('|', $this->block_tags);
|
||||
$text = str_replace("\n\n[hr]\n\n", '[br][hr][br]', $text);
|
||||
|
@ -692,6 +694,28 @@ class bbcode
|
|||
return $this->tpl['code_open'] . $code . $this->tpl['code_close'];
|
||||
}
|
||||
|
||||
/**
|
||||
* [url] callback
|
||||
*/
|
||||
function url_callback ($m)
|
||||
{
|
||||
global $bb_cfg;
|
||||
|
||||
$url = trim($m[1]);
|
||||
$url_name = (isset($m[2])) ? trim($m[2]) : $url;
|
||||
|
||||
if (in_array(parse_url($url, PHP_URL_HOST), $bb_cfg['nofollow']['allowed_url']) || $bb_cfg['nofollow']['disabled'])
|
||||
{
|
||||
$link = "<a href=\"$url\" class=\"postLink\">$url_name</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = "<a href=\"$url\" class=\"postLink\" rel=\"nofollow\">$url_name</a>";
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape tags inside tiltes in [quote="tilte"]
|
||||
*/
|
||||
|
@ -739,11 +763,22 @@ class bbcode
|
|||
*/
|
||||
function make_url_clickable_callback ($m)
|
||||
{
|
||||
global $bb_cfg;
|
||||
|
||||
$max_len = 70;
|
||||
$href = $m[1];
|
||||
$name = (mb_strlen($href, 'UTF-8') > $max_len) ? mb_substr($href, 0, $max_len - 19) .'...'. mb_substr($href, -16) : $href;
|
||||
|
||||
return "<a href=\"$href\" class=\"postLink\">$name</a>";
|
||||
if (in_array(parse_url($href, PHP_URL_HOST), $bb_cfg['nofollow']['allowed_url']) || $bb_cfg['nofollow']['disabled'])
|
||||
{
|
||||
$link = "<a href=\"$href\" class=\"postLink\">$name</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = "<a href=\"$href\" class=\"postLink\" rel=\"nofollow\">$name</a>";
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
class sitemap
|
||||
{
|
||||
var $home = "";
|
||||
var $home = '';
|
||||
var $limit = 0;
|
||||
var $topic_priority = "0.5";
|
||||
var $stat_priority = "0.5";
|
||||
var $priority = "0.6";
|
||||
var $cat_priority = "0.7";
|
||||
var $topic_priority = '0.5';
|
||||
var $stat_priority = '0.5';
|
||||
var $priority = '0.6';
|
||||
var $cat_priority = '0.7';
|
||||
|
||||
function sitemap () {
|
||||
global $bb_cfg;
|
||||
|
@ -16,7 +16,6 @@ class sitemap
|
|||
|
||||
function build_map () {
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$map .= $this->get_static();
|
||||
$map .= $this->get_forum();
|
||||
$map .= $this->get_topic();
|
||||
|
@ -26,16 +25,13 @@ class sitemap
|
|||
}
|
||||
|
||||
function build_index ($count) {
|
||||
$lm = date('c');
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$lastmod = date("Y-m-d");
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap1.xml</loc>\n<lastmod>{$lastmod}</lastmod>\n</sitemap>\n";
|
||||
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap1.xml</loc>\n<lastmod>{$lm}</lastmod>\n</sitemap>\n";
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$t = $i + 2;
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap{$t}.xml</loc>\n<lastmod>{$lastmod}</lastmod>\n</sitemap>\n";
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap{$t}.xml</loc>\n<lastmod>{$lm}</lastmod>\n</sitemap>\n";
|
||||
}
|
||||
|
||||
$map .= "</sitemapindex>";
|
||||
|
||||
return $map;
|
||||
|
@ -43,7 +39,6 @@ class sitemap
|
|||
|
||||
function build_stat () {
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$map .= $this->get_static();
|
||||
$map .= $this->get_forum();
|
||||
$map .= "</urlset>";
|
||||
|
@ -53,7 +48,6 @@ class sitemap
|
|||
|
||||
function build_map_topic ($n) {
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$map .= $this->get_topic($n);
|
||||
$map .= "</urlset>";
|
||||
|
||||
|
@ -64,24 +58,23 @@ class sitemap
|
|||
global $datastore;
|
||||
|
||||
$this->priority = $this->cat_priority;
|
||||
$xml = "";
|
||||
$lastmod = date( "Y-m-d" );
|
||||
$xml = '';
|
||||
$lm = date('c');
|
||||
|
||||
if (!$forums = $datastore->get('cat_forums'))
|
||||
{
|
||||
if (!$forums = $datastore->get('cat_forums')) {
|
||||
$datastore->update('cat_forums');
|
||||
$forums = $datastore->get('cat_forums');
|
||||
}
|
||||
$not_forums_id = $forums['not_auth_forums']['guest_view'];
|
||||
|
||||
$not_forums_id = $forums['not_auth_forums']['guest_view'];
|
||||
$ignore_forum_sql = ($not_forums_id) ? "WHERE forum_id NOT IN($not_forums_id)" : '';
|
||||
|
||||
$sql = DB()->sql_query("SELECT forum_id, forum_topics, forum_parent, forum_name FROM ".BB_FORUMS." ".$ignore_forum_sql." ORDER BY forum_id ASC");
|
||||
$sql = DB()->sql_query("SELECT forum_id, forum_topics, forum_parent, forum_name FROM " . BB_FORUMS . " " . $ignore_forum_sql . " ORDER BY forum_id ASC");
|
||||
|
||||
while ($row = DB()->sql_fetchrow($sql)) {
|
||||
if (function_exists('seo_url')) $loc = $this->home . seo_url(FORUM_URL . $row['forum_id'], $row['forum_name']);
|
||||
else $loc = $this->home . FORUM_URL. $row['forum_id'];
|
||||
$xml .= $this->get_xml( $loc, $lastmod );
|
||||
else $loc = $this->home . FORUM_URL . $row['forum_id'];
|
||||
$xml .= $this->get_xml($loc, $lm);
|
||||
}
|
||||
|
||||
return $xml;
|
||||
|
@ -90,7 +83,7 @@ class sitemap
|
|||
function get_topic ($page = false) {
|
||||
global $datastore;
|
||||
|
||||
$xml = "";
|
||||
$xml = '';
|
||||
$this->priority = $this->topic_priority;
|
||||
|
||||
if ($page) {
|
||||
|
@ -99,10 +92,10 @@ class sitemap
|
|||
$this->limit = " LIMIT {$page},40000";
|
||||
} else {
|
||||
if ($this->limit < 1) $this->limit = false;
|
||||
if( $this->limit ) {
|
||||
if ($this->limit) {
|
||||
$this->limit = " LIMIT 0," . $this->limit;
|
||||
} else {
|
||||
$this->limit = "";
|
||||
$this->limit = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,12 +107,12 @@ class sitemap
|
|||
$not_forums_id = $forums['not_auth_forums']['guest_view'];
|
||||
$ignore_forum_sql = ($not_forums_id) ? "WHERE forum_id NOT IN($not_forums_id)" : '';
|
||||
|
||||
$sql = DB()->sql_query("SELECT topic_id, topic_title, topic_time FROM " . BB_TOPICS . " ".$ignore_forum_sql." ORDER BY topic_time DESC" . $this->limit);
|
||||
$sql = DB()->sql_query("SELECT topic_id, topic_title, topic_time FROM " . BB_TOPICS . " " . $ignore_forum_sql . " ORDER BY topic_time ASC" . $this->limit);
|
||||
|
||||
while ($row = DB()->sql_fetchrow($sql)) {
|
||||
if (function_exists('seo_url')) $loc = $this->home . seo_url(TOPIC_URL . $row['topic_id'], $row['topic_title']);
|
||||
else $loc = $this->home . TOPIC_URL. $row['topic_id'];
|
||||
$xml .= $this->get_xml($loc, date("Y-m-d", $row['topic_time']));
|
||||
else $loc = $this->home . TOPIC_URL . $row['topic_id'];
|
||||
$xml .= $this->get_xml($loc, date('c', $row['topic_time']));
|
||||
}
|
||||
|
||||
return $xml;
|
||||
|
@ -128,21 +121,19 @@ class sitemap
|
|||
function get_static () {
|
||||
global $bb_cfg;
|
||||
|
||||
$xml = "";
|
||||
$lastmod = date("Y-m-d");
|
||||
$xml = '';
|
||||
$lm = date('c');
|
||||
$this->priority = $this->stat_priority;
|
||||
|
||||
if (isset($bb_cfg['static_sitemap'])) {
|
||||
$static_url = preg_replace("/\s/", '', $bb_cfg['static_sitemap']); //вырезаем переносы строк
|
||||
preg_match_all ('#(https?://[\w-]+[\.\w-]+/((?!https?://)[\w- ./?%&=])+)#', $static_url, $out);
|
||||
preg_match_all('#(https?://[\w-]+[\.\w-]+/((?!https?://)[\w- ./?%&=])+)#', $static_url, $out);
|
||||
|
||||
$static_url = count($out['0']);
|
||||
if ($static_url > 0)
|
||||
{
|
||||
foreach($out['0'] as $url)
|
||||
{
|
||||
if ($static_url > 0) {
|
||||
foreach ($out['0'] as $url) {
|
||||
$loc = $url;
|
||||
$xml .= $this->get_xml($loc, $lastmod);
|
||||
$xml .= $this->get_xml($loc, $lm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,11 +141,10 @@ class sitemap
|
|||
return $xml;
|
||||
}
|
||||
|
||||
function get_xml ($loc, $lastmod) {
|
||||
function get_xml ($loc, $lm) {
|
||||
$xml = "\t<url>\n";
|
||||
|
||||
$xml .= "\t\t<loc>$loc</loc>\n";
|
||||
$xml .= "\t\t<lastmod>$lastmod</lastmod>\n";
|
||||
$xml .= "\t\t<lastmod>$lm</lastmod>\n";
|
||||
$xml .= "\t\t<priority>" . $this->priority . "</priority>\n";
|
||||
$xml .= "\t</url>\n";
|
||||
|
||||
|
@ -184,21 +174,19 @@ class sitemap
|
|||
}
|
||||
|
||||
function create () {
|
||||
$row = DB()->fetch_row("SELECT COUNT(*) AS count FROM ". BB_TOPICS);
|
||||
$row = DB()->fetch_row("SELECT COUNT(*) AS count FROM " . BB_TOPICS);
|
||||
|
||||
if (!$this->limit) $this->limit = $row['count'];
|
||||
if ($this->limit > 40000) {
|
||||
$pages_count = @ceil($row['count'] / 40000);
|
||||
|
||||
$sitemap = $this->build_index($pages_count);
|
||||
|
||||
$handler = fopen(BB_ROOT. "/sitemap/sitemap.xml", "wb+");
|
||||
fwrite($handler, $sitemap);
|
||||
fclose($handler);
|
||||
@chmod(BB_ROOT. "/sitemap/sitemap.xml", 0666);
|
||||
|
||||
$sitemap = $this->build_stat();
|
||||
|
||||
$handler = fopen(BB_ROOT. "/sitemap/sitemap1.xml", "wb+");
|
||||
fwrite($handler, $sitemap);
|
||||
fclose($handler);
|
||||
|
@ -216,7 +204,6 @@ class sitemap
|
|||
}
|
||||
} else {
|
||||
$sitemap = $this->build_map();
|
||||
|
||||
$handler = fopen(BB_ROOT. "/sitemap/sitemap.xml", "wb+");
|
||||
fwrite($handler, $sitemap);
|
||||
fclose($handler);
|
||||
|
|
|
@ -9,14 +9,14 @@ require_once(INC_DIR .'functions_atom.php');
|
|||
$timecheck = TIMENOW - 600;
|
||||
$forums_data = DB()->fetch_rowset("SELECT forum_id, allow_reg_tracker, forum_name FROM ". BB_FORUMS);
|
||||
|
||||
if (!file_exists($bb_cfg['atom']['path'] .'/f/0.atom') && filemtime($bb_cfg['atom']['path'] .'/f/0.atom') <= $timecheck)
|
||||
if (file_exists($bb_cfg['atom']['path'] .'/f/0.atom') && filemtime($bb_cfg['atom']['path'] .'/f/0.atom') <= $timecheck)
|
||||
{
|
||||
update_forum_feed(0, $forums_data);
|
||||
}
|
||||
|
||||
foreach ($forums_data as $forum_data)
|
||||
{
|
||||
if (!file_exists($bb_cfg['atom']['path'] .'/f/'. $forum_data['forum_id'] .'.atom') && filemtime($bb_cfg['atom']['path'] .'/f/'. $forum_data['forum_id'] .'.atom') <= $timecheck)
|
||||
if (file_exists($bb_cfg['atom']['path'] .'/f/'. $forum_data['forum_id'] .'.atom') && filemtime($bb_cfg['atom']['path'] .'/f/'. $forum_data['forum_id'] .'.atom') <= $timecheck)
|
||||
{
|
||||
update_forum_feed($forum_data['forum_id'], $forum_data);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ global $bb_cfg;
|
|||
$smilies = array();
|
||||
|
||||
$rowset = DB()->fetch_rowset("SELECT * FROM ". BB_SMILIES);
|
||||
usort($rowset, 'smiley_sort');
|
||||
sort($rowset);
|
||||
|
||||
foreach ($rowset as $smile)
|
||||
{
|
||||
|
|
|
@ -275,6 +275,7 @@ $bf['user_opt'] = array(
|
|||
'dis_post' => 12, // Запрет на отправку сообщений
|
||||
'dis_post_edit' => 13, // Запрет на редактирование сообщений
|
||||
'user_dls' => 14, // Скрывать список текущих закачек в профиле
|
||||
'user_retracker' => 15, // Добавлять ретрекер к скачиваемым торрентам
|
||||
);
|
||||
|
||||
function bit2dec ($bit_num)
|
||||
|
@ -1776,16 +1777,6 @@ function obtain_word_list (&$orig_word, &$replacement_word)
|
|||
return true;
|
||||
}
|
||||
|
||||
function smiley_sort ($a, $b)
|
||||
{
|
||||
if (strlen($a['code']) == strlen($b['code']))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (strlen($a['code']) > strlen($b['code'])) ? -1 : 1;
|
||||
}
|
||||
|
||||
function bb_die ($msg_text)
|
||||
{
|
||||
global $ajax, $bb_cfg, $lang, $template, $theme, $userdata;
|
||||
|
|
|
@ -354,7 +354,7 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE
|
|||
|
||||
function send_torrent_with_passkey ($filename)
|
||||
{
|
||||
global $attachment, $auth_pages, $userdata, $bb_cfg, $lang;
|
||||
global $attachment, $auth_pages, $userdata, $bb_cfg, $tr_cfg, $lang;
|
||||
|
||||
if (!$bb_cfg['bt_add_auth_key'] || $attachment['extension'] !== TORRENT_EXT || !$size = @filesize($filename))
|
||||
{
|
||||
|
@ -446,7 +446,7 @@ function send_torrent_with_passkey ($filename)
|
|||
$announce = strval($ann_url . "?$passkey_key=$passkey_val");
|
||||
|
||||
// Replace original announce url with tracker default
|
||||
if ($bb_cfg['bt_replace_ann_url'] || !@$tor['announce'])
|
||||
if ($bb_cfg['bt_replace_ann_url'] || !isset($tor['announce']))
|
||||
{
|
||||
$tor['announce'] = $announce;
|
||||
}
|
||||
|
@ -456,11 +456,30 @@ function send_torrent_with_passkey ($filename)
|
|||
{
|
||||
unset($tor['announce-list']);
|
||||
}
|
||||
elseif (@$tor['announce-list'])
|
||||
elseif (isset($tor['announce-list']))
|
||||
{
|
||||
$tor['announce-list'] = array_merge($tor['announce-list'], array(array($announce)));
|
||||
}
|
||||
|
||||
// Add retracker
|
||||
if (isset($tr_cfg['retracker']) && $tr_cfg['retracker'])
|
||||
{
|
||||
if (bf($userdata['user_opt'], 'user_opt', 'user_retracker'))
|
||||
{
|
||||
if (!isset($tor['announce-list']))
|
||||
{
|
||||
$tor['announce-list'] = array(
|
||||
array($announce),
|
||||
array($tr_cfg['retracker_host'])
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tor['announce-list'] = array_merge($tor['announce-list'], array(array($tr_cfg['retracker_host'])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add publisher & topic url
|
||||
$publisher_name = $bb_cfg['server_name'];
|
||||
$publisher_url = make_url(TOPIC_URL . $topic_id);
|
||||
|
|
|
@ -284,7 +284,6 @@ define('BB_BT_TORHELP', 'bb_bt_torhelp');
|
|||
define('BB_BT_TORSTAT', 'bb_bt_torstat');
|
||||
define('BB_CATEGORIES', 'bb_categories');
|
||||
define('BB_CAPTCHA', 'bb_captcha');
|
||||
define('BB_CHAT', 'bb_chat');
|
||||
define('BB_CONFIG', 'bb_config');
|
||||
define('BB_CRON', 'bb_cron');
|
||||
define('BB_DISALLOW', 'bb_disallow');
|
||||
|
|
|
@ -370,7 +370,7 @@ foreach ($profile_fields as $field => $can_edit)
|
|||
$reg_mode = ($mode == 'register');
|
||||
|
||||
$update_user_opt = array(
|
||||
# 'user_opt_name' => ($reg_mode) ? #reg_setting : #in_login_change
|
||||
# 'user_opt_name' => ($reg_mode) ? #reg_value : #in_login_change
|
||||
'user_viewemail' => ($reg_mode) ? false : true,
|
||||
'user_viewonline' => ($reg_mode) ? false : true,
|
||||
'user_notify' => ($reg_mode) ? true : true,
|
||||
|
@ -378,6 +378,7 @@ foreach ($profile_fields as $field => $can_edit)
|
|||
'user_porn_forums' => ($reg_mode) ? false : true,
|
||||
'user_dls' => ($reg_mode) ? false : true,
|
||||
'user_callseed' => ($reg_mode) ? true : true,
|
||||
'user_retracker' => ($reg_mode) ? true : true,
|
||||
);
|
||||
|
||||
foreach ($update_user_opt as $opt => $can_change_opt)
|
||||
|
|
|
@ -1114,6 +1114,8 @@ $lang['SEEDING'] = 'Seed';
|
|||
$lang['LEECHING'] = 'Leech';
|
||||
$lang['IS_REGISTERED'] = 'Registered';
|
||||
$lang['MAGNET'] = 'Magnet';
|
||||
$lang['DC_MAGNET'] = 'Search in DC++ by filename';
|
||||
$lang['DC_MAGNET_EXT'] = 'Search in DC++ by extension';
|
||||
|
||||
//torrent status mod
|
||||
$lang['TOR_STATUS'] = 'Status';
|
||||
|
@ -1515,7 +1517,8 @@ $lang['ICQ_ERROR'] = 'The field of "ICQ" may contain only icq number';
|
|||
$lang['INVALID_DATE'] = 'Error date ';
|
||||
$lang['PROFILE_USER'] = 'Viewing profile';
|
||||
$lang['GOOD_UPDATE'] = 'was successfully changed';
|
||||
$lang['DENY_VISITORS'] = 'Hide the current list of downloads on your profile';
|
||||
$lang['UCP_DOWNLOADS'] = 'Downloads';
|
||||
$lang['HIDE_DOWNLOADS'] = 'Hide the current list of downloads on your profile';
|
||||
$lang['BAN_USER'] = 'To prevent a user';
|
||||
$lang['USER_NOT_ALLOWED'] = 'Users are not permitted';
|
||||
$lang['HIDE_AVATARS'] = 'Show avatars';
|
||||
|
@ -2524,6 +2527,7 @@ $lang['USE_AUTH_KEY_EXPL'] = 'enable check for passkey';
|
|||
$lang['AUTH_KEY_NAME'] = 'Passkey name';
|
||||
$lang['AUTH_KEY_NAME_EXPL'] = 'passkey key name in GET request';
|
||||
$lang['ALLOW_GUEST_DL'] = 'Allow guest access to tracker';
|
||||
$lang['ADD_RETRACKER'] = 'Add retracker in torrent files';
|
||||
|
||||
//
|
||||
// Forum config
|
||||
|
@ -2764,7 +2768,7 @@ $lang['BOT_MESS_SPLITS'] = 'Topic has been split. New topic - [b]%s[/b][br][br]%
|
|||
$lang['BOT_TOPIC_SPLITS'] = 'Topic has been split from [b]%s[/b][br][br]%s';
|
||||
|
||||
$lang['CALLSEED'] = 'Downloaded the call';
|
||||
$lang['CALLSEED_EXPLAIN'] = 'Take notice with a request to return to the distribution?';
|
||||
$lang['CALLSEED_EXPLAIN'] = 'Take notice with a request to return to the distribution';
|
||||
$lang['CALLSEED_SUBJECT'] = 'Download help %s';
|
||||
$lang['CALLSEED_TEXT'] = 'Hello![br]Your help is needed in the release [url=%s]%s[/url][br]If you decide to help, but already deleted the torrent file, you can download it [url=%s]this[/url][br][br]I hope for your help!';
|
||||
$lang['CALLSEED_MSG_OK'] = 'Message has been sent to all those who downloaded this release';
|
||||
|
|
|
@ -1114,6 +1114,8 @@ $lang['SEEDING'] = 'Сидер';
|
|||
$lang['LEECHING'] = 'Личер';
|
||||
$lang['IS_REGISTERED'] = 'Зарегистрирован';
|
||||
$lang['MAGNET'] = 'Magnet';
|
||||
$lang['DC_MAGNET'] = 'Поиск в DC++ по имени файла';
|
||||
$lang['DC_MAGNET_EXT'] = 'Поиск в DC++ по расширению';
|
||||
|
||||
//torrent status mod
|
||||
$lang['TOR_STATUS'] = 'Статус';
|
||||
|
@ -1515,7 +1517,8 @@ $lang['ICQ_ERROR'] = 'Поле "ICQ" может содержать только
|
|||
$lang['INVALID_DATE'] = 'Ошибка даты ';
|
||||
$lang['PROFILE_USER'] = 'Профиль пользователя';
|
||||
$lang['GOOD_UPDATE'] = 'был успешно изменен';
|
||||
$lang['DENY_VISITORS'] = 'Скрывать список текущих закачек в профиле';
|
||||
$lang['UCP_DOWNLOADS'] = 'Закачки';
|
||||
$lang['HIDE_DOWNLOADS'] = 'Скрывать список текущих закачек в профиле';
|
||||
$lang['BAN_USER'] = 'Запретить пользователю';
|
||||
$lang['USER_NOT_ALLOWED'] = 'Пользователю запрещено';
|
||||
$lang['HIDE_AVATARS'] = 'Показывать аватар';
|
||||
|
@ -2524,6 +2527,7 @@ $lang['USE_AUTH_KEY_EXPL'] = 'включить авторизацию по passk
|
|||
$lang['AUTH_KEY_NAME'] = 'Имя ключа passkey';
|
||||
$lang['AUTH_KEY_NAME_EXPL'] = 'имя ключа, который будет добавляться в GET запросе к announce url для идентификации юзера';
|
||||
$lang['ALLOW_GUEST_DL'] = 'Разрешить "гостям" (неавторизованным юзерам) доступ к трекеру';
|
||||
$lang['ADD_RETRACKER'] = 'Добавлять ретрекер в торрент-файлы';
|
||||
|
||||
//
|
||||
// Forum config
|
||||
|
@ -2764,7 +2768,7 @@ $lang['BOT_MESS_SPLITS'] = 'Сообщения из этой темы были
|
|||
$lang['BOT_TOPIC_SPLITS'] = 'Тема была выделена из [b]%s[/b][br][br]%s';
|
||||
|
||||
$lang['CALLSEED'] = 'Позвать скачавших';
|
||||
$lang['CALLSEED_EXPLAIN'] = 'Принимать уведомления с просьбой вернуться на раздачу?';
|
||||
$lang['CALLSEED_EXPLAIN'] = 'Принимать уведомления с просьбой вернуться на раздачу';
|
||||
$lang['CALLSEED_SUBJECT'] = 'Помогите скачать %s';
|
||||
$lang['CALLSEED_TEXT'] = 'Здравствуйте![br]Ваша помощь необходима в раздаче [url=%s]%s[/url][br]Если Вы решили помочь, но уже удалили торрент-файл, Вы можете скачать его [url=%s]здесь[/url][br][br]Надеюсь на Вашу помощь!';
|
||||
$lang['CALLSEED_MSG_OK'] = 'Сообщения успешно отправлены всем скачавшим данный релиз';
|
||||
|
|
|
@ -1114,6 +1114,8 @@ $lang['SEEDING'] = 'Сідер';
|
|||
$lang['LEECHING'] = 'Лічер';
|
||||
$lang['IS_REGISTERED'] = 'Зареєстрований';
|
||||
$lang['MAGNET'] = 'Magnet';
|
||||
$lang['DC_MAGNET'] = 'Пошук в DC++ по імені файлу';
|
||||
$lang['DC_MAGNET_EXT'] = 'Пошук в DC++ по розширенню';
|
||||
|
||||
//torrent status mod
|
||||
$lang['TOR_STATUS'] = 'Статус';
|
||||
|
@ -1515,7 +1517,8 @@ $lang['ICQ_ERROR'] = 'Поле "ICQ" може містити тільки ном
|
|||
$lang['INVALID_DATE'] = 'Помилка дати ';
|
||||
$lang['PROFILE_USER'] = 'Профіль користувача';
|
||||
$lang['GOOD_UPDATE'] = 'був успішно змінен';
|
||||
$lang['DENY_VISITORS'] = 'Приховувати список поточних завантажень в профілі';
|
||||
$lang['UCP_DOWNLOADS'] = 'Завантажити';
|
||||
$lang['HIDE_DOWNLOADS'] = 'Приховувати список поточних завантажень в профілі';
|
||||
$lang['BAN_USER'] = 'Заборонити користувачу';
|
||||
$lang['USER_NOT_ALLOWED'] = 'Користувачеві заборонено';
|
||||
$lang['HIDE_AVATARS'] = 'Показувати аватар';
|
||||
|
@ -2441,7 +2444,7 @@ $lang['ATTACHMENTS_PER_DAY'] = 'Прикріплень за день';
|
|||
|
||||
// Control Panel -> Attachments
|
||||
$lang['STATISTICS_FOR_USER'] = 'Статистика додатків для %s'; // replace %s with username
|
||||
$lang['DOWNLOAD'] = 'Завантажити';
|
||||
$lang['DOWNLOADS'] = 'Завантажити';
|
||||
$lang['POST_TIME'] = 'Дата повідомлення';
|
||||
$lang['POSTED_IN_TOPIC'] = 'Розміщене в темі';
|
||||
$lang['SUBMIT_CHANGES'] = 'Зберегти зміни';
|
||||
|
@ -2524,6 +2527,7 @@ $lang['USE_AUTH_KEY_EXPL'] = 'включити авторизацію по passk
|
|||
$lang['AUTH_KEY_NAME'] = "Ім'я ключа passkey";
|
||||
$lang['AUTH_KEY_NAME_EXPL'] = "ім'я ключа, який буде додаватися до GET запиті до announce url для ідентифікації користувача";
|
||||
$lang['ALLOW_GUEST_DL'] = "Дозволити 'гостям' (неавторизованим юзерам) доступ до трекера";
|
||||
$lang['ADD_RETRACKER'] = 'Додавати ретрекер в торрент-файли';
|
||||
|
||||
//
|
||||
// Forum config
|
||||
|
@ -2764,7 +2768,7 @@ $lang['BOT_MESS_SPLITS'] = 'Повідомлення з цієї теми бул
|
|||
$lang['BOT_TOPIC_SPLITS'] = 'Тема була виділена з [b]%s[/b][br][br]%s';
|
||||
|
||||
$lang['CALLSEED'] = 'Покликати, кто завантажил';
|
||||
$lang['CALLSEED_EXPLAIN'] = 'Приймати повідомлення з проханням повернутися на роздачу?';
|
||||
$lang['CALLSEED_EXPLAIN'] = 'Приймати повідомлення з проханням повернутися на роздачу';
|
||||
$lang['CALLSEED_SUBJECT'] = 'Допоможіть завантажити %s';
|
||||
$lang['CALLSEED_TEXT'] = 'Привіт![br]Ваша допомога необхідна в роздачі [url=%s]%s[/url][br]Якщо ви вирішили допомогти, але вже видалили торрент-файл, можете завантажити його [url=%s]здесь[/url][br][br]Сподіваюся на вашу допомогу!';
|
||||
$lang['CALLSEED_MSG_OK'] = 'Повідомлення успішно відправлено всім скачавшим даний реліз';
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
<td><h4>{L_ALLOW_GUEST_DL}</h4><!-- IF L_ALLOW_GUEST_DL_EXPL --><h6>{L_ALLOW_GUEST_DL_EXPL}</h6><!-- ENDIF --></td>
|
||||
<td> <!-- IF $bb_cfg['bt_tor_browse_only_reg'] -->{L_NO}<!-- ELSE -->{L_YES}<!-- ENDIF --></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2">{L_LIMIT_ACTIVE_TOR_HEAD}</th>
|
||||
</tr>
|
||||
|
@ -103,10 +102,14 @@
|
|||
<td><h4>{L_UPDATE_DLSTAT}</h4><h6>Used in cron <b>Tracker cleanup and dlstat</b></h6></td>
|
||||
<td><label for="update_dlstat1"><input type="radio" name="update_dlstat" id="update_dlstat1" value="1" {UPDATE_DLSTAT_YES} /> {L_UPDATE_DLSTAT_YES} </label><label for="update_dlstat2"> <input type="radio" name="update_dlstat" id="update_dlstat2" value="0" {UPDATE_DLSTAT_NO} /> {L_UPDATE_DLSTAT_NO} </label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>{L_ADD_RETRACKER}</h4></td>
|
||||
<td><label for="retracker_true"><input type="radio" name="retracker" id="retracker_true" value="1" {RETRACKER_YES} /> {L_YES} </label><label for="retracker_false"> <input type="radio" name="retracker" id="retracker_false" value="0" {RETRACKER_NO} /> {L_NO} </label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>{L_GOLD} / {L_SILVER}</h4></td>
|
||||
<td>
|
||||
<label><input type="radio" name="gold_silver_enabled" value="1" <!-- IF GOLD_SILVER_ENABLED -->checked="checked"<!-- ENDIF --> />{L_ENABLED}</label>
|
||||
<label><input type="radio" name="gold_silver_enabled" value="1" <!-- IF GOLD_SILVER_ENABLED -->checked="checked"<!-- ENDIF --> />{L_ENABLED}</label>
|
||||
<label><input type="radio" name="gold_silver_enabled" value="0" <!-- IF not GOLD_SILVER_ENABLED -->checked="checked"<!-- ENDIF --> />{L_DISABLED}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -128,5 +131,4 @@
|
|||
</table>
|
||||
</form>
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
<br clear="all" />
|
|
@ -18,13 +18,13 @@ a.hl, a.hl:visited { color: #1515FF; }
|
|||
function qs_highlight_found ()
|
||||
{
|
||||
this.style.display = '';
|
||||
var a = $('a:first', this)[0];
|
||||
var a = $('a:first', this);
|
||||
var q = $('#q-search').val().toLowerCase();
|
||||
if (q != '' && a.innerHTML.toLowerCase().indexOf(q) != -1) {
|
||||
a.className = 'hl';
|
||||
if (q != '' && a.text().toLowerCase().indexOf(q) != -1) {
|
||||
a.html(a.text().replace(q, '<b style="color:#1515ff">' + q + '</b>'));
|
||||
}
|
||||
else {
|
||||
a.className = '';
|
||||
a.html(a.text());
|
||||
}
|
||||
}
|
||||
function open_feed (f_id)
|
||||
|
|
|
@ -62,6 +62,8 @@ $images['folder_dl_hot_new'] = $_main .'folder_dl_hot_new.gif';
|
|||
$images['icon_clip'] = $_img .'icon_clip.gif';
|
||||
$images['icon_dn'] = $_img .'icon_dn.gif';
|
||||
$images['icon_magnet'] = $_img .'magnet.png';
|
||||
$images['icon_dc_magnet'] = $_img .'dc_magnet.png';
|
||||
$images['icon_dc_magnet_ext'] = $_img .'dc_magnet_ext.png';
|
||||
|
||||
// posting_icons
|
||||
$images['post_new'] = $_lang .'post.gif';
|
||||
|
|
|
@ -211,13 +211,6 @@ ajax.callback.posts = function(data){
|
|||
<label><input type="radio" name="user_viewonline" value="0" <!-- IF not USER_VIEWONLINE -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_DENY_VISITORS}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="user_dls" value="1" <!-- IF USER_DLS -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="user_dls" value="0" <!-- IF not USER_DLS -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_ALWAYS_NOTIFY}:<br /><h6>{L_ALWAYS_NOTIFY_EXPLAIN}</h6></td>
|
||||
<td>
|
||||
|
@ -225,7 +218,6 @@ ajax.callback.posts = function(data){
|
|||
<label><input type="radio" name="user_notify" value="0" <!-- IF not USER_NOTIFY -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- IF $bb_cfg['pm_notify_enabled'] -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_NOTIFY_ON_PRIVMSG}:</td>
|
||||
|
@ -235,12 +227,14 @@ ajax.callback.posts = function(data){
|
|||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF SHOW_DATEFORMAT -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_CALLSEED}:<br /><h6>{L_CALLSEED_EXPLAIN}</h6></td>
|
||||
<td>
|
||||
<label><input type="radio" name="user_callseed" value="1" <!-- IF USER_CALLSEED -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="user_callseed" value="0" <!-- IF not USER_CALLSEED -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
<td class="prof-title">{L_DATE_FORMAT}:<br /><h6>{L_DATE_FORMAT_EXPLAIN}</h6></td>
|
||||
<td><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<th colspan="2">{L_UCP_DOWNLOADS}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_HIDE_PORN_FORUMS}:</td>
|
||||
|
@ -249,12 +243,27 @@ ajax.callback.posts = function(data){
|
|||
<label><input type="radio" name="user_porn_forums" value="0" <!-- IF not USER_PORN_FORUMS -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- IF SHOW_DATEFORMAT -->
|
||||
<tr>
|
||||
<td class="prof-title">{L_DATE_FORMAT}:<br /><h6>{L_DATE_FORMAT_EXPLAIN}</h6></td>
|
||||
<td><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" /></td>
|
||||
<td class="prof-title">{L_ADD_RETRACKER}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="user_retracker" value="1" <!-- IF USER_RETRACKER -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="user_retracker" value="0" <!-- IF not USER_RETRACKER -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_HIDE_DOWNLOADS}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="user_dls" value="1" <!-- IF USER_DLS -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="user_dls" value="0" <!-- IF not USER_DLS -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="prof-title">{L_CALLSEED_EXPLAIN}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="user_callseed" value="1" <!-- IF USER_CALLSEED -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="user_callseed" value="0" <!-- IF not USER_CALLSEED -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<th colspan="2">{L_AVATAR_PANEL}</th>
|
||||
</tr>
|
||||
|
|
|
@ -405,7 +405,8 @@ td.topic_id { cursor: pointer; }
|
|||
<td class="small bold nowrap tRight w100">
|
||||
|
||||
<!-- IF LOGGED_IN -->
|
||||
<a class="small" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a> <span style="color:#CDCDCD;">|</span>
|
||||
<a class="small" href="#" onclick="return post2url('feed.php', {mode: 'get_feed_url', type: 'f', id: '{FORUM_ID}'})">{FEED_IMG} {L_ATOM_SUBSCRIBE}</a> ·
|
||||
<a class="small" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a> ·
|
||||
<a class="menu-root" href="#only-new-options">{L_DISPLAYING_OPTIONS}</a>
|
||||
<!-- ENDIF / LOGGED_IN -->
|
||||
</td>
|
||||
|
|
|
@ -93,7 +93,7 @@ if ($topic_id)
|
|||
$sql = "SELECT t.*, f.*, tw.notify_status
|
||||
FROM ". BB_TOPICS ." t
|
||||
LEFT JOIN ". BB_FORUMS ." f USING(forum_id)
|
||||
LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND user_id = {$userdata['user_id']})
|
||||
LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
|
||||
WHERE t.topic_id = $topic_id
|
||||
";
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ elseif ($post_id)
|
|||
FROM ". BB_TOPICS ." t
|
||||
LEFT JOIN ". BB_FORUMS ." f USING(forum_id)
|
||||
LEFT JOIN ". BB_POSTS ." p USING(topic_id)
|
||||
LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND user_id = {$userdata['user_id']})
|
||||
LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
|
||||
WHERE p.post_id = $post_id
|
||||
";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue