Keyword

Invoking plugin in tag view

  • Nikola
  • Nikola's Avatar Topic Author
  • Offline
  • New Member
More
8 years 1 week ago - 8 years 1 week 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:

<?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 1 week ago by Nikola. Reason: Solved!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week 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?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum