Using EFUP in backend

Home \ forums/topic \ Using EFUP in backend
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #277
    jgbi
    Participant

    I have been using EFUP to upload files in forms at the backend of my site, and when I upgraded to 2.0 I could only upload at the frontend – the backend just showed a partially loaded form.

    It turns out the plugin was looking for the media and plugin folders under the administrator folder.

    I managed to fix it by changing line 117 of easyflashuploader.php to set root=true, e.g.

    protected function fullpath($media = false, $pathonly = false, $root = true)

    For those wanting to use EFUP from within their own code, this PHP function has been serving me very well:

    (Joomla’s built in content.prepare function renders text as if it was in an article – e.g. you can use plugins in the form {easyflashuploader} )

    You can then call an instance of EFUP like this:

    flashuploader("/images/stories/","images");

    or

    flashuploader("/images/stories/","pdf");

    Thanks Michael for a great plugin.

    #1578
    Michael Gilkes
    Keymaster

    @jgbi. Thanks for your contribution. That is quite an interesting code snippet. Looks good.

    Basically, for those who didn’t understand what you did, by setting root to true, you are telling the plugin to use JURI::root instead of JURI::base to create the full path to files.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Using EFUP in backend’ is closed to new replies.