From 60e78c75f9cb332dcd5a387bf4262c1566f32b8e Mon Sep 17 00:00:00 2001
From: Greg Aker
Date: Tue, 20 Apr 2010 12:45:14 -0500
Subject: Modifying smiley_js() in the smiley helper to add optional third
parameter to return only the javascript with no script tags.
---
system/helpers/smiley_helper.php | 11 +++++++++--
user_guide/changelog.html | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index 775cc1b99..b9eb0a23e 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -40,7 +40,7 @@
*/
if ( ! function_exists('smiley_js'))
{
- function smiley_js($alias = '', $field_id = '')
+ function smiley_js($alias = '', $field_id = '', $inline = TRUE)
{
static $do_setup = TRUE;
@@ -108,7 +108,14 @@ EOF;
}
}
- return '';
+ if ($inline)
+ {
+ return '';
+ }
+ else
+ {
+ return $r;
+ }
}
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 25b3b1744..53bf395df 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -120,6 +120,7 @@ Hg Tag:
Added alpha, and sha1 string types to random_string() in the String Helper.
Modified prep_url() so as to not prepend http:// if the supplied string already has a scheme.
Modified get_file_info in the file helper, changing filectime() to filemtime() for dates.
+ Modified smiley_js() to add optional third parameter to return only the javascript with no script tags.
Other Changes
--
cgit v1.2.3-24-g4f1b