• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

how can I get a list of embed codes for my site?

http

Chevereto Member
I am tring to get a list of
Thumbnail image (linked)
embed codes for my site from the database any easy way to do this?
 
The database never stores URLs, it stores file name, storage method and external storage id (if any). Best that you can do is to add a new route into app/routes/overrides/route.thumbs.php:

PHP:
$route = function($handler) {
    try {
      
        $list = new CHV\Listing;
        $list->setType('images');
        $list->setOffset(0);
        $list->setLimit(24); // how many?
        $list->setSortType('date');
        $list->setSortOrder('desc');  
        $list->exec();
      
        $thumbs = [];
      
        if($list->output_assoc) {
            foreach($list->output_assoc as $k => $v) {
                $thumbs[] = $v['file_resource']['chain']['thumb'];
            }
        }
      
        G\debug($thumbs);
      
        die();
      
    } catch(Exception $e) {
        G\exception_to_error($e);
    }
};
 
Hi thanks for taking the time to help me. I am not very technical what exactly do I do to generate the data I need? I can pay you to help me thanks.
 
I did already show you the code, where to place it and how to access to the result.

I don't know what is being missed.
 
Back
Top