Your IP : 216.73.216.41


Current Path : /home/purehotels/public_html/modules/mod_easyfolderlistingpro/
Upload File :
Current File : /home/purehotels/public_html/modules/mod_easyfolderlistingpro/helper.php

<?php
/**
* @version		1.5
* @author		Michael A. Gilkes (michael@valorapps.com)
* @copyright	Michael Albert Gilkes
* @license		GNU/GPLv3

Easy Folder Listing Pro Companion Module
Copyright (C) 2013-2016 Michael Albert Gilkes (Valor Apps)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

// no direct access
defined('_JEXEC') or die('Restricted access');


class modEasyFolderListingProHelper
{
	public static function executeContentPlugin($profileId)
	{
		//load the easyfolderlistingpro content plugin
		JPluginHelper::importPlugin('content', 'easyfolderlistingpro');
		
		//create a fake article content
		$fake_article = new JObject;
		$fake_article->text = "{easyfolderlistingpro profile='".$profileId."'}";
		
		//process the listing. since $fake_article->text is what is changed, the results 
		//  returned will be void.
		$results = JEventDispatcher::getInstance()->trigger('onListingPrepare', array(&$fake_article));
		
		//return the formatted html listing
		return $fake_article->text;
	}
}
?>