• 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

Upload images in private by default

artonbej

Chevereto Member
Hello there.

Rodolfo sorry for double questions, i created a theme by myself and im done now but im stuck in this point and i can not launch the site.

I asked before but you did not told me what i wanted.
i asked you to set all uploads private but this option don't fit my needs
Firefox_Screenshot_2016-05-14T22-14-01.607Z.png
This option is for registered users and guests can't upload images.

What i really need ?
When guests , user uploads an image, the option Upload to switch to private upload by default.
Firefox_Screenshot_2016-05-14T22-12-16.985Z.png
The private upload to be default. I found the code in anywhere-upload.php on line 78
PHP:
                    <?php if(CHV\getSetting('website_privacy_mode') == 'public' or (CHV\getSetting('website_privacy_mode') == 'private' and CHV\getSetting('website_content_privacy_mode') == 'default')) { ?><button class="btn btn-big plain margin-right-5 btn-upload-privacy" rel="tooltip" data-tiptip="top" title="<?php _se('Change upload privacy'); ?>" data-login-needed="1" data-action="upload-privacy" data-privacy="public"><span class="icon icon-unlocked" data-lock="icon-lock" data-unlock="icon-unlocked"></span></button><?php } ?><button class="btn btn-big green" data-action="upload" data-public="<?php _se('Upload'); ?>" data-private="<?php _se('Private upload'); ?>"><?php echo is_forced_private_mode() ? _s('Private upload') : _s('Upload'); ?></button> <span class="btn-alt"><?php _se('or'); ?> <a data-action="cancel-upload"><?php _se('cancel'); ?></a></span>

I tried by myself a lot but i can't do it by myself.

And now when a guest or user image is uploaded privately it can be seen by guests, because when i upload in private that image can't be seen by guests, when i see a private upload as a guest i get: That page doesn't exist

i also tried to make it by myself in image.php
PHP:
  <?php
     if(get_image()['user']['id'] != NULL and (get_image()['album']['privacy'] !== 'private_but_link' or is_owner() or is_admin())) {
   ?>

And final problem is why a private upload creates an album by itself?

I think this can be done by changing these codes but please Rodolfo help me to do this, as i said above i can't launch my site because all uploads are in explorer.

I hope this time you can help me. If you don't understand me please let me know.
Regards.
 
You can't make guest uploads private. Privacy in Chevereto runs at album layer, that said, is impossible to make guest uploads private.

I'm considering enable guest albums so if that gets added I can put privacy for guest images. I'm sorry but at this time is impossible to achieve what you want.
 
I got confused Rodolfo

@artonbej

Consider a guest uploads a image in private and leaves it, another guest on other side of world comes over. How would you differentiate both ?
 
Guest uploads can't be private. Privacy is set by album, guests can't create albums so they can't upload private images.
 
You can't make guest uploads private. Privacy in Chevereto runs at album layer, that said, is impossible to make guest uploads private.

I'm considering enable guest albums so if that gets added I can put privacy for guest images. I'm sorry but at this time is impossible to achieve what you want.


But i need a solution for this! The script must have that option. I said that i can't launch my site because all uploads are public i'm really confused about this.
Can you make in next release? if yes than i wait, if not than i will pay to make it.
Let me know please.

@SMP Thanks for reply.
 
Chevereto has this permission by album thing since v3.0.0 and that is how it works. Guest albums will be added in the future but to be honest is not in my immediate todo list.
 
Rodolfo im not asking for guest albums, i just need private upload to be default as i said above...

i just need to switch "Upload" to "Private upoad" and all private uploads to be seen by guests

am i clear?
 
Let me explian it again.

In Chevereto permissions are assigned by album. Only albums can be private, public or "anyone with the link", this means that any image that doesn't belong to an album has the default website permission, which is public by default but if your website is in private mode, then everything will be private.

Since website mode private don't allow guest, there is no way in which guest can have a privacy layer. Guest can't create albums, guest can't have privacy. Guest inherit the default website privacy.

If you want me to add privacy layers for guest please request that feature and if it has popular demand I will consider it.

Thanks.
 
Let me explian it again.

In Chevereto permissions are assigned by album. Only albums can be private, public or "anyone with the link", this means that any image that doesn't belong to an album has the default website permission, which is public by default but if your website is in private mode, then everything will be private.

Since website mode private don't allow guest, there is no way in which guest can have a privacy layer. Guest can't create albums, guest can't have privacy. Guest inherit the default website privacy.

If you want me to add privacy layers for guest please request that feature and if it has popular demand I will consider it.

Thanks.

Okay i understand but i am really confused about this feature!, i just sent my site to some of my friends for a testing and they uploaded 30.. privately images and told me that in his account now are created 30.. albums for no reason!

I really feel sorry for this and i'm stuck here and don't know what to do! i want an answer for this...

Anyway i don't create another thread just tell me here. how to get the url ID as a text?
Example: site.com/image/fGl i just need the ( fGl ) i know the code for:

<?php echo get_image()['url']; ?> gets Hotlink: site.com/image/image.jpg
<?php echo get_image()['Filename']; ?> gets name of the file
<?php echo get_image()['ID']; ?> gets the id number of image
Now i want that fGl id.

I created another view page example: site.com/i/fGl and now i need the url to go to that view page, i am structuring it like:
<?php echo G\get_base_url('i'); ?>/<?php echo get_image()[' Here i don't know the fGl id ']; ?>

I wait for your reply.
Thanks
 
The ID for the image object can be obtained by doing:
  • get_image()['id'] (gets real database id)
  • get_image()['id_encoded'] (gets fake public id)
You can do the following:

PHP:
G\debug(get_image());

To check all the properties available.

Also, you should check app/route.image.php to see how the <ID> is taken from the URL and then injected to the system:

PHP:
$id = CHV\decodeID($handler->request[0]);
 
Back
Top