aboutsummaryrefslogtreecommitdiff
path: root/includes/functions.php
diff options
context:
space:
mode:
authorjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-25 00:38:03 -0500
committerjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-25 00:38:03 -0500
commit752d40ac119723885e7923fc37f2e6f0db086f21 (patch)
tree3b96530f6ae9b0222bccfe4127b8b6b043358168 /includes/functions.php
parent44a18f3e13077138af782f96cffb39294bca6283 (diff)
downloadbayonetcms-752d40ac119723885e7923fc37f2e6f0db086f21.tar.gz
Debugging was incomplete. Apparently I forgot to double-check to make
certain that arrays and objects were being parsed out in the correct fashion. That has been fixed, so decho will properly insert both types into the message stack. logQueueFlush can now be forced to operate if debugging is disabled globally Example: logQueueFlush(FORCE); The inital commit of the download module has been added. It works, but the MySQL back-end needs to be beefed up with more file information. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@399 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'includes/functions.php')
-rw-r--r--includes/functions.php18
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}&amp;file={$file_name}\">{$link_name}</a>";
+ }
+
+/**
* LinkPage()
*
* Helper function to link to Bayonet pages.