• 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.
  • Chevereto Support CLST

    Support response

    Support checklist

Only allow one userid to display images in Explore

Go to app/routes/route.user.php and find this:

PHP:
$list = new CHV\Listing;

And notice the $where var, which is set to display images with the image_user_id conditional. You will also need the "params_hidden" for the userid bind for the tabs.
 
Ok so I added the user_id to

PHP:
$list = new CHV\Listing;
            $list->setType($type); // images | users | albums
            $list->setOffset($list_params['offset']);
            $list->setLimit($list_params['limit']); // how many results?
            $list->setItemsPerPage($list_params['items_per_page']); // must
            $list->setSortType($list_params['sort'][0]); // date | size | views
            $list->setSortOrder($list_params['sort'][1]); // asc | desc
            $list->setWhere($where);
            $list->setOwner($user["1"]);
            $list->setRequester(CHV\Login::getUser());
            $list->bind(":1", $user["1"]);
            if($user_cond['user_search'] and !empty($user['search']['q'])) {
                $list->bind(':q', $q ?: $user['search']['q']);[/CODE]
 
No, you added a conditional which won't work. setOwner sets who is requesting that listing so the permissions gets pushed to that user so he doesn't see things that he shouldn't see. Like I said, lookup for $where.
 
Maybe it's because I don't understand or I titled this post incorrectly. But what I'm trying to do is only display images from user id 1 in the explore tab for all users
 
No, you added a conditional which won't work. setOwner sets who is requesting that listing so the permissions gets pushed to that user so he doesn't see things that he shouldn't see. Like I said, lookup for $where.
i look up for $where there is 2 $where

$where = $user_cond['user_images'] ? "WHERE image_user_id=:1" : "WHERE album_user_id=:1";

and

$where = $user["search"]["type"] == "images" ? "WHERE image_user_id=:1 AND MATCH(image_name, image_title, image_description, image_original_filename) AGAINST:)q)" : "WHERE album_user_id=:1 AND MATCH(album_name, album_description) AGAINST:)q)";

i edit both like that, but explore still show up the photo of other user
 
What I found is that changing these values don't affect the /explore route but the /user/username route. Essentially it's the user images listing, however, I only want to show images from a specific user in the /explore route.
 
I found this as well. Which they are trying to do the same thing that I'm trying to do. Again what I found is that route.user.php controls the images that are shown on the user profile page and not the explore route.

HTML:
https://chevereto.com/community/threads/change-the-explore-function.4197/
 
I found this as well. Which they are trying to do the same thing that I'm trying to do. Again what I found is that route.user.php controls the images that are shown on the user profile page and not the explore route.

HTML:
https://chevereto.com/community/threads/change-the-explore-function.4197/
i found it on rout-explore.php
 
so i add these two lines on routes.explore.php and routes.categorie.php

$list->setWhere("WHERE image_user_id=:user_id");
$list->bind(":user_id", '1');

that's work
 
Ok, we're getting there. If I click on the Explore link at the top of the page and click All, it works. However, I set the Homepage to Route Explore in the admin settings, and when people goto the main site, it still shows images from everyone.
 
Ok, we're getting there. If I click on the Explore link at the top of the page and click All, it works. However, I set the Homepage to Route Explore in the admin settings, and when people goto the main site, it still shows images from everyone.
i think that you shout edit routes.index.php,
 
I'm bringing this up again. I haven't been able to figure out how to to only show content on the explore route for a specific ID. Can someone give me a hand?
 
I added the where clause, however, it doesn't effect the main page. see qpix.com. But if you click on Explore then all the content is limited there. What am I missing?
That is for explorer, is not the same as the homepage. For the homepage simply go to Dasboard > Settings > Homepage.
 
Route Explore is selected, which is what I want. How do I limit the listed images on the main page for a specific user id?
 
Back
Top