pepperstreet VIP
Total posts: 3,837
27 Jun 2012 17:26

(Shortcut to re-created Cobalt 8 topic, for voting etc.)

Joomlapolis just released the new CB Activity plugin. Documentation or API info is not available, yet. But it should be extendable... Currently I have not many infos, sorry. Just wanted to let you know about this long awaited feature...

I hope you will consider it for your CB integration plans.

Product info page

Some infos from the developer:

"There are a couple ways you can add new entries. You can directly insert a new entry into the database as it's specifically designed to be generic. You can use the below method being used in the plugin file (requires CB API to be present and plugin loaded)."

$activity    =    new cbactivityActivity( $_CB_database );



$activity->set( 'user_id', (int) $user->get( 'id' ) );

$activity->set( 'type', 'profile' );

$activity->set( 'subtype', 'registration' );

$activity->set( 'title', 'has joined [sitename_linked]' );

$activity->set( 'icon', 'nameplate' );

$activity->set( 'date', cbactivityClass::getUTCDate() );



$activity->store();

"Below is similar to the above, but it uses data API to grab an object (empty or otherwise)."

$activity    =    cbactivityData::getActivity( array( 'id', '=', $id ), null, null, false );



$activity->set( 'user_id', (int) $user->get( 'id' ) );

$activity->set( 'type', 'profile' );

$activity->set( 'subtype', 'registration' );

$activity->set( 'title', 'has joined [sitename_linked]' );

$activity->set( 'icon', 'nameplate' );

$activity->set( 'date', cbactivityClass::getUTCDate() );



$activity->store();


"I recommend reviewing plugin.cbactivity.php to see various additions. There are over 400 icons powered by glyphicons.com/. You can download the free package to see what they all look like. The icon name you'd use is just the name of the icon (e.g. "nameplate")."


EDIT:

  • Corrected link o Cobalt 8 topic.

Last Modified: 27 Jan 2015



pepperstreet VIP
Total posts: 3,837
27 Jun 2012 17:32

General CB API infos:

  • see PDF Attachment
  • some CB related Tutorials

Sergey
Total posts: 13,748
27 Jun 2012 23:16

Thank you, very useful.


andiamine VIP
Total posts: 295
30 Jun 2012 20:50

Good we need this integration :D to fly high


pepperstreet VIP
Total posts: 3,837
16 Nov 2012 12:24

... requires CB API to be present and plugin loaded ..."

Regarding CB integration in general:

Is it possible to integrate the CB API as a global configuration option?! Now there is simple avatar/profile link integration. What about adding a checkbox for "load CB API" ?

As far as I understand that would give access to all parameters, functions and data?! I think jReviews does it this way. You can access user fields and data in jReviews templates etc. Which seems to be really cool and looks like a complete integration, IMHO. (i am just guessing)


Sergey
Total posts: 13,748
17 Nov 2012 06:18

In fact Joomla 2.5 has user_pofiles table that should store all user attributes like additional fields. And it by Idea have to be accessible anywhere across Joomla in JFactory::getUser() object. Is extension that extend user profile approach this technique we even do not have to do anything to access additional user data.

Another thing is that Cobalt 8 will have plugin API. It means events triggers on all its events. It means that we may create integrations more easily than just adding files. And it also mean that there may be few integrations active at the same time. Unlike now you can chose only one file.

I think that with delivery of Cobalt 8 integrations with social extensions will not be a am issue and will be a matter of single or set of plugins.


pepperstreet VIP
Total posts: 3,837
19 Nov 2012 23:31

You can run joomla content plugin. You can call just one plugin and render it's content.

The Joomla custom module does it like this (for all content plugins) :

if ($params->def('prepare_content', 1))

{

    JPluginHelper::importPlugin('content');

    $module->content = JHtml::_('content.prepare', $module->content, '', 'mod_custom.content');

}

I guess, this means: - activate/load all content plugins - take the whole module content area and trigger content-prepare event

right?

Sorry, Joomla API and framework is not my real daily business ;-)

1.) Can this be done with the whole Cobalt page content? Maybe you can give a hint ?

2.) Or does it make sense to load and fire a single plugin (CB Content Bot)

3.) Or just do everything I need in the Cobalt HTML field?


Sergey
Total posts: 13,748
20 Nov 2012 01:07

That is easy to do, to put all Cobalt output through content.prepare. But with at scenario we will have to form HTML before t gets to template :) It means no templates anymore. Just get it as it is. It means it is useless.

Actually you do not need to prepare all cobalt output. There are labels and tags and other elements that should not be passed there. Also if you want just to append something better to make it in template. To print out something at the bottom rather than put all content through prepare.

Those things make content prepare plugin work limited only to HTML field.

What plugin in particular you need to treat al Cobalt output?


pepperstreet VIP
Total posts: 3,837
20 May 2013 14:03

Just noticed your KnowledgeBase article about Cobalt Events & Triggers. I guess, this is the C8 way to integrate with CB Activity? I would like to do that, but I am lost... and don´t know exactly where to begin :S ._.


Sergey
Total posts: 13,748
20 May 2013 23:33

This article I wrote for extly.com developers in general.

If you want to integrate you need simple create Joomla plugin which will be installed in mint group. And in onActivity method use $activity->set();

I suggest you to look into Jomsocial plugin.


pepperstreet VIP
Total posts: 3,837
17 Sep 2013 19:15

Off-Topic:

This article I wrote for extly.com developers in general.

Did you hear something about AutoTweet NG support? Are they working on it?


Sergey
Total posts: 13,748
26 Jan 2015 03:23

I moved it but generaly just edit it and change category.


Sergey
Total posts: 13,748
27 Jan 2015 01:45

pepperstreet And what about "internal links" inside the forum?

That should work because in topic URL only ID of article not even section or category.

Powered by Cobalt