Welcome, Guest. Please login or register.
Did you miss your activation email?

 
Advanced search

22745 Posts in 6703 Topics- by 17593 Members - Latest Member: permsk

07-12-2019 23:55:44
JOOM::GALLERY::FORUMJoomGallery 3.x JUXInteraction with other componentsKomento integration with Joomgallery
Pages: [1]
Print
Author Topic: Komento integration with Joomgallery  (Read 15174 times)
0 Members and 1 Guest are viewing this topic.
arj
Newbie
*
Offline Offline

Posts: 24


View Profile
« on: 14-10-2015 14:00:44 »

Howdy folks. Perhaps some of you have already thought of integrating Komento as the default commenting component with Joomgallery. Komento does make it reasonably easy to integrate with a plugin system which is fairly easily adaptable, so even a noob like me has managed to get it going. I am attaching the commento plugin, which should be actually usable with your instance of joomgallery, as it does not really ask for anything I have customized on my page. Attached is the plugin file, perhaps some more skilled developer can review it and clean it up a bit.

You can call the plugin in your code with:

require_once( JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php' );
Komento::commentify( 'com_joomgallery', $article );

I have this on my image detail page and am additionally passing $article with following info

$article = array('id' => $this->image->id,
'title' => $this->image->imgtitle,
'hits' => $this->image->hits,
'created_by' => $this->image->owner,
'catid' => $this->image->catid,
'link' => JURI::current(),
'introtext' => $this->image->imgtext,
'text' => $this->image->imgtext,
'fulltext' => $this->image->imgtext
);


Showcase here:

http://slovakaviation.sk/photos/civil-aircraft/civilne-lietadla/smartwings-b737-800-om-tsg-3434
Logged
Brat
Newbie
*
Offline Offline

Posts: 6



View Profile
« Reply #1 on: 03-12-2015 04:11:45 »

You actually did a great job getting this together. I started and made some tweaks that I hope will be helpful. I am using the latest version of Komento (2.05)and this seems to work in my installation (it is offline and I am still testing, but so far, so good). I referred to the current Komento documentation, so if you are using an earlier version, this may not apply.

1) Komento plugins should be installed in the following folder: (SITE ROOT)/components/komento/komento_plugins

2) The plugin naming convention is com_componentname.php. So, for Joomgallery, the Komento plugin should be named: com_joomgallery.php

3) The code from the original attachment is actually mostly correct. However, in order for it to fully render in Komento control panel correctly, two extra functions were needed:

Code:
// this function pulls in the Joomgallery logo
public function getComponentIcon()
{
   return JURI::root('true').'/media/joomgallery/images/joom_logo.png';
}

// And this function provides the component display name
public function getComponentName()
{
   return 'Joomgallery';
}

3) To get Komento to render, you need to use Joomla's template-based HTML override to change Joomgallery's detail/default.php file. (NOTE: if you are using the new Bootone theme, you would also want to edit detail/bootone.php). Hopefully, future versions of Joomgallery will have Komento support built-in.

I've attached both the Komento revised plugin file and the altered default.php file for review and testing. Again, great job and thank you for the contribution.  Grin
Logged
wuron
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #2 on: 15-01-2016 19:52:24 »

Nice! Works great. THX
Logged
petjez
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #3 on: 25-05-2016 20:28:04 »

Nice job!

Has someone managed to get the comments under the category instead under the photo?

Patrick
Logged
Brat
Newbie
*
Offline Offline

Posts: 6



View Profile
« Reply #4 on: 19-07-2016 04:18:37 »

Nice job!

Has someone managed to get the comments under the category instead under the photo?

Patrick

By "under the category" are you referring to comment entry AND display? Comment display only (with the entry form under the individual pictures)?
Logged
petjez
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #5 on: 19-07-2016 07:46:44 »

What i mean by "under the category" is a comment entry AND display under every category and subcategory. For example on this page: http://www.globetrotten.nl/fotos/reizen/ijsland. Or under this subcategory: http://www.globetrotten.nl/fotos/reizen/ijsland/de-golden-circle.

My individual photo's are in a photoswipe popup box so there is no space for a comments box. In fact i want guests to comment on my categories. There is an option for the JComments component, but i like Komento much more: http://www.en.joomgallery.net/documentation/modules/joomjcomments.html

