Using Jumi
1 post
• Page 1 of 1
Using Jumi
Hello,
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??
Code:
$text = $row->introtext;
$plugin =& JPluginHelper::getPlugin('content', 'jumi');
// create the plugin
$className = "plgcontentjumi";
// Makes sure we have an event dispatcher
if(!is_object($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.
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??
Code:
$text = $row->introtext;
$plugin =& JPluginHelper::getPlugin('content', 'jumi');
// create the plugin
$className = "plgcontentjumi";
// Makes sure we have an event dispatcher
if(!is_object($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.
- remkop
- Fresh Boarder

- Posts: 1
- Joined: Mon Dec 21, 2009 10:15 am
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Links
- SEO Links
- Submit Website
- General Web
- Hotwire Directory
- Mozilla Ranks
- Link Fanatic
- General Web Directory
- Human Edited Directory
- PUOICM News
- ACLS Certification
- ppi claims advice company
- ppi claims
- Payday Loans
- daily deals
- bad credit loans
- mobile ad networks
- eliquid
- Ultra Directory
- Positive Finance
- Payday Loans Online
- Pataweb
- Post Articles
- Online Shopping
- Your safe way to better health
- fine jewelry
- Western Sky