added extension of bbcode: wiki & find

main
fuzzykitten 2025-06-01 07:45:21 -04:00
parent 2da077cd03
commit 58d12fd958
2 changed files with 8 additions and 2 deletions

View File

@ -67,7 +67,9 @@ function bbcode_to_html($text, $settings, $sub)
'/(\[url\ )(.*?)(\])/',
'/ s\/(.+)\/([0-9]+)/',
'/>> ([0-9]+)\r\n/',
'/>>(.*)\r\n/'
'/>>(.*)\r\n/',
'/(\[wiki\ )(.*?)(\])/',
'/(\[find\ )(.*?)(\])/'
);
$replace = array (
@ -81,7 +83,9 @@ function bbcode_to_html($text, $settings, $sub)
'<a href="$2" target="_blank">$2</a>',
' <a href="/r/$1/$2">s/$1/$2</a>',
"<quote><a href=\"#$1_$sub\">>$1$2</a></quote><br>",
'<quote>>>$1$2</quote><br>'
'<quote>>>$1$2</quote><br>',
'<a href=http://wikiless.i2p/wiki/$2>http://wikiless.i2p/wiki/$2</a>',
'<a href=http://heimdall.i2p/yacysearch.html?query=$2>http://heimdall.i2p/yacysearch.html?query=$2</a>'
);
return preg_replace($search, $replace, $text);

View File

@ -176,6 +176,8 @@ function show_post_form($db, $msg, $sub, $settings, $org_id, $css, $quote, $ip)
$html_string .= 'required placeholder=\'[b bold], [i italic],'
. '[li list point], [s strike through], [sp spoiler],'
. '[h headline], [u underlined], [url link], '
. ' [wiki $word], '
. ' [find $word], '
. '>> $post_id: local reference,'
. ' s/$sub/$post_id: global reference\'>'
. '</textarea></td></tr>';