mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
r90
git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@90 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
920187016b
commit
0e37a994d2
7 changed files with 13 additions and 94 deletions
|
@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1;
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.0.2';
|
||||
$bb_cfg['tp_release_state'] = 'TP II r89';
|
||||
$bb_cfg['tp_release_state'] = 'TP II r90';
|
||||
$bb_cfg['tp_release_date'] = '05-07-2011';
|
||||
|
||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||
|
|
|
@ -568,6 +568,7 @@ class bbcode
|
|||
$tpl = $this->tpl;
|
||||
$img_url_exp = 'http://[^\s\?&;:=\#\"<>]+?\.(jpg|jpeg|gif|png)';
|
||||
$email_exp = '[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+';
|
||||
$url_exp = '[\w]+?://[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+?';
|
||||
|
||||
$this->preg = array(
|
||||
'#\[quote="(.+?)"\]#isu' => $tpl['quote_username_open'],
|
||||
|
@ -583,6 +584,8 @@ class bbcode
|
|||
'#\[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\]($url_exp)\[/url\]#isu" => '<a href="$1" class="postLink">$1</a>',
|
||||
"#\[url=($url_exp)\]([^?\n\r\t].*?)\[/url\]#isu" => '<a href="$1" class="postLink">$2</a>',
|
||||
"#\[email\]($email_exp)\[/email\]#isu" => '<a href="mailto:$1">$1</a>',
|
||||
);
|
||||
|
||||
|
@ -771,17 +774,14 @@ class bbcode
|
|||
{
|
||||
global $bb_cfg;
|
||||
|
||||
$url_regexp = array();
|
||||
$url_regexp[] = "#\[url\]([\w]+?://[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+?)\[/url\]#isu";
|
||||
$url_regexp[] = "#\[url=([\w]+?://[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#isu";
|
||||
$url_regexp[] = "#(?<![\"'=])\b([\w]+?://[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+?)(?![\"']|\[/url|\[/img|</a)(?=[,!]?\s|[\)<!])#isu";
|
||||
$url_regexp = "#(?<![\"'=])\b([\w]+?://[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+?)(?![\"']|\[/url|\[/img|</a)(?=[,!]?\s|[\)<!])#xiu";
|
||||
|
||||
// pad it with a space so we can match things at the start of the 1st line.
|
||||
$ret = " $text ";
|
||||
|
||||
// hide passkey
|
||||
$ret = hide_passkey($ret);
|
||||
|
||||
print_R($ret);
|
||||
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
|
||||
$ret = preg_replace_callback($url_regexp, array(&$this, 'make_url_clickable_callback'), $ret);
|
||||
|
||||
|
@ -796,21 +796,10 @@ class bbcode
|
|||
*/
|
||||
function make_url_clickable_callback ($m)
|
||||
{
|
||||
global $bb_cfg;
|
||||
|
||||
$max_len = 70;
|
||||
$href = $m[1];
|
||||
$name = empty($m[2]) ? $href : $m[2];
|
||||
$name = (mb_strlen($name, 'UTF-8') > $max_len) ? mb_substr($href, 0, $max_len - 19) .'...'. mb_substr($href, -16) : $href;
|
||||
|
||||
if(mb_strlen($name, 'UTF-8') > $max_len)
|
||||
{
|
||||
$name = mb_substr($name, 0, $max_len - 19, 'UTF-8') .'...'. mb_substr($name, -16, 'UTF-8');
|
||||
}
|
||||
|
||||
if(!preg_match("#{$bb_cfg['server_name']}#", $href))
|
||||
{
|
||||
return '<a href="'. make_url('/redirect.php?url=') . urlencode($href) .'" class="postLink" target="_blank">'. $name .'</a>';
|
||||
}
|
||||
return "<a href=\"$href\" class=\"postLink\">$name</a>";
|
||||
}
|
||||
|
||||
|
|
|
@ -507,10 +507,6 @@ function vdump ($var, $title = '')
|
|||
|
||||
function htmlCHR ($txt, $double_encode = false, $quote_style = ENT_QUOTES, $charset = 'UTF-8')
|
||||
{
|
||||
if (is_array($txt))
|
||||
{
|
||||
log_request('htmlCHR');
|
||||
}
|
||||
return (string) htmlspecialchars($txt, $quote_style, $charset, $double_encode);
|
||||
}
|
||||
|
||||
|
|
|
@ -489,11 +489,11 @@ else if ( ($submit || $confirm) && !$topic_has_new_posts )
|
|||
case 'editpost':
|
||||
case 'newtopic':
|
||||
case 'reply':
|
||||
$username = ( !empty($_POST['username']) ) ? $_POST['username'] : '';
|
||||
$subject = ( !empty($_POST['subject']) ) ? trim($_POST['subject']) : '';
|
||||
$message = ( !empty($_POST['message']) ) ? $_POST['message'] : '';
|
||||
$poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_title'] : '';
|
||||
$poll_options = ( isset($_POST['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_option_text'] : '';
|
||||
$username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
|
||||
$subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : '';
|
||||
$message = ( !empty($_POST['message']) ) ? prepare_message($_POST['message']) : '';
|
||||
$poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? clean_title($_POST['poll_title']) : '';
|
||||
$poll_options = ( isset($_POST['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? clean_title($_POST['poll_option_text']) : '';
|
||||
$poll_length = ( isset($_POST['poll_length']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_length'] : '';
|
||||
|
||||
prepare_post($mode, $post_data, $error_msg, $username, $subject, $message, $poll_title, $poll_options, $poll_length);
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
||||
$user->session_start();
|
||||
$url = (string) request_var('url', '');
|
||||
$time = 15;
|
||||
|
||||
$url = urldecode($url);
|
||||
|
||||
if(!$url)
|
||||
{
|
||||
meta_refresh(BB_ROOT, 0);
|
||||
bb_die ('Неверная ссылка');
|
||||
}
|
||||
|
||||
meta_refresh($url, $time);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'URL' => $url,
|
||||
'URL_TITLE' => str_short($url, 70),
|
||||
'PAGE_TITLE' => 'Переадресация...',
|
||||
'TIME' => $time,
|
||||
));
|
||||
|
||||
print_page('redirect.tpl');
|
|
@ -1,40 +0,0 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function(){
|
||||
time = {TIME};
|
||||
countdown();
|
||||
});
|
||||
function countdown()
|
||||
{
|
||||
if(time != 0)
|
||||
{
|
||||
$('span#time').text(time);
|
||||
setTimeout('countdown()',1000);
|
||||
time--;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<table cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<h1 class="maintitle">{PAGE_TITLE}</h1>
|
||||
<div id="forums_top_links" class="nav">
|
||||
<a href="{U_INDEX}">{T_INDEX}</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="category">
|
||||
<h3 class="cat_title">{PAGE_TITLE}</h3>
|
||||
<div class="f_tbl_wrap pad_10">
|
||||
<div class="q pad_10">
|
||||
Вы покидаете <b>{SITENAME}</b> и переходите на <a href="{URL}"><i>{URL_TITLE}</i></a>.
|
||||
<div class="spacer_10"></div>
|
||||
Вы будете переадресованы через <span class="bold" id="time">{TIME}</span> секунд.
|
||||
<div class="spacer_10"></div>
|
||||
<span style="color: red;">Внимание! Администрация не несет отвественности за сайт на которой вы переходите.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
LQ7Ntw6K5GjKm3bGkYEK
|
Loading…
Add table
Add a link
Reference in a new issue