Show A Category Thumbnail in Clip-Bucket v2

Hello,

Upon a customer request, I decided to write this. As time passes, I still come up with functions I don’t know CB has and are useful. This time, we will use the function get_cat_thumb(). The function is in category.class.php. This function can be found in the whole v2 branch.

1. Open the .html page where you would like the thumbnail to appear. You can use index.html, for example.

2. Paste the following code:

{assign var=CatThumb value=$CBCategory->get_cat_thumb(array("category_id"=>$idofcategory))}

h1

You need to replace $idofcategory, either with the variable that contains the category id or with the id number of the category. (“category_id”=>14  .. if category_id is 14)

3. To show the thumbnail use the following code:

{$CatThumb}

h2

4. Save and Upload.

That’s it! If for any reason it doesn’t work for you, please do not hesitate to contact me so we can work it out together. Any questions, comments or article suggestions are welcome.

Best Regards,

Richi

Looking for quality ClipBucket Hosting? Look no further than Arvixe Web Hosting!

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

4 Comments on Show A Category Thumbnail in Clip-Bucket v2

  1. Ryan says:

    Hey Richi,
    I’m trying to use this on our site but on the page I use it on I’m getting the error below:

    Fatal error: Smarty error: [in /home/cbchigh/public_html/styles/cbv2new/layout/index.html line 113]: syntax error: invalid attribute name: ‘=’ (Template_Compiler.class.php, line 1548) in /home/cbchigh/public_html/includes/templatelib/Template.class.php on line 1095

    Any ideas what would be causing this? (the line of code it’s pointing to is this same line of code you give in your example) Thanks for your help and all of the info you put out there.

Leave a Reply

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


× 5 = 10

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>