How to Change Any Displayed Text Length in Clip-Bucket or Any Smarty Powered Script

Hello,

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:

{$vdo.description|description|truncate:200}

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:

{$mytext|truncate:20}

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.

Best Regards,

Richi

Owner of Juapo2Services

Looking for quality ClipBucket hosting? Try out Arvixe and you won’t be disappointed.
Tags: , , , , , , , , , , | Posted under ClipBucket | RSS 2.0

Author Spotlight

Richi González

Richi González

I started programming when I was 12. I'm a Developer and have been working with the Clip-Bucket script since it came out. I became a Liaison between Arvixe and Clip-Bucket, so I am here to assist you with anything you need regarding Clip-Bucket or any particular computer-related subject you need. Best Regards, Richi

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 7 = 16

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>