summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/smiley_helper.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-07 22:31:49 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-07 22:31:49 +0100
commit3de130c2da3b93a3404f264e92d7b65354de3548 (patch)
tree368b1847fffe7af21c5fbc3fa7925212b678e60b /user_guide_src/source/helpers/smiley_helper.rst
parent1e584208e420d1d864de2bc686d437ecdf0ce064 (diff)
[ci skip] Add return types to helper docs (+ some other formatting)
Diffstat (limited to 'user_guide_src/source/helpers/smiley_helper.rst')
-rw-r--r--user_guide_src/source/helpers/smiley_helper.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst
index 077c56a17..b98084089 100644
--- a/user_guide_src/source/helpers/smiley_helper.rst
+++ b/user_guide_src/source/helpers/smiley_helper.rst
@@ -116,7 +116,8 @@ Available Functions
:param string $image_url: URL path to the smileys directory
:param string $alias: Field alias
- :returns: array
+ :returns: An array of ready to use smileys
+ :rtype: 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
@@ -124,14 +125,15 @@ Available Functions
Example::
- $image_array = get_smiley_links("http://example.com/images/smileys/", "comment");
-
+ $image_array = get_clickable_smileys('http://example.com/images/smileys/', 'comment');
.. 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
+ :returns: Smiley-enabling JavaScript code
+ :rtype: string
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
@@ -143,13 +145,13 @@ Available Functions
<?php echo smiley_js(); ?>
-
.. 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
+ :returns: Parsed smileys
+ :rtype: 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