Question about adding addon plugin functionality to module

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sun Jan 19, 2014 3:52 pm
Reply with quote
Report this post
Hello,

I have a question about adding in a K2 plugin feature to the modules come with the theme. Basically, what I have is downloaded the plugin for K2 that allows you to add a topic to more than one category. I have it working on the main display pages, but am needing some guidance on where to put the code so that the module recognizes the plugin.

This is what I found on the author's web site, but I don't think it addresses modules, just the component itself. If you guys have any suggestions, please feel free to throw them my way.


i do this so...

your template / html / mod_k2_content / your template / default.php

Find this

<?php if($params->get('itemCategory')): ?>
<?php echo JText::_('K2_IN') ; ?> <a class="moduleItemCategory" href="<?php echo $item->categoryLink; ?>"><?php echo $item->categoryname; ?> </a>


Change

<?php if($params->get('itemCategory')): ?>
<?php echo JText::_('K2_IN') ; ?> <a class="moduleItemCategory" href="<?php echo $item->categoryLink; ?>"><?php echo $item->categoryname; ?>
<?php
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin ('k2');
$additional_category_links=$dispatcher->trigger('onK2AfterLinkCategoryPublish', array($item->id));
echo $additional_category_links[0];?>
</a>


Thank you for your help in advance!

Tim
User avatar
Junior Boarder

GK User
Mon Jan 20, 2014 11:55 am
Reply with quote
Report this post
Which module you want to modify?
User avatar
Platinum Boarder

GK User
Mon Jan 20, 2014 4:19 pm
Reply with quote
Report this post
I was needing to modify the News Show Pro GK5. That will allow me to use the features of the multiple cat assignments in K2.
User avatar
Junior Boarder

GK User
Mon Jan 20, 2014 4:20 pm
Reply with quote
Report this post
Do you need access to the site? I can setup a dev account.
User avatar
Junior Boarder

GK User
Wed Jan 22, 2014 9:09 pm
Reply with quote
Report this post
No, because I don't it will be possible. This is huge custom work and this kind of changes are far beyond our support.
User avatar
Platinum Boarder

GK User
Thu Jan 23, 2014 4:22 am
Reply with quote
Report this post
bkrztuk wrote:No, because I don't it will be possible. This is huge custom work and this kind of changes are far beyond our support.


No worries, I was just curious as to which files I could modify that might be able to accomplish this. I will explore it.
User avatar
Junior Boarder

GK User
Thu Jan 23, 2014 10:25 pm
Reply with quote
Report this post
You need to trigger plugin while module is rendered or just add some additional queries to source classes but I don't think it will be easy. Whole NSP is designed to work with particular data source and default tables structure. It all depends of your plugin, if it modify default table it will be not so easy.
User avatar
Platinum Boarder


cron