Keyword

K2 Module have some "bug" code that can't effect by plugin

  • JOOBLOGs.COM
  • JOOBLOGs.COM's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 7 months ago #78697 by JOOBLOGs.COM
I don't know did you know this one . But in my case i think it should be call like "bug"Check example with mod_k2_contentif ($format != 'feed') {                    //Plugins                    $params->set('parsedInModule', 1); // for plugins to know when they are parsed inside this module                    $results = $dispatcher->trigger('onBeforeDisplay', array(&$item, &$params, $limitstart));                    $item->event->BeforeDisplay = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onAfterDisplay', array(&$item, &$params, $limitstart));                    $item->event->AfterDisplay = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onAfterDisplayTitle', array(&$item, &$params, $limitstart));                    $item->event->AfterDisplayTitle = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onBeforeDisplayContent', array(&$item, &$params, $limitstart));                    $item->event->BeforeDisplayContent = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onAfterDisplayContent', array(&$item, &$params, $limitstart));                    $item->event->AfterDisplayContent = trim(implode("\n", $results));                    $dispatcher->trigger('onPrepareContent', array(&$item, &$params, $limitstart));                    $item->introtext = $item->text;                    //K2 plugins                    $item->event->K2BeforeDisplay = '';                    $item->event->K2AfterDisplay = '';                    $item->event->K2AfterDisplayTitle = '';                    $item->event->K2BeforeDisplayContent = '';                    $item->event->K2AfterDisplayContent = '';                    JPluginHelper::importPlugin('k2');                    $results = $dispatcher->trigger('onK2BeforeDisplay', array(&$item, &$params, $limitstart));                    $item->event->K2BeforeDisplay = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onK2AfterDisplay', array(&$item, &$params, $limitstart));                    $item->event->K2AfterDisplay = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onK2AfterDisplayTitle', array(&$item, &$params, $limitstart));                    $item->event->K2AfterDisplayTitle = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onK2BeforeDisplayContent', array(&$item, &$params, $limitstart));                    $item->event->K2BeforeDisplayContent = trim(implode("\n", $results));                    $results = $dispatcher->trigger('onK2AfterDisplayContent', array(&$item, &$params, $limitstart));                    $item->event->K2AfterDisplayContent = trim(implode("\n", $results));                    $dispatcher->trigger('onK2PrepareContent', array(&$item, &$params, $limitstart));                    $item->introtext = $item->text;                }Above code raised K2 plugin with item.But the trouble is after event raised author data code used :| It's mean author data of item won't store in item while call via plugin//Author                if ($params->get('itemAuthor')) {                    if (! empty($item->created_by_alias)) {                        $item->author = $item->created_by_alias;                        $item->authorGender = NULL;                        if ($params->get('itemAuthorAvatar'))                        $item->authorAvatar = K2HelperUtilities::getAvatar('alias');                    } else {                        $author = &JFactory::getUser($item->created_by);                        $item->author = $author->name;                        $query = "SELECT `gender` FROM #__k2_users WHERE userID={$author->id}";                        $db->setQuery($query, 0, 1);                        $item->authorGender = $db->loadResult();                        if ($params->get('itemAuthorAvatar')) {                            $item->authorAvatar = K2HelperUtilities::getAvatar($author->id, $author->email, $componentParams->get('userImageWidth'));                        }                        //Author Link                        $item->authorLink = JRoute::_(K2HelperRoute::getUserRoute($item->created_by));                    }                }Did you already know this one , or this's your wanted ?

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

  • JOOBLOGs.COM
  • JOOBLOGs.COM's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 7 months ago #78698 by JOOBLOGs.COM
Actually i have just tried on my local by a little hack mod k2 (just move code for author from bottom to above plugin calling).

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

More
14 years 6 months ago #78699 by Rand
Please help JOOBLOGs.com. Joomsocial and K2 integration is essential. PLEASE PLEASE PLEASE!!!!!!!!!!!

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

  • JOOBLOGs.COM
  • JOOBLOGs.COM's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 6 months ago #78700 by JOOBLOGs.COM
For all sites already live i can help you to mod it direct in code that can integrate. Plugin look like still can not finish :|

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

More
14 years 6 months ago #78701 by Rand
Wowowowow!!! That would be awesome. I could SERIOUSLY use your assistance.
How should I contact you with the details?

JOOBLOGs.COM said:For all sites already live i can help you to mod it direct in code that can integrate. Plugin look like still can not finish :|

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

  • JOOBLOGs.COM
  • JOOBLOGs.COM's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 6 months ago #78702 by JOOBLOGs.COM
Please contact me via system ticket on jooblogs.com or our forum forum.jooblogs.com.
Tks

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


Powered by Kunena Forum