From 58d12fd958c6b5e1e602b88317e2435e525dcd9b Mon Sep 17 00:00:00 2001 From: fuzzykitten Date: Sun, 1 Jun 2025 07:45:21 -0400 Subject: [PATCH] added extension of bbcode: wiki & find --- opt/display.php | 8 ++++++-- opt/show.php | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/opt/display.php b/opt/display.php index 72c687e..2bba347 100644 --- a/opt/display.php +++ b/opt/display.php @@ -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) '$2', ' s/$1/$2', ">$1$2
", - '>>$1$2
' + '>>$1$2
', + 'http://wikiless.i2p/wiki/$2', + 'http://heimdall.i2p/yacysearch.html?query=$2' ); return preg_replace($search, $replace, $text); diff --git a/opt/show.php b/opt/show.php index 859aa34..1cb85db 100644 --- a/opt/show.php +++ b/opt/show.php @@ -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\'>' . '';