summaryrefslogtreecommitdiff
path: root/forum/utils/parser.php
diff options
context:
space:
mode:
authordeva <deva>2008-10-12 16:02:03 +0000
committerdeva <deva>2008-10-12 16:02:03 +0000
commit28856d6f9b7d726b1681df9384f3ef000dbf6f4c (patch)
tree4297943b1d5656ee2b0c01d3aabac5ddb414d45d /forum/utils/parser.php
parented97119bc3a7203b11d92cf170869a12bd2da953 (diff)
Made file preview (original image or png with filename as text). Added error image as png with error text.
Diffstat (limited to 'forum/utils/parser.php')
-rw-r--r--forum/utils/parser.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/forum/utils/parser.php b/forum/utils/parser.php
index 6d47162..5864753 100644
--- a/forum/utils/parser.php
+++ b/forum/utils/parser.php
@@ -48,7 +48,7 @@ function parse($input, $indent = "")
$output = preg_replace("/".$imgstartmarker."(.*?)".$imgendmarker."/s", "<a href=\"http://$1\"><img alt=\"$1\" src=\"?mode=imagecache&amp;uri=http://$1\"/></a>", $output);
// Replace URLs with <a></a> tags
- $output = preg_replace("/\{\{([0-9]*?)\}\}/s", "<a href=\"?mode=file&amp;fid=$1\">File: $1</a>", $output);
+ $output = preg_replace("/\{\{([0-9]*?)\}\}/s", "<a href=\"?mode=file&amp;fid=$1\"><img src=\"?mode=file&amp;preview=1&amp;fid=$1\"/></a>", $output);
// Replace [quote title=...]...[/quote]
$urls = "";