Instantiate / Initialise Joomla 2.5/3+ Framework in an External Script

There are times you need to integrate a 3rd party script into Joomla, without having the modify any core files, while still able to remain within the Joomla framework. A good example is, say, an AJAX request that points to a specific external php file that isn't part of Joomla's MVC. You can do this easy with the following code (in the beginning of the 3rd party script):

	define( '_JEXEC', 1 ); //This will define the _JEXEC constant that will allow you to access the rest of the Joomla framework
	$joomlaPath = dirname(__FILE__)."/../.."; //The only part you have to change. Make sure the relative part points to your Joomla root
	define('JPATH_BASE', $joomlaPath);
	require_once( JPATH_BASE.'/includes/defines.php' );
	require_once( JPATH_BASE.'/includes/framework.php' );
	// Instantiate the application.
	$app = JFactory::getApplication('site');
	// Initialise the application.
	$app->initialise();
	// Now you can use all classes of Joomla
        $db = JFactory::getDBO();
	$doc = JFactory::getDocument();

Happy Holidays!

So it's that time of the year again. To celebrate the holidays, we at SIMBunch is throwing a 30% discount for all our products. From now until 31st December, simply use the coupon code SIMXMAS during checkout to enjoy your holiday savings!

For the benefit of our users, we've compiled a list of other holiday discounts from our Joomla Friends! (list to be updated, so check back often)

  • CorePHP - 35% HAPPYSAVINGS (25th December)
  • Gavick - 30% DEC-2013 (2nd January)
  • JoomlArt - 25% JAXMAS13 (3rd January)
  • Joomlashack - 30% or more SANTASALE (26th December)
  • JoomPlace - 25% jp25christmas (6th January)
  • Mijosoft - 30% XMAS30 (31st December)
  • ReadyBytes - Extra 3 months on any plan MERRY-X-MAS (8th January)
  • SIMBunch - 30% SIMXMAS (31st December)
  • Stackideas - Free JoomlaShine template for EasyBlog (22nd December)
  • Themexpert - 30% XMAS13 (31st December)

Merry Christmas!

SIMGallery Integrates with EasySocial

SIMGallery

SIMGallery 4.2 has just been released with 2 new featues: It is now completely integrated with EasySocial (full details of the integration can be found in the product description), and albums commenting has been added. Give the demo a try!

Introducing SIMAnswers with EasySocial

SIMAnswers

We have added EasySocial to the list of SIMAnswers's integrations. This includes integrating with EasySocial's notifications, activities stream, user profiles, and points system. The SIMAnswers package also comes with an EasySocial app that displays your users' Q&A summary. We'll be adding EasySocial to our demo site soon, so stay tuned!

For a full list of integrations and detailed description, please check out the documentation - or dive straight into the demo!

Introducing ProfileURL with EasySocial

ProfileURL

The most popular vanity URL extension for Joomla! social websites has added an important integration. ProfileURL now works with EasySocial profiles. This integration is 2-way: if you have the "permalink" field enabled for EasySocial, changes made to that field will be managed by and reflected in ProfileURL.

Take a quick look at the product description, or dive straight to the demo!

Latest Comments

  • Introducing SIMAnswers with EasySocial

    redioktarizal 06.09.2014 15:43
    I am interested in your product, hopefully this can help me in the world of online marketing ( ...
     
  • Introducing the new SIMGallery 4.1

    Mike Feng 17.05.2014 07:47
    Thanks! If you have a minute, please consider leaving a review at SIMGallery's JED page at ...
     
  • Introducing the new SIMGallery 4.1

    Ray Field 17.05.2014 07:36
    I love SIM gallery. I find it the best tool for sorting my pictures, in such innovative different ...
     
  • ParaInvite 3.5 is here!

    yann anderson 08.09.2012 12:08
    just installed your product parainvite, with joomla 2.5 and jomsocial 2.6.2 --> very easy to use, and ...
     
  • ParaInvite 3.5 is here!

    Mike Feng 07.09.2012 05:12
    Yes, it works with the latest JomSocial version.