ссылка на цитируемый пост git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@451 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
pherum83 2012-09-03 22:58:47 +00:00
commit 51aed15b4e
5 changed files with 12 additions and 5 deletions

View file

@ -78,7 +78,7 @@ switch($this->request['type'])
// Use trim to get rid of spaces placed there by MS-SQL 2000
$quote_username = (trim($post['post_username']) != '') ? $post['post_username'] : get_username($post['poster_id']);
$message = "[quote=\"". $quote_username ."\"]". $post['post_text'] ."[/quote]\n";
$message = "[quote=\"". $quote_username ."\"][qpost=". $post['post_id'] ."]". $post['post_text'] ."[/quote]\n";
// hide user passkey
$message = preg_replace('#(?<=\?uk=)[a-zA-Z0-9]{10}(?=&)#', 'passkey', $message);
// hide sid

View file

@ -56,7 +56,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 Beta';
$bb_cfg['tp_release_state'] = 'R450';
$bb_cfg['tp_release_state'] = 'R451';
$bb_cfg['tp_release_date'] = '04-09-2012';
// Database

View file

@ -509,6 +509,7 @@ class bbcode
"#\[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>',
"#\[email\]($email_exp)\[/email\]#isu" => '<a href="mailto:$1">$1</a>',
"#\[qpost=([0-9]*)\]#isu" => '<u class="q-post">$1</u>',
);
$this->str = array(

View file

@ -678,7 +678,7 @@ else
// Use trim to get rid of spaces placed there by MS-SQL 2000
$quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username'];
$message = '[quote="' . $quote_username . '"]' . $message . '[/quote]';
$message = '[quote="'. $quote_username .'"][qpost='. $post_info['post_id'] .']' . $message . '[/quote]';
// hide user passkey
$message = preg_replace('#(?<=\?uk=)[a-zA-Z0-9]{10}(?=&)#', 'passkey', $message);
// hide sid

View file

@ -43,7 +43,13 @@ function initQuotes(context)
$('div.q', context).each(function(){
var $q = $(this);
var name = $(this).attr('head');
$q.before('<div class="q-head">'+ (name ? '<b>'+name+'</b> {L_WROTE}:' : '<b>{L_QUOTE}</b>') +'</div>');
var q_title = (name ? '<b>'+name+'</b> {L_WROTE}:' : '<b>{L_QUOTE}</b>');
if ( quoted_pid = $q.children('u.q-post:first').text() ) {
var on_this_page = $('#post_'+quoted_pid).length;
var href = (on_this_page) ? '#'+ quoted_pid : './viewtopic.php?p='+ quoted_pid +'#'+ quoted_pid;
q_title += ' <a href="'+ href +'" title="Перейти к цитируемому сообщению"><img src="{SITE_URL}templates/default/images/icon_latest_reply.gif" class="icon2" alt="" /></a>';
}
$q.before('<div class="q-head">'+ q_title +'</div>');
});
}
function initPostImages(context)
@ -256,7 +262,7 @@ function OpenInEditor ($file, $line)
</script>
<!-- ENDIF / INCLUDE_DEVELOP_JS -->
<style type="text/css">
.menu-sub, #ajax-loading, #ajax-error, var.ajax-params, .sp-title { display: none; }
.menu-sub, #ajax-loading, #ajax-error, var.ajax-params, .sp-title, .q-post { display: none; }
</style>
</head>