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:
Support response
Support checklist
<?php
$route = function($handler) {
try {
$username = $handler->request[0]; // Gets 'newmedia' user (string) from http://vr.newmediaart.co/newmedia
$user = CHV\User::getSingle($username, 'username'); // Gets user details by username
if(!$user) {
$handler->issue404();
}
$list = new CHV\Listing; // Creates a new Listing object
$list->setType('images'); // You want to get images
$list->setOffset(0); // Starer pointer, used when you paginate results
$list->setLimit(1); // how many results?
$list->setItemsPerPage(1); // Limit same as the results
$list->setSortType('date'); // Sort criteria: date | size | views
$list->setSortOrder('desc'); // Sort order: asc | desc
$list->setWhere('WHERE image_user_id=:user_id');
$list->bind(":user_id", $user['id']); // Numeric user ID (or true ID)
$list->exec();
$vroutput = '';
foreach($list->output_assoc as $k => $v) {
$vroutput .= '<a-image src="'.$v['display_url'].'" rotation="0 0 0" position="0 2 -11.4"></a-image>' . "\n";
}
$handler->setVar('vroutput', $vroutput); // use it in the theme file with echo get_vroutput();
} catch(Exception $e) {
G\exception_to_error($e);
}
};
This may be a stupid question... but you have debugging and error reporting turned on, right?I've tried to add both <?php print_r ?> and also tired to add <?php G/debug ?> to the user template file and nothing is showing.
PHP error reporting Is enabledThis may be a stupid question... but you have debugging and error reporting turned on, right?
Thanks for all your help I just got myself a course on PHP when I've worked it all out I'll post the results. Thanks again looking forward to working it out.Based on how you ask this I can tell that you don't know PHP. Please note that this is a support forum for Chevereto, I can't teach you PHP here because that doesn't add value to "Chevereto" which is what I must do with the support section. That is what other customers want from all this.
I'm afraid that everything you need is right there, even the debug functions. But if you don't know PHP this could take months.
So, you need to debug the listing. First, is the listing getting anything at all? Then, is the foreach doing a proper job? Etc. Start debuging from top and debug each variable related.