Note!
Where we are it is now the weekend; so there might be a slight delay in our reply. Thanks for understanding!Integration of Komento with custom components
-
ResolvedHi ,
I want to Integrate of Komento with my custom components com_blogd,
For that i create komento_helper.php file in /path/components/com_blogd/ that i attach it.
In view that want add comment i include that file and call onExecute method on class object.
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_blogd' . DS . 'komento_helper.php');
$kobj=new KomentoComBlogd;
$kobj->onExecute($res, 'test', 'entry');
But that do not show on page.
Please give me the way how i can show comment in my own view of componentversiontin likes this post.
Subscribed Products:
Accepted Answer
-
Selected answer for this questionHi Parth,
I've made a few modification on the file komento_plugin.php and also found some minor bug in Komento along the way. Komento is now appearing properly on your site and the bugs that I've found will be fixed on the next release.Parth Lawate likes this post.-
Dear Jason,
It seems that the integration is not as simple as http://stackideas.com/docs/komento/integrations/creating-your-own-integration-files.html describes. The function commentify() fails as soon as it comes to [code type="xml"]if( !$config->get('enable_komento') ) [/code]. The function getConfig() looks for the setting in komento_configs table. Is there any further and complete instruction?
Thanks a lot. -
Hi,
As long as you have the integration plugin file properly placed, you will have to go to the backend Komento->Integration->Select your component to enable it. This is necessary even for those supported plugin that comes in the box. -
...I cannot see my component is listed in the integration page. However, I found that the documents contain some error. The option 1 where to place the plugin file should be "/path/components/com_yourcomponent/komento_plugin.php", not "/path/components/com_yourcomponent/komento_helper.php". -
It is supposed to be komento_plugin.php. It is a minor spelling mistake we made and will be fixed in the next release. -
Looking forward to your new release. :) BTW, I found the magic bug in helper.php. Again, komento_plugin.php was mis-spelled as komento_helper.php. Now, the commentify() works smoothly.
-
27 responses Add a reply
-
-
Subscribed Products: -
-
Subscribed Products: -
Hi Parth,
The latest Komento is out and the documentation is published at the following link.
http://stackideas.com/docs/komento/integrations/creating-your-own-integration-files.html -
Hi Jason,
I Integrate according to latest Komento with my custom components com_blogd,
For that
I install latest Komento component version 1.0.2722.
i create komento_helper.php file using latest doc in /site/components/com_blogd/ that i attach it.
In view of postdetail that want add comment i add following code in postdetail.php that i attach it.
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_komento' . DS . 'bootstrap.php' );
Komento::commentify( 'com_blogd', $res );
But that still not show on page.
I am waiting for it from long time.Please solve my issue how i can show comment in my own view of component.
Subscribed Products: -
-
Subscribed Products: -
-
-
Hi Parth,
When I visit the site http://202.88.154.166/~vaibhav/blogd/, I am getting an "Invalid License Key" screen right now. Please advice. -
Subscribed Products: -
Subscribed Products: -
-
Hi there
I got a similar problem. The output is there, but it says "Comment posting has been locked by admin".
In the Joomla-Backend -> Komento -> Integration i can see the button for my component and do all the settings. I activated comments under "workflow".
But why does it say, that access is denied?
My component does not use cat-ids, because there is no need to use categories.
I tried to output some debugging-text in every function of the komento_plugin.php and recognized, that the following functions are not executed:
public function load( $cid )
public function getContentIds( $categories = '' )
public function getCategoryId()
Only isListingView(), isEntryView() and onExecute() are executed. -
-
Directly:
$komento_file = JPATH_ROOT . DS . 'components' . DS . 'com_komento' . DS . 'bootstrap.php';
require_once($komento_file);
$map = array('rezept_id' => $row['rezept_id'],
'catid' => 1,
'introtext' => $row['rezept_beschreibung'],
'text' => $row['rezept_kochanleitung']
);
$options = array("params" => array());
Komento::commentify( 'com_pm', $map, $options ); -
-
Here's the Pluginfile.
That is the debugging-output from the file:
Comments
components/com_pm/views/rezepte/tmpl/detail.php187:
$map = Array
(
[rezept_id] => 689
[catid] => 1
[introtext] => Testrezept
[text] => Testrezept
)
function load(), components/com_pm/komento_plugin.php64:
$cid=0
function load(), components/com_pm/komento_plugin.php84:
$result = Array
(
[rezept_id] => 689
[rezept_bezeichnung] => Testrezept
[rezept_beschreibung] => Testrezept
[rezept_anmerkungen] => Testrezept
[rezept_kochanleitung] => Testrezept
[rezept_menge] => 1
[rezept_mengeneinheit] => 1
[rezept_rating] => 0
[rezept_rate_count] => 0
[rezept_created_by] => 47
[rezept_create_date] => 2013-03-22 13:22:33
[rezept_images] =>
[rezept_status] => 1
[rezept_trash] => 0
[rezept_naehrwerte_berechnet] => a:0:{}
[rezept_meta_description] => Testrezept
[rezept_meta_title] => Testrezept
[author] => Jeff
[id] => 689
[title] => Testrezept
[createdby] => 47
[catid] => 1
[permalink] => 689
)
function onExecute(), components/com_pm/komento_plugin.php154:
Array
(
[sort] => oldest
[limitstart] => 0
[threaded] => 1
) -
Ah i got it! I used arrays for $map und $this->_item instead of objects :-)
Perhaps you should put this into the docs here: http://stackideas.com/docs/komento/integrations/creating-your-own-integration-files.html
as there is no description about the type of the parameters.
Thanks
-
-
-
-
-
-
Well but one last question is still have: In the K2-Itemview the function "comment as guest" is disabled - thats correct.
In my component, also guests can comment. How can i avoid this? I already checked everythin in the integration-settings, but i can't find it.
Is this something i have to put into the plugin? Or am i just blind? ;-) -
Your Response
Please login to reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.