• 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

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