diff options
Diffstat (limited to 'includes/functions.php')
-rw-r--r-- | includes/functions.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/includes/functions.php b/includes/functions.php index 4518fa8..6238ec4 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -175,13 +175,13 @@ function BBCode($Text) // Images // [img]pathtoimage[/img] - $Text = preg_replace("/\[img\](.+?)\[\/img\]/", '<img src="$1">', $Text); + $Text = preg_replace("/\[img\](.+?)\[\/img\]/", '<img src="$1" />', $Text); //[img=align]image source[/img] $Text = preg_replace("(\[img align\=(.+?)\](.+?)\[\/img\])is","<img src=\"$2\" align=\"$1\" />",$Text); // [img=widthxheight]image source[/img] - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1">', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1" />', $Text); // Alignment // [align=type]text[/align] @@ -251,6 +251,20 @@ function LinkModule($module_name,$args = NULL,$link_name) } /** + * LinkModuleFile() + * + * Helper function to link to Bayonet internal module files. + * + * @param mixed $module_name + * @param mixed $link_name + * @return + */ + function LinkModuleFile($module_name, $file_name, $link_name) + { + return "<a href=\"?load={$module_name}&file={$file_name}\">{$link_name}</a>"; + } + +/** * LinkPage() * * Helper function to link to Bayonet pages. |