• 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

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Random url www.tolchx.net/imagen.gif

tolch

Chevereto Member
Website URL
http://www.tolchx.net

Chevereto version
3.9.3

Description of the issue
Hola buenas noches, como podría lograr que un link me genere un gif aleatorio, al igual que este codigo de chevereto:


http://tolchx.net/?random

Codigo: ( <?php echo G\get_base_url("?random"); ?>) me genera un link a la pagina del gif , por ejemplo: http://tolchx.net/image/WOFMi

Necesito una forma de que un link como este http://tolchx.net/?random , me genere aleatoriamente por ejemplo :
http://tolchx.net/images/2017/06/13/26ba8ff1bbc8ee95d09936d5c0d960a9.md.gif

links que terminen en .gif

Gracias!


-------

Hello good night, how can I get a link to generate a random gif, just like this chevereto code:


Http://tolchx.net/?random

Code: (<? Php echo G \ get_base_url ("? Random");?>) It generates a link to the gif page, for example: http://tolchx.net/image/WOFMi

I need a form of a link like this http://tolchx.net/?random, randomly generated for example:
Http://tolchx.net/images/2017/06/13/26ba8ff1bbc8ee95d09936d5c0d960a9.md.gif

Links that end in .gif

Thank you!
 
You will need to hack routes/route.index.php and just inside the 'random' case add a new custom case:

Change this:
PHP:
                // Party Boy
                case 'random':

To this:
PHP:
                // Party Boy
                case 'random2':
                case 'random':

(This will work with ?random2 you can change that name to suit your needs).

Then, at the bottom of that case replace this:
PHP:
                    return G\redirect($image ? CHV\Image::getUrlViewer(CHV\encodeID($imageID)) : '?random');

With this:
PHP:
                    if(key($querystr) == 'random2') {
                        return G\redirect($image ? $image['url'] : '?random2');
                    }
             
                    return G\redirect($image ? CHV\Image::getUrlViewer(CHV\encodeID($imageID)) : '?random');

P.S. Tech support is for issues, not modifications or anything else. Topic moved.
 
Back
Top