1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
include "/components/com_content/helpers/query.php";
include "/components/com_content/models/article.php";
function load_content($categId, $articleId)
{
global $mainframe;
$articleModel = new ContentModelArticle();
$articleModel->setId($articleId);
$article = $articleModel->getArticle();
$params =& $mainframe->getParams('com_content');
$aparams =& $article->parameters;
$params->merge($aparams);
JPluginHelper::importPlugin( 'component' );
$limitstart = 0;
$dispatcher =& JDispatcher::getInstance();
$results = $dispatcher->trigger('onPrepareContent', array (&$article, &$params, $limitstart));
return $article->text;
} |
Partager