How to Change Any Displayed Text Length in Clip-Bucket or Any Smarty Powered Script
Written by Richi González Sunday, 23 September 2012
If you are now going through the making of your own Clip-Bucket (or Smarty powered script) template, you may want to decrease or increase different texts sizes. If so, I have the solution for you. As said in the preceding line, this works for any Smarty powered script.
Difficulty level: Easy
1. Find the file where the variable that outputs the text you want to change is located. For this example, I will use Clip-Bucket v2.6 cbv2new template’s watch_video.html (./styles/cbv2new/layout/*) file.
Let’s say we want to change video description to a MAX of 100 characters.
2. Find the following line that outputs the video description:
You can see the word truncate there, that’s with what we are going to work.
3. Change the truncate value to 100, so that the description is truncated at the 100th character.
But what if we are own variable, $mytext, that holds the following: This is an example text contained in my variable, and we want to truncate it at the 20th character?
4. We would simply do this:
That’s it there are a couple more parameters that the function truncate can hold, I recommend you to go visit: http://www.smarty.net/docsv2/en/language.modifier.truncate . If you have any question regarding the use of truncate, let me know and I’ll kindly assist you.
Owner of Juapo2Services