• 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

Url Image

Status
Not open for further replies.

wlc28

Chevereto Member
Hi,

I am new to this forum and by the way, I love the scripts works great! Cant wait to see future improvements. I am looking for a way to somehow to change the way the urls show up for images. Right now they should up like myurl.com/image/j I have searched the forum and didnt see much, but am wondering if there is a way to change it, like myurl.com/image/588477332 a random number or text.


Thanks
WLC
 
The id is encoded, is a representation of the real image id (integer) so bigger the integer bigger the encoded id. You are seeing a short representation because you have few images.

Best thing to do in my opinion is to go to your database and change the auto-increment value for your chv_images database table. Change it to (for example) 12345 so upcoming images will be id 123456, 123457 etc.

Another way to increase that number is by adding a padding in the app/lib/functions.php file.
Change this:
PHP:
// Shorthand for cheveretoID encode
function encodeID($var) {
    return cheveretoID($var, "encode");
}

// Shorthand for cheveretoID decode
function decodeID($var) {
    return cheveretoID($var, "decode");
}

To this:
PHP:
// Shorthand for cheveretoID encode
function encodeID($var) {
    return cheveretoID($var+12345, "encode");
}

// Shorthand for cheveretoID decode
function decodeID($var) {
    return cheveretoID($var-12345, "decode");
}

Where "12345" is your padding. This hack is highly discouraged.
 
I am looking at the image table but its just showing me the images i have posted, i do have a list in columns but not sure which one to edit;
1 image_id bigint(32) No None AUTO_INCREMENT
2 image_name varchar(255) utf8_general_ci No None
3 image_extension varchar(255) utf8_general_ci No None
4 image_size int(11) No None
5 image_width int(11) No None
6 image_height int(11) No None
7 image_date datetime No None
8 image_date_gmt datetime No None
9 image_title varchar(64) utf8_general_ci Yes NULL
10 image_description text utf8_general_ci Yes NULL
11 image_nsfw tinyint(1) No 0
12 image_user_id bigint(32) Yes NULL
13 image_album_id bigint(32) Yes NULL
14 image_uploader_ip varchar(255) utf8_general_ci No None
15 image_storage_mode enum('datefolder', 'direct', 'old') utf8_general_ci No datefolder
16 image_storage_id bigint(32) Yes NULL
17 image_md5 varchar(32) utf8_general_ci No None
18 image_original_filename text utf8_general_ci No None
19 image_original_exifdata longtext utf8_general_ci Yes NULL
20 image_views bigint(32) No 0
 
nevermind, i figured it out, still seems kinda low, but its better then one letter.

Thanks
WLC
 
Status
Not open for further replies.
Back
Top