From f33091fa39002415f0fe91ffd48ffba0f2395299 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:44:19 -0700 Subject: Update Smiley helper docs --- user_guide_src/source/helpers/smiley_helper.rst | 59 +++++++++++++------------ 1 file changed, 30 insertions(+), 29 deletions(-) (limited to 'user_guide_src/source/helpers/smiley_helper.rst') diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst index 3fad253b2..a42440f2a 100644 --- a/user_guide_src/source/helpers/smiley_helper.rst +++ b/user_guide_src/source/helpers/smiley_helper.rst @@ -5,7 +5,12 @@ Smiley Helper The Smiley Helper file contains functions that let you manage smileys (emoticons). -.. contents:: Page Contents +.. contents:: + :local: + +.. raw:: html + +
Loading this Helper =================== @@ -104,61 +109,57 @@ To map the alias to the field id, pass them both into the $image_array = smiley_js("comment_textarea_alias", "comments"); -get_clickable_smileys() -======================= +Available Functions +=================== -.. function:: get_clickable_smileys($image_url, $alias = '', $smileys = NULL) +.. function:: get_clickable_smileys($image_url[, $alias = ''[, $smileys = NULL]]) :param string $image_url: URL path to the smileys directory :param string $alias: Field alias :returns: array -Returns an array containing your smiley images wrapped in a clickable -link. You must supply the URL to your smiley folder and a field id or -field alias. + Returns an array containing your smiley images wrapped in a clickable + link. You must supply the URL to your smiley folder and a field id or + field alias. -Example:: + Example:: - $image_array = get_smiley_links("http://example.com/images/smileys/", "comment"); + $image_array = get_smiley_links("http://example.com/images/smileys/", "comment"); -smiley_js() -=========== -.. function:: smiley_js($alias = '', $field_id = '', $inline = TRUE) +.. function:: smiley_js([$alias = ''[, $field_id = ''[, $inline = TRUE]]]) :param string $alias: Field alias :param string $field_id: Field ID :param bool $inline: Whether we're inserting an inline smiley -Generates the JavaScript that allows the images to be clicked and -inserted into a form field. If you supplied an alias instead of an id -when generating your smiley links, you need to pass the alias and -corresponding form id into the function. This function is designed to be -placed into the area of your web page. + Generates the JavaScript that allows the images to be clicked and + inserted into a form field. If you supplied an alias instead of an id + when generating your smiley links, you need to pass the alias and + corresponding form id into the function. This function is designed to be + placed into the area of your web page. -Example:: + Example:: - + -parse_smileys() -=============== -.. function:: parse_smileys($str = '', $image_url = '', $smileys = NULL) +.. function:: parse_smileys([$str = ''[, $image_url = ''[, $smileys = NULL]]]) :param string $str: Text containing smiley codes :param string $image_url: URL path to the smileys directory :param array $smileys: An array of smileys :returns: string -Takes a string of text as input and replaces any contained plain text -smileys into the image equivalent. The first parameter must contain your -string, the second must contain the URL to your smiley folder + Takes a string of text as input and replaces any contained plain text + smileys into the image equivalent. The first parameter must contain your + string, the second must contain the URL to your smiley folder -Example:: + Example:: - $str = 'Here are some simileys: :-) ;-)'; - $str = parse_smileys($str, "http://example.com/images/smileys/"); - echo $str; + $str = 'Here are some simileys: :-) ;-)'; + $str = parse_smileys($str, "http://example.com/images/smileys/"); + echo $str; .. |smile!| image:: ../images/smile.gif \ No newline at end of file -- cgit v1.2.3-24-g4f1b