Multiple files under one entry

Home \ forums/topic \ Multiple files under one entry

Support Home Page Forums Joomla Software Easy File Uploader Module Multiple files under one entry

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #3040


    First off, thank you for putting out the free easy file uploader for joomla. I was not having much luck doing what I wanted to do.

    Anyway, I made a couple of real minor modifications to allow one file input field to be used for multiple selections and to eliminate the need to loop needlessly through unused inputs.

    I wanted to let you know with hopes maybe they would be of use for any future versions.

    In EasyFileUploaderHelper.php:
    root@dc1rpmgt1:/home/joomla/modules/mod_easyfileuploader/Helper# diff .bu/EasyFileUploaderHelper.php.201909232008.spencerc EasyFileUploaderHelper.php
    < $total = intval($params->get(‘efu_multiple’));

    > // $total = intval($params->get(‘efu_multiple’));
    > $total = count($_FILES[$params->get(‘efu_variable’)][‘name’]);

    By changing total to simply a count there is no need to loop through inputs that weren’t used….or even to have extra file inputs.

    Additionally in default.php you just need to add multiple to the input file tag.

    root@dc1rpmgt1:/home/joomla/modules/mod_easyfileuploader/tmpl# diff .bu/default.php.201909231954.spencerc default.php
    < <input type=”file” name=<?php echo ‘”‘.$params->get(‘efu_variable’).'[]”‘; ?> id=<?php echo ‘”‘.$params->get(‘efu_variable’).'[]”‘; ?> style=”margin-top:1px; margin-bottom:1px;” />

    > <input type=”file” name=<?php echo ‘”‘.$params->get(‘efu_variable’).'[]”‘; ?> id=<?php echo ‘”‘.$params->get(‘efu_variable’).'[]”‘; ?> multiple class=”btn btn-info” style=”margin-top:1px; margin-bottom:1px;” />

    The class change was purely aesthetics. I also changed the submit button for the same reason.
    <button class=”btn btn-info” type=”submit”><?php echo $buttonText ?></button>
    <!– <input class=”btn btn-primary” type=”submit” name=”submit” value=<?php echo ‘”‘.$buttonText.'”‘; ?> />^M –>

    The one other change I made was to allow make folders sub folders on the article.

    Pretty sure this only works where URL Rewriting is in use…

    if (isset($_SERVER[‘PATH_INFO’])) {
    $path.= DIRECTORY_SEPARATOR.end($pathsplit);
    // $path.= DIRECTORY_SEPARATOR.$pathsplit;

    It goes right before you would check if the usernames are set to true for using in the the path.

    I’m viewing that it doesn’t auto create the subdirectories as a security feature so no changes to address that….

    Just thought these might be of some value.


    Michael Gilkes

    @nightdaisy. Thanks for your input and change recommendations, Christine!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.