Regards,
Patrick
« Last Edit: 19-07-2016 08:16:18 by petjez » Logged
Brat
Newbie
*
Offline Offline

Posts: 6



View Profile
« Reply #6 on: 21-07-2016 03:28:44 »

What i mean by "under the category" is a comment entry AND display under every category and subcategory. For example on this page: http://www.globetrotten.nl/fotos/reizen/ijsland. Or under this subcategory: http://www.globetrotten.nl/fotos/reizen/ijsland/de-golden-circle.

My individual photo's are in a photoswipe popup box so there is no space for a comments box. In fact i want guests to comment on my categories. There is an option for the JComments component, but i like Komento much more: http://www.en.joomgallery.net/documentation/modules/joomjcomments.html

Regards,
Patrick

Thank you for the clarification. Now that I better understand, I may get some time tonight to play with code a bit. I'll post what I find once I'm done.   Cool
Logged
petjez
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #7 on: 21-07-2016 09:26:57 »

That would be excellent. I like the to Components very much, it would be a great mariage  Grin Grin Grin
Logged
Brat
Newbie
*
Offline Offline

Posts: 6



View Profile
« Reply #8 on: 25-07-2016 00:19:54 »

That would be excellent. I like the to Components very much, it would be a great mariage  Grin Grin Grin

I've taken the last several days to really look closely at Komento and JComments to better understand their differences. I'm very familiar with JComments as it solved a very tricky problem I had with a complex custom component, so I needed to compare and contrast.

Short explanation: Komento as it is currently structured may not be able to help with that you want (at least not easily).

Here are the details:

To keep this as brief as I can, JComments (even though out of the box it is not aesthetically very pleasing), is actually the richer component. JComments has both object_id and objects_group table columns. You can leverage this to allow you to comment on categories as well as photos. Example: Store a photo id belonging to objets_group "joomgallery_photos" and category ids as "joomgallery_categories".

Komento however only has the cid column. There isn't a counterpart to "objects_group". So there is no way to distinguish ids (at least that I can find).

To give you a more concrete example, let's look at the following breadcrumb from your site (translated to English):

Home » Travel » Iceland »The Golden Circle

The Golden Circle is the category for which you want to have a comment form (for example)

You could do this with Komento, but because Komento effectively is really set up for only one comment type, if you were to use Komento for category comments, you could ONLY use it for category comments. That could be problematic in terms of future-proofing your site (i.e., Komento MAY come out with more features later).

Assuming you will use Komento (and I can't blame you, it is a great extension Cool), then your choices could include the following:

  • Use Komento for commenting on categories only and make the needed adjustments to the related Joomgallery plugin. This is perhaps the easier solution, but note the concerns listed above.
  • Use Komento to comment on the individual photos by developing a method to allow the comment form to display within the actual modal window. This option would require some custom coding and probably involve Ajax. Also, no two sliders behave alike, so trying to make your solution agnostic would add another layer of complexity.

IT ALL BOILS DOWN TO THIS: What do you want to do? And how badly do you want to do it? Keep in mind that web sites are for the long haul, and will change over time, so there are serious pluses and minuses that you would need to consider.

I do find this interesting, so I may play with an alternative Komento plugin that is strictly for commenting on categories as opposed to items.


« Last Edit: 25-07-2016 04:24:58 by Brat » Logged
petjez
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #9 on: 25-07-2016 09:19:48 »

Wow, thank you for looking into this. I fully understand that we don't want to do to much changing in the code. In my case i want to keep the detailed image popup screen as clean as possible, so there's no room for another form. And on the other hand, if JComment does the trick i may have a look at it. I just need to change some CSS to make it fit into my site.

Thank you so much for your effort!

Regards,
Patrick
Logged
petjez
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #10 on: 15-08-2016 22:00:39 »

I tried to create a new template for JommComment that looks a bit like the Komento template. Now it a lot better Smile
Logged
Pages: [1]
Print
Jump to:  

HOSTED BY SCHWARZKÜNSTLER ®

PROTECTED BY  ZB BLOCK  AND Project Honey Pot
Theme orange-lt created by panic

Bad Behavior has blocked 10335 access attempts in the last 7 days.

maternal