Make "regular" the default uploader.

Here is the function. This can be a learning exercise for me.

    function getAllUploaderArray ($sLink = '')
    {
        return array(
            '_adm_admtools_Flash' => array('active' => !isset($_GET['mode']) ? true : false, 'href' => $sLink),
            '_' . $this->sPrefix . '_regular' => array('active' => $_GET['mode'] == 'single' ? true : false, 'href' => $sLink . "&mode=single"),
            '_' . $this->sPrefix . '_record' => array('active' => $_GET['mode'] == 'record' ? true : false, 'href' => $sLink . "&mode=record"),
            '_' . $this->sPrefix . '_embed' => array('active' => $_GET['mode'] == 'embed' ? true : false, 'href' => $sLink . "&mode=embed"),
        );
    }

Geeks, making the world a better place
Quote · 18 Aug 2013

Even if flash is removed from the list, it is still loaded as the default uploader.  This question has been asked before and it is time Boonex answered it.  Explain how the uploaders work, how to make regular the default, or embed the default or whatever the user wants.  I want the development team to come in and answer this question.  Boonex start supporting your product.  As a user I don't mind answering questions and helping out others but it won't hurt for the ones that writes the boonex code to step in when members don't have the answers.  This was not answered before; so answer it now.  The forums are full of unanswered questions about the code and it should not be that way.

Geeks, making the world a better place
Quote · 18 Aug 2013

Edit inc/classes/BxDolFilesConfig.php line 144 (bottom of file)

Replace the function with this

function getAllUploaderArray ($sLink = '')
{
       return array(
              '_adm_admtools_Flash' => array('active' => $_GET['mode'] == 'flash' ? true : false, 'href' => $sLink . "&mode=flash"),
              '_' . $this->sPrefix . '_regular' => array('active' => (!isset($_GET['mode']) || $_GET['mode'] == 'single') ? true : false, 'href' => $sLink . "&mode=single"),
              '_' . $this->sPrefix . '_record' => array('active' => $_GET['mode'] == 'record' ? true : false, 'href' => $sLink . "&mode=record"),
              '_' . $this->sPrefix . '_embed' => array('active' => $_GET['mode'] == 'embed' ? true : false, 'href' => $sLink . "&mode=embed"),
        );
}

Edit inc/classes/BxDolFilesUploader.php at line 213 add "null => 'getUploadFormFile'," so it will look like this

$aUplMethods = array(
         null => 'getUploadFormFile',
         'flash' => 'getMultiUploadFormFile',
         'single' => 'getUploadFormFile',
         'record' => 'getRecordFormFile',
         'embed' => 'getEmbedFormFile'
);

Done, It will change the default uploader for all modules.

EDIT: Let me know if there are any problems with it.

so much to do....
Quote · 18 Aug 2013

Worked except for one little thing, you need to swap regular for flash in BxDolFilesConfig.php or it will show Flash in the drop-down with the regular uploader.

    function getAllUploaderArray ($sLink = '')
    {
        return array(
            '_' . $this->sPrefix . '_regular' => array('active' => $_GET['mode'] == 'single' ? true : false, 'href' => $sLink . "&mode=single"),
            '_adm_admtools_Flash' => array('active' => $_GET['mode'] == 'flash' ? true : false, 'href' => $sLink . "&mode=flash"),
            '_' . $this->sPrefix . '_record' => array('active' => $_GET['mode'] == 'record' ? true : false, 'href' => $sLink . "&mode=record"),
            '_' . $this->sPrefix . '_embed' => array('active' => $_GET['mode'] == 'embed' ? true : false, 'href' => $sLink . "&mode=embed"),
        );
    }

I got the first part but did not see the second part.  Seems a bit convoluted the way Dolphin does things.  The idea behind making regular the default is to avoid issues with the flash uploader on mobiles.

Geeks, making the world a better place
Quote · 24 Aug 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.