• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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