Allow setting of title in rpost tag with [rpost=title]body[/rpost]
This commit is contained in:
parent
8da4da37cc
commit
4cae5249d4
@ -179,8 +179,12 @@ function bb_ShareAttributesSimple($match) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function rpost_callback($match) {
|
function rpost_callback($match) {
|
||||||
|
if (count($match) == 3) {
|
||||||
|
return str_replace($match[0],get_rpost_path(get_app()->get_observer()) . '&title=' . urlencode($match[1]) . '&body=' . urlencode($match[2]),$match[0]);
|
||||||
|
} else {
|
||||||
return str_replace($match[0],get_rpost_path(get_app()->get_observer()) . '&body=' . urlencode($match[1]),$match[0]);
|
return str_replace($match[0],get_rpost_path(get_app()->get_observer()) . '&body=' . urlencode($match[1]),$match[0]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// BBcode 2 HTML was written by WAY2WEB.net
|
// BBcode 2 HTML was written by WAY2WEB.net
|
||||||
@ -230,6 +234,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
|||||||
$Text = preg_replace("/\[observer\=1\](.*?)\[\/observer\]/ism", '$1', $Text);
|
$Text = preg_replace("/\[observer\=1\](.*?)\[\/observer\]/ism", '$1', $Text);
|
||||||
$Text = preg_replace("/\[observer\=0\].*?\[\/observer\]/ism", '', $Text);
|
$Text = preg_replace("/\[observer\=0\].*?\[\/observer\]/ism", '', $Text);
|
||||||
$Text = preg_replace_callback("/\[rpost\](.*?)\[\/rpost\]/ism", 'rpost_callback', $Text);
|
$Text = preg_replace_callback("/\[rpost\](.*?)\[\/rpost\]/ism", 'rpost_callback', $Text);
|
||||||
|
$Text = preg_replace_callback("/\[rpost\=(.*?)\](.*?)\[\/rpost\]/ism", 'rpost_callback', $Text);
|
||||||
} else {
|
} else {
|
||||||
$Text = preg_replace("/\[observer\=1\].*?\[\/observer\]/ism", '', $Text);
|
$Text = preg_replace("/\[observer\=1\].*?\[\/observer\]/ism", '', $Text);
|
||||||
$Text = preg_replace("/\[observer\=0\](.*?)\[\/observer\]/ism", '$1', $Text);
|
$Text = preg_replace("/\[observer\=0\](.*?)\[\/observer\]/ism", '$1', $Text);
|
||||||
|
Reference in New Issue
Block a user