Keyword

How to get publish date in not k2 plugin

  • Mantas
  • Mantas's Avatar Topic Author
  • Offline
  • New Member
More
8 years 11 months ago #148609 by Mantas
Hello everyone

I am using Advanced Google Analytics for Joomla (deconf.com). It works with joomla's article system. What I am trying to achieve is to get publish date from k2.

I added “.JHTML::_(‘date’, $item->created, JText::_(‘K2_DATE_FORMAT’)).” Everything works except it shows current time, but not published date.
If anybody can tell me how to connect it with k2 database. please let me know!

Thank You!!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 11 months ago #148611 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to get publish date in not k2 plugin
Unfortunately if the extension does not support k2 out of the box, this should be a custom thing. I think you should address this issue to the extensions developers.

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

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

  • Mantas
  • Mantas's Avatar Topic Author
  • Offline
  • New Member
More
8 years 11 months ago #148612 by Mantas
Replied by Mantas on topic How to get publish date in not k2 plugin
Thanks for reply.

Yes I know it. I just thought it's something easy to achieve and you can help me.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 11 months ago #148638 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to get publish date in not k2 plugin
Since this is a 3rd party extension I have no knowledge on how it was built.

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

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

  • Mantas
  • Mantas's Avatar Topic Author
  • Offline
  • New Member
More
8 years 11 months ago #148642 by Mantas
Replied by Mantas on topic How to get publish date in not k2 plugin
But maybe You know how to make this code to access K2 instead of Joomla article base? Thanks in advance!
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.plugin.plugin' );
jimport( 'joomla.html.parameter' );

class plgSystemadvga extends JPlugin {

 private $authorname, $categoryname, $pubyear;

 function plgSystemClickyTrackingCode(&$subject, $params) { 

    parent::__construct($subject, $params); 

    $mode = $this->params->def('mode', 1);

}

 function onContentAfterDisplay( $context, &$article, &$params ) {
    if ($context == "com_content.article"){ 
        $this->authorname=($article->created_by_alias) ? $article->created_by_alias : $article->author;
        $this->categoryname=$article->category_title;
        $temp=explode('-',$article->created);
        $this->pubyear=$temp[0];
        //echo $this->authorname.$this->categoryname.$this->pubyear;
    }   
 }

function onAfterRender(){

        $app = JFactory::getApplication();
        $user = JFactory::getUser();        

        if ( $app->isAdmin()){
            return;
        }

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 11 months ago #148669 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to get publish date in not k2 plugin
As I already told you, this is a 3rd party extension support should be addressed to its developer.

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