tinyboard special markup: allow content to span multiple lines
This commit is contained in:
parent
b438fb294b
commit
6267876758
@ -1049,7 +1049,7 @@ function index($page, $mod=false) {
|
|||||||
$thread = new Thread(
|
$thread = new Thread(
|
||||||
$th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['capcode'], $th['body'], $th['time'], $th['thumb'],
|
$th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['capcode'], $th['body'], $th['time'], $th['thumb'],
|
||||||
$th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip'],
|
$th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip'],
|
||||||
$th['sticky'], $th['locked'], $th['sage'], $th['embed'], $mod ? '?/' : $config['root'], $mod
|
$th['sticky'], $th['locked'], $th['sage'], $th['embed'], $mod ? '?/' : $config['root'], $mod, true, $th['password']
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($config['cache']['enabled'] && $cached = cache::get("thread_index_{$board['uri']}_{$th['id']}")) {
|
if ($config['cache']['enabled'] && $cached = cache::get("thread_index_{$board['uri']}_{$th['id']}")) {
|
||||||
@ -1085,7 +1085,7 @@ function index($page, $mod=false) {
|
|||||||
$thread->add(new Post(
|
$thread->add(new Post(
|
||||||
$po['id'], $th['id'], $po['subject'], $po['email'], $po['name'], $po['trip'], $po['capcode'], $po['body'], $po['time'],
|
$po['id'], $th['id'], $po['subject'], $po['email'], $po['name'], $po['trip'], $po['capcode'], $po['body'], $po['time'],
|
||||||
$po['thumb'], $po['thumbwidth'], $po['thumbheight'], $po['file'], $po['filewidth'], $po['fileheight'], $po['filesize'],
|
$po['thumb'], $po['thumbwidth'], $po['thumbheight'], $po['file'], $po['filewidth'], $po['fileheight'], $po['filesize'],
|
||||||
$po['filename'], $po['ip'], $po['embed'], $mod ? '?/' : $config['root'], $mod)
|
$po['filename'], $po['ip'], $po['embed'], $mod ? '?/' : $config['root'], $mod, $po['password'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1495,7 +1495,7 @@ function markup(&$body, $track_cites = false) {
|
|||||||
$body = str_replace("\r", '', $body);
|
$body = str_replace("\r", '', $body);
|
||||||
$body = utf8tohtml($body);
|
$body = utf8tohtml($body);
|
||||||
|
|
||||||
if (preg_match_all('@<tinyboard ([\w\s]+)>(.+?)</tinyboard>@um', $body, $modifiers, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
|
if (preg_match_all('@<tinyboard ([\w\s]+)>(.+?)</tinyboard>@us', $body, $modifiers, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
|
||||||
$skip_chars = 0;
|
$skip_chars = 0;
|
||||||
$body_tmp = $body;
|
$body_tmp = $body;
|
||||||
$end_markup = false;
|
$end_markup = false;
|
||||||
@ -1624,6 +1624,7 @@ function markup(&$body, $track_cites = false) {
|
|||||||
|
|
||||||
foreach ($cites as $matches) {
|
foreach ($cites as $matches) {
|
||||||
$_board = $matches[2][0];
|
$_board = $matches[2][0];
|
||||||
|
echo $_board;
|
||||||
$cite = @$matches[3][0];
|
$cite = @$matches[3][0];
|
||||||
|
|
||||||
// preg_match_all is not multibyte-safe
|
// preg_match_all is not multibyte-safe
|
||||||
@ -1755,13 +1756,13 @@ function buildThread($id, $return = false, $mod = false) {
|
|||||||
$thread = new Thread(
|
$thread = new Thread(
|
||||||
$post['id'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['capcode'], $post['body'], $post['time'],
|
$post['id'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['capcode'], $post['body'], $post['time'],
|
||||||
$post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'],
|
$post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'],
|
||||||
$post['filename'], $post['ip'], $post['sticky'], $post['locked'], $post['sage'], $post['embed'], $mod ? '?/' : $config['root'], $mod
|
$post['filename'], $post['ip'], $post['sticky'], $post['locked'], $post['sage'], $post['embed'], $mod ? '?/' : $config['root'], $mod, true, $post['password']
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$thread->add(new Post(
|
$thread->add(new Post(
|
||||||
$post['id'], $thread->id, $post['subject'], $post['email'], $post['name'], $post['trip'], $post['capcode'], $post['body'],
|
$post['id'], $thread->id, $post['subject'], $post['email'], $post['name'], $post['trip'], $post['capcode'], $post['body'],
|
||||||
$post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'],
|
$post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'],
|
||||||
$post['filesize'], $post['filename'], $post['ip'], $post['embed'], $mod ? '?/' : $config['root'], $mod)
|
$post['filesize'], $post['filename'], $post['ip'], $post['embed'], $mod ? '?/' : $config['root'], $mod, $post['password'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1933,7 +1934,7 @@ function rDNS($ip_addr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$config['dns_system']) {
|
if (!$config['dns_system']) {
|
||||||
$host = gethostbyaddr($ip_addr);
|
$host = @gethostbyaddr($ip_addr);
|
||||||
} else {
|
} else {
|
||||||
$resp = shell_exec_error('host -W 1 ' . $ip_addr);
|
$resp = shell_exec_error('host -W 1 ' . $ip_addr);
|
||||||
if (preg_match('/domain name pointer ([^\s]+)$/', $resp, $m))
|
if (preg_match('/domain name pointer ([^\s]+)$/', $resp, $m))
|
||||||
|
Loading…
Reference in New Issue
Block a user