This commit is contained in:
biglyderv 2024-12-07 17:51:05 -05:00
parent 3a34471306
commit d7f64152f6
5 changed files with 22 additions and 7 deletions

View file

@ -9,8 +9,9 @@
form("Broadcast your thoughts...", '', array(
array('key' => 'Your message', 'type' => 'textarea', 'name' => 'post', 'default' => ''),
array('key' => '','type' => 'hidden','name' => 'type', 'default' => $typer),
array('key' => '','type' => 'hidden','name' => 'id', 'default' => $idr)
),'/index.php');
array('key' => '','type' => 'hidden','name' => 'id', 'default' => $idr),
array('key' => 'Attachments', 'type' => 'file', 'name' => 'file', 'default' => '')
),'/index.php');
}
?>

View file

@ -1,7 +1,8 @@
<?php
function markdown($text) {
$search = array (
'~(?:\s|^)(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i',
'~(https://[^.]+\.dervland\.net/[^\s<]+)~i',
'~(?:\s|^)(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i',
'~(?:@)([^\s]+)(?:\s|$)~i',
'~(\[b\])(.*?)(\[\/b\])~i',
'~(\[i\])(.*?)(\[\/i\])~i',
@ -14,6 +15,7 @@
);
$replace = array (
'<a class="link" href="$1" target="_blank"><img src="$1" class="img"></a>',
'<a class="link" href="$0" target="_blank">$0</a>',
'<a class="link" href="/user.php?id=$1" target="_blank">@$1</a>',
'<strong>$2</strong>',
@ -30,4 +32,4 @@
return $text;
}
?>
?>