- Posts: 17
COMMUNITY FORUM
Invoking plugin in tag view
- Nikola
-
Topic Author
- Offline
- New Member
Less
More
8 years 7 months ago - 8 years 7 months ago #157953
by Nikola
Invoking plugin in tag view was created by Nikola
*EDIT* solved it myself, stupid, forgot (since it was a while ago) that I myself, at the developer's instruction, renamed the original "onK2BeforeViewDisplay" function to "onK2BeforeViewDisplayCustom". This is why the map isn't shown at the top automatically, and I am allowed to call it when I want. In the meantime, I had to return the original PHP file, and I erased the change. In case anyone needs it, may not be the best, but is a quick solution to the problem. Thanks anyway if you wasted your time reading this :)
Hola,
I have a problem I believe Krikor or any of the crew can easily solve :)
I am using a 3rd party Google maps plugin. The developer helped me with a problem I had - my customized category view involved some Joomla modules in the "right" position, and the client insisted that the map had to be placed between two Joomla modules. This meant I was unable to use the regular "echo $this->item->event->K2.." call in the override, so the plugin developer came up with this piece of code I placed between two other plugin calls which loaded each module individually:
(of course, his plugin contains the aforementioned custom function)
Now, each K2 entry is associated with a Gmap set of coordinates, and when I use the Tag view, it properly shows all of the entries in the map. However, although I can customize the Tag view using override, I don't seem to be able to affect where the map (plugin) is displayed - it is automatically shown on top of the mainbody. Can I (and how?) also use the JDispatcher trigger in this view? To make things perfectly clear and simple: I would like to place the map just about anywhere I want :)
I am using K2 2.6.9, and as I don't intend to upgrade, due to some heavy core modifications I was forced to do for this project specifically, I don't mind making further code edits. Also, if it means anything, the Google map is the only K2 plugin I will be using in this project.
Please help this poor fellow once again, as you did so many times before :)
Hola,
I have a problem I believe Krikor or any of the crew can easily solve :)
I am using a 3rd party Google maps plugin. The developer helped me with a problem I had - my customized category view involved some Joomla modules in the "right" position, and the client insisted that the map had to be placed between two Joomla modules. This meant I was unable to use the regular "echo $this->item->event->K2.." call in the override, so the plugin developer came up with this piece of code I placed between two other plugin calls which loaded each module individually:
<?php
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('k2');
$dispatcher->trigger('onK2BeforeViewDisplayCustom');
?>
(of course, his plugin contains the aforementioned custom function)
Now, each K2 entry is associated with a Gmap set of coordinates, and when I use the Tag view, it properly shows all of the entries in the map. However, although I can customize the Tag view using override, I don't seem to be able to affect where the map (plugin) is displayed - it is automatically shown on top of the mainbody. Can I (and how?) also use the JDispatcher trigger in this view? To make things perfectly clear and simple: I would like to place the map just about anywhere I want :)
I am using K2 2.6.9, and as I don't intend to upgrade, due to some heavy core modifications I was forced to do for this project specifically, I don't mind making further code edits. Also, if it means anything, the Google map is the only K2 plugin I will be using in this project.
Please help this poor fellow once again, as you did so many times before :)
Last edit: 8 years 7 months ago by Nikola. Reason: Solved!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 7 months ago #157969
by Krikor Boghossian
Replied by Krikor Boghossian on topic Invoking plugin in tag view
Hello Nikola,
Can you send me the code of the tag.php file, preferably using a gist on Github?
Can you send me the code of the tag.php file, preferably using a gist on Github?
Please Log in or Create an account to join the conversation.