Joomla 4 is coming soon and i need to know how to get the joomla framework and template params in php files outside of joomla.
This is the way in J3:
define( '_JEXEC', 1 );
define( '_VALID_MOS', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/../../..' ));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe = JFactory::getApplication('site');
$mainframe->initialise();
$app = JFactory::getApplication();
$template = $app->getTemplate(true);
$params = $template->params;
Thanks Marco