String will be sliced in such a way that no word will be cut off, You can specify text extension(i,e ... or >>) and character limit also.
How to use and install:
- Download the plugin (in zip formate) and install and enable it from your joomla administrator
- Example usages in your code:
- Where $str is the string to be sliced and 19 is the character limit and ... is the extension
$str = 'Bangladesh is a small country';
$mainframe->triggerEvent('wordLimiter',array(&$str,19,"..."));
echo $str;
- Output: Bangladesh is a...
Here is download URL: http://dc365.4shared.com/download/uxFV2P2u/plg-wordlimiter-v10.zip?tsid=20110509-001532-35b2f7a9
Please read the Readme.txt file for details.
Thanks shalini for your awesome! comment :)
ReplyDelete