• 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.

Different names

Ok. I use a "random" method. File class.upload.php change:
PHP:
$thumb_filename = str_replace($this->extension, 'th.'.$this->extension, $image_filename);
on (I add random characters):
PHP:
$thumb_filename = str_replace($this->extension, generateRandomString(rand(5, 8)).'.th.'.$this->extension, $image_filename);
All is well. But there is a dot between the file name and what I add to it. For example:

[ur_l=[URL]http://site.com/7cs][/URL][im_g]http://site.com/images/3qx1TNBpf.ZrYoXSE.th.jpg[/img][/url]

How to remove this dot? It's highlighted in red. Help me please.
 
It adds a dot representing the extension, not in the middle of the name. You will need to remove that dot or any additional dot from the source filename.

Finally, the random method doesn't add a dot there.
 
But they are interconnected somehow... I tried everything already... ((( How can I delete a dot from the source filename?
 
Maestro Rodolfo, my knowledge of PHP are tends to zero, unfortunately... Please tell me what and where I should add... We are wild and stupid Russia, we have Putin on the bear jumps only. Don't leave us in trouble... Or do I have to smash my head against the wall
dash1.gif


0_a6d67_551e137f_L.jpg


Thank you!
 
Last edited:
Code:
$string = "really.long.file.name.txt";
$lastDot = strrpos($string, ".");
$string = str_replace(".", "", substr($string, 0, $lastDot)) . substr($string, $lastDot);
 
Just trim the dots from the naming function, is not that hard. Remember that v2.X is provided "as is" and I don't quite understand what those dots give you that trouble.

First time that someone got that troubled for that.
 
I understand that "as is"...

Just the administrator of one of the major forums has taught its users to open a direct path to the images in my Chevereto bypass codes. He wrote regular expressions also. If I stay a dot he will write new regular expressions. And if not - it will confuse him... Please tell me where and what to insert... And we'll be friends continents ))
 
Last edited:
Hello World!
Friends, experts PHP, help me to finish what dear Rodolfo advised. As I understand it's not difficult, but I lack the knowledge. I broke the whole head already.
Thanks in advance!
 
Back
Top