DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: Smilie API¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2010-02-08T18:25:51.970000000 |
Classification: | smilie |
Description: | The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ---- |
Keywords: | forDevelopers, forAdmins, forIntermediates |
Author: | Peter Schuster |
Email: | typo3@peschuster.de |
Info 4: | |
Language: | en |
EXT: Smilie API - smilie
EXT: Smilie API¶
Extension Key: smilie
Language: en
Keywords: forDevelopers, forAdmins, forIntermediates
Copyright 2009-2010, Peter Schuster, <typo3@peschuster.de>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.org
Table of Contents¶
`Introduction 3 <#1.1.Introduction|outline>`_
`Administration 4 <#1.2.Administration|outline>`_
`Configuration 5 <#1.3.Configuration|outline>`_
`Credits 6 <#1.4.Credits|outline>`_
Introduction¶
What does it do?¶
This extension is an approach to centralize smiley handling in a TYPO3 site. The extension consists of one main function which replaces a “smiley string” (e.g. :-) ) with an img tag showing the associated smiley image. You can use this function in your own extension or extend existing extensions via hooks with it.
If you find any bugs or have feature requests please report them at http://forge.typo3.org/projects/show/extension-smilie .
Screenshots¶
Administration¶
After installing the extension in your TYPO3 installation you have to add the static typoscript of the extension to your typoscript template.
How to use the extension¶
You can use this extension by inserting the following php code into your own extension/php script:
require_once(t3lib_extMgm::extPath('smilie', 'class.tx_smilie.php'));
$smilie = t3lib_div::makeInstance('tx_smilie');
$text = $smilie->replaceSmilies($text);
Anonther “real life” example on how to use it is in the extension “simpleshoutbox”.
Configuration¶
The rules which strings are substituted by which images by tx_smilie->replaceSmilies($content) are set via typoscript.
For a complete Reference have a look at the table bellow:
Reference¶
smiliePath¶
Property
smiliePath
Data type
string
Description
Path to directory with smiley image files
Default
EXT:smilie/res
fileExt¶
Property
fileExt
Data type
string
Description
file extension of smiley images
Default
gif
smilies¶
Property
smilies
Data type
array
Description
Array with all available smilies defined
Syntax:
[filename] = [string1] [string2]
Default:
1 = :-) :)
2 = ;-) ;)
3 = :-o :o)
4 = :-D :D
5 = 8-)
6 = :-|
7 = :-s s( :s
8 = :-U
9 = 8O 8-O 8o 8-o
10 = =-=
11 = M-)
12 = ()-)
13 = V-)
14 = [-)
15 = X-)
16 = :-(
17 = WOW)
Default
((generated))¶
Example (default configuration)¶
This is the default configuration of the plugin:
plugin.tx_smilie {
smiliePath = EXT:smilie/res
fileExt = gif
smilies {
1 = :-) :)
2 = ;-) ;)
3 = :-o :o)
4 = :-D :D
5 = 8-)
6 = :-|
7 = :-s s( :s
8 = :-U
9 = 8O 8-O 8o 8-o
10 = =-=
11 = M-)
12 = ()-)
13 = V-)
14 = [-)
15 = X-)
16 = :-(
17 = WOW)
}
}
Credits¶
The extension icon is retrieved from Silk Set of Mark James, which can be found at http://www.famfamfam.com/lab/icons/silk/ . This set is distributed under Creative Commons Attribution 2.5 License. The license can be found at at http://creativecommons.org/licenses/by/2.5/ .
6