Jueves, 29 Enero 2015 10:23

Using Jumi

Groups your news by sections or by categories

Using Jumi

Postby remkop » Mon Dec 21, 2009 1:27 pm


I'm new to joomla. I tried this module in combination with Jumi.
It seams that this module and the pluging doesn't work together. Thats wy I'm trying to do is myself (maybe a good feature for a next release)

I found out that GlobalNews did just get the text from database and thats why the Jumi/plugin is not called for this text. So I tried to do this myself. I succeeded in this (I did it only for the introtext), but due to my lack of knowledge of joomla i think the code is not verry clean.
Like checks if everything is enabled/installed, creating the class and this works only for Jumi (it would be nice to do it for al plugins, but than I should take an other approach)

So could some of the more experienced developers have a look at it, and maybe gevi me some hints to improve the code??

$text = $row->introtext;
$plugin =& JPluginHelper::getPlugin('content', 'jumi');
// create the plugin
$className = "plgcontentjumi";
// Makes sure we have an event dispatcher
$dispatcher = & JDispatcher::getInstance();
$instance = new $className($dispatcher, (array)($plugin));

$instance->applyJumi($text); //calling owncode
$gn_text = $text;//$row->introtext;

The code is based on the Plugin/helper.php

The function applyJumi() is the same as function onPrepareContent(&$article, &$params, $limitstart) from Jumi (version 2.0.5), only now the $article->text is replaced just by a text parameter.

Thank you very much.
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Mon Dec 21, 2009 10:15 am

Return to Global News

Who is online

Users browsing this forum: No registered users and 1 guest