How to retrieve a specific item from a collection in Clip-Bucket v2

A user recently asked me how to retrieve a specific item from a collection in Clip-Bucket v2, so I went ahead and made a code for them. Here’s the code for all of you. Tested on v2.6.

1. Open ./includes/classes/collections.class.php
2. Find

function get_thumb($cdetails,$size=NULL,$return_c_thumb=false)

and replace it with

function get_thumb($cdetails,$size=NULL,$return_c_thumb=false,$number=1)

3. Find

$item = $this->get_collection_items($cid,'ci_id DESC',1);

and replace it with

$item = $this->get_collection_items($cid,'ci_id DESC',$number);

4. Find

$type = $item[0]['type'];

and replace it with

$type = $item[$number-1]['type'];

5. Find

$thumb = get_thumb($cbvideo->get_video_details($item[0]['object_id']));

and replace it with

$thumb = get_thumb($cbvideo->get_video_details($item[$number-1]['object_id']));

6. Find

$thumb = $cbphoto->get_image_file($cbphoto->get_photo($item[0]['object_id']));

and replace it with

$thumb = $cbphoto->get_image_file($cbphoto->get_photo($item[$number-1]['object_id']));

7. Save and upload

To get the second item, you should call it like:


For the third item:


and so on. The last parameter of the function determines the item number from the collection.

If you have any questions, please let me know. Moreover, if you’d like me to write about a certain thing, just leave a comment and I’ll do my best to have it written ASAP.

Best Regards,
Richi González

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

Author Spotlight

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'm the Liaison between Arvixe and Clip-Bucket, so anything you need regarding Clip-Bucket or any particular computer-related subject you need, let me know so I can assist you.

Leave a Reply

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