Skip to content

Instantly share code, notes, and snippets.

@ryandemmer
Last active June 10, 2020 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryandemmer/416eff35cd1989ee47b39e40503acba5 to your computer and use it in GitHub Desktop.
Save ryandemmer/416eff35cd1989ee47b39e40503acba5 to your computer and use it in GitHub Desktop.
inlineupload.php
<?php
defined('JPATH_BASE') or die;
class PlgSystemInlineUpload extends JPlugin
{
public function onWfFileSystemGetRootDir(&$root)
{
// inline upload only
if (JFactory::getApplication()->input->getInt('inline', 0) === 1) {
$year = date('Y');
$month = date('m');
$day = date('d');
$root = 'images/uploads/' . $year;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment