• 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.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.

Two questions about the "multiupload" code block in uploaded.php

TaintedPix

Chevereto Member
1. How can I make it that the code block for multiple uploads be visible even if there is just one upload? I'm making a very simplistic version I will add as an iframe on a discussion forum, and pretty much just removing everything but the multi-upload code block as seen below...

PXy3eu5.png
[/IMG]
PXy3eu5.png

2. How do I add the little hover over "Copy" option seen in the other image tools to the multiupload block? If I could figure that out, it would make it a whole lot easier for members to copy and paste the code.
 
How can I make it that the code block for multiple uploads be visible even if there is just one upload?
You can tweak the uploaded.php page and take the HTML elements of the multiupload result and use them for the single upload. Now, Chevereto uses this code:
PHP:
<?php if(is_multiupload_result()) : ?>
To display the textarea box for the multupload. You will need to simply recreate the div, select and textarea with the proper image tags and language strings.

The copy button
That button uses JS to create a clipboard instance. You can either add a "input-item" class over the coitaining div or workaround a new JS code in theme.js, this is the function:
Code:
   /**
    * Input view/uploaded copy button
    */
    $(selectors.input_item).mouseover(function() {
        if(!$(this).find(selectors.button_copy).exists() && $("input", this).exists()) {
            copy_value = $("input", this).val();
            $(this).generate_copy_button(copy_value); // Declarate the new copy instance
        };
        $(selectors.button_copy, this).css("visibility", "visible");
    }).mouseleave(function() {
        $(selectors.button_copy, this).css("visibility", "hidden");
    });

Note: selectors.input_item = ".input-item".
 
Back
Top