- Posts: 2
COMMUNITY FORUM
Developing a K2 plugin - questions
- Alex Bgg
- Topic Author
- Offline
- New Member
Less
More
7 years 4 months ago - 7 years 4 months ago #162853
by Alex Bgg
Developing a K2 plugin - questions was created by Alex Bgg
Hello everybody!
I need a little bit of help.
I'm' working on a simple content plugin for J3 that replaces certain strings from Joomla output in accordance with pre-defined rules.
I use onContentPrepare() method, parse the HTML output and replace certain tags before sending the output to the browser. The plugin works fine on native Joomla articles and modules. But since my site also utilizes the K2 component, I have problems trying to get K2 output to do the replacements. While having access to category description and extrafields, I actually need the pre-rendered HTML code from the subtemplates.
It seems I need to create a separate K2 plugin (never done it before), so I have a bunch of questions:
1. What event is fired when K2 has already generated the output, including HTML tags around the extrafields?
2. Is there a way to call somehow the methods of a native plugin by the K2 plugin? Having 2 plugins that will do the same work is a nightmare, but I'm sure there must exist solutions.
3. How can I get access to the settings of my plugin (that are set via Admin interface) from the K2 plugin?
Any help will be much appreciated,
Alex
I need a little bit of help.
I'm' working on a simple content plugin for J3 that replaces certain strings from Joomla output in accordance with pre-defined rules.
I use onContentPrepare() method, parse the HTML output and replace certain tags before sending the output to the browser. The plugin works fine on native Joomla articles and modules. But since my site also utilizes the K2 component, I have problems trying to get K2 output to do the replacements. While having access to category description and extrafields, I actually need the pre-rendered HTML code from the subtemplates.
It seems I need to create a separate K2 plugin (never done it before), so I have a bunch of questions:
1. What event is fired when K2 has already generated the output, including HTML tags around the extrafields?
2. Is there a way to call somehow the methods of a native plugin by the K2 plugin? Having 2 plugins that will do the same work is a nightmare, but I'm sure there must exist solutions.
3. How can I get access to the settings of my plugin (that are set via Admin interface) from the K2 plugin?
Any help will be much appreciated,
Alex
Last edit: 7 years 4 months ago by Alex Bgg.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 months ago #162862
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Developing a K2 plugin - questions
Hello Alex,
Better yet I can give you a link to the example K2 plugin which you can extend.
getk2.org/extend/extensions/90-example-k2-plugin-for-developers
Better yet I can give you a link to the example K2 plugin which you can extend.
getk2.org/extend/extensions/90-example-k2-plugin-for-developers
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Alex Bgg
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
7 years 4 months ago #162868
by Alex Bgg
Replied by Alex Bgg on topic Developing a K2 plugin - questions
Krikor,
Thank you for the reply, I'll study the example.
Thank you for the reply, I'll study the example.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 4 months ago #162882
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Developing a K2 plugin - questions
You 're welcome Alex :)
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.