CB Activity on Joomla Articles

7 months 1 week ago #335138 by micheleq
CB Activity on Joomla Articles was created by micheleq
Hello,
I'm in the process of testing the upgrade to J4 and one of my difficulties is replacing the now defunct JComments. I have a handful of categories of Joomla articles that require comments to them. In researching alternatives i tested out JLex Comments, which seemed fine until I upgraded to J4 and the cb plugin for it crashed (error 500) the back end for the entire CB administration. 
Here's the error, but I'm not wanting a solution as I read that I could use CB Activity, which I'd much prefer. 
Warning: Spoiler!


I came across Kyle's comment in the forum "The integration included in CB Activity is built for Joomla articles". I have tried to figure out a way how to use it that way but I haven't found how. 
The goal is to have in certain articles (defined by category hopefully) include a section below it with member's comments. The comments should be for that article specifically, and not an aggregate of the site's comments. This would be for registered members only. I would like to import the previous comments, but I can always figure out a query to do that after the system is implemented. 
Is this possible?
Thank you,
Tomás 

Please Log in to join the conversation.

7 months 1 week ago #335140 by krileon
Replied by krileon on topic CB Activity on Joomla Articles
That's supported by CB Activity out of the box. Simply install CB Activity, which should also install its module and Joomla plugin, then in System > Manage > Plugins edit "Content - CB Activity". You can then enable article commenting under the Comments tab. You can also enable per-article likes under the Likes tab as well.

As for importing the previous comments you'll need at least 4 things in your other commenting solutions database. The user id of the user who made the comment, the article id for what article the comment is on, the date of the comment, and the comment itself. You can then use SQL to easily migrate that data. Example as follows.
INSERT INTO `jos_comprofiler_plugin_activity_comments` ( `user_id`, `asset`, `message`, `date` ) SELECT `user_id`, CONCAT( 'article.', `article_id` ), `comment`, `date` FROM `jos_comments`

I'm no idea what the database structure is for your current solution so you'll need to adjust that SELECT query as needed. Basically it's important to build the `asset` properly. For article comments it's just "article.ARTICLE_ID" so as long as you have the article id in your current comment solution it's easy to CONCAT the asset together as shown in the example. Note the example is using a table prefix of jos_ you will need to change that to whatever your table prefix is.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 months 1 week ago #335160 by micheleq
Replied by micheleq on topic CB Activity on Joomla Articles
Thank you for the quick replay. 
Thank for the query, that's exactly it, just changing the table and field names. 

I'm looking in deeper into the CB Activity and it's really complex, so I'm trying to wrap my head around it. 

When enabling the System > Manage > Plugins, comments show up everywhere, including modules. How can I curb that for only articles? 

I have about 100 categories and only a handful require comments. Those categories I use them for live Q&A broadcasts where the comments serve as a means to ask questions. We have them about once a week, so there's a new article every week under one of those few categories, so automatically allowing comments within those categories makes life easier. The question is will the field 'exclude categories' accept 80 some categories? 

Under the plugin's Comments tab, what is  'Asset' field's syntax? I tried 'Articles' but that didn't work. 

What does the ignore/include Context do? I tried doing something like "kunena" but that didn't work. 

After upgrading to J4, I noticed that in the profile's activity tab many new activity items appeared from the forum, e.g. "carol replied to a discussion about a month ago" without any further content. Namely a new activity record was entered for every kunena message. (Kunena requires uninstall/install when upgrading to J4). How can I exclude all the kunena activity altogether, and going forward?

Thank you for the help, I wasn't able to find any docs with more explanation. 
Tomás 

Please Log in to join the conversation.

7 months 1 week ago #335162 by krileon
Replied by krileon on topic CB Activity on Joomla Articles

When enabling the System > Manage > Plugins, comments show up everywhere, including modules. How can I curb that for only articles? 

You can limit where they display using the parameters under the "Include and Exclude" tab. They should not be showing up everywhere though unless you added substitutions for them everywhere. By default the comments only show for "com_content.article" context which is when viewing a Joomla article directly. You can exclude entire article categories, article ids, or even authors from that same tab as well.

I have about 100 categories and only a handful require comments. Those categories I use them for live Q&A broadcasts where the comments serve as a means to ask questions. We have them about once a week, so there's a new article every week under one of those few categories, so automatically allowing comments within those categories makes life easier. The question is will the field 'exclude categories' accept 80 some categories? 

You can exclude as many as you want. So yes you can have 80 category ids there if you wanted.

Under the plugin's Comments tab, what is  'Asset' field's syntax? I tried 'Articles' but that didn't work. 

Leave it empty.

What does the ignore/include Context do? I tried doing something like "kunena" but that didn't work. 

It works with Joomla contexts. Please click the "Toggle Inline Help" button top right to see Joomla 4 input descriptions. What the context is is dependent on what ran the content plugin API.

After upgrading to J4, I noticed that in the profile's activity tab many new activity items appeared from the forum, e.g. "carol replied to a discussion about a month ago" without any further content. Namely a new activity record was entered for every kunena message. (Kunena requires uninstall/install when upgrading to J4). How can I exclude all the kunena activity altogether, and going forward?

Kunena activity is logged by CB Auto Actions. If you don't want Kunena activity unpublish the relevant system actions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: micheleq

Please Log in to join the conversation.

7 months 6 days ago - 7 months 6 days ago #335188 by micheleq
Replied by micheleq on topic CB Activity on Joomla Articles

When enabling the System > Manage > Plugins, comments show up everywhere, including modules. How can I curb that for only articles? 

You can limit where they display using the parameters under the "Include and Exclude" tab. They should not be showing up everywhere though unless you added substitutions for them everywhere. By default the comments only show for "com_content.article" context which is when viewing a Joomla article directly. You can exclude entire article categories, article ids, or even authors from that same tab as well. 
 

I realized what was happening, I have modules that pick up info from articles (i.e favorite quotes) and all of these were showing the activity's comment, when I excluded those categories, they disappeared, as intended. 

I have about 100 categories and only a handful require comments. Those categories I use them for live Q&A broadcasts where the comments serve as a means to ask questions. We have them about once a week, so there's a new article every week under one of those few categories, so automatically allowing comments within those categories makes life easier. The question is will the field 'exclude categories' accept 80 some categories? 

You can exclude as many as you want. So yes you can have 80 category ids there if you wanted.

Great. 

Under the plugin's Comments tab, what is  'Asset' field's syntax? I tried 'Articles' but that didn't work. 

Leave it empty.

OK

What does the ignore/include Context do? I tried doing something like "kunena" but that didn't work. 

It works with Joomla contexts. Please click the "Toggle Inline Help" button top right to see Joomla 4 input descriptions. What the context is is dependent on what ran the content plugin API.

Got it. 

After upgrading to J4, I noticed that in the profile's activity tab many new activity items appeared from the forum, e.g. "carol replied to a discussion about a month ago" without any further content. Namely a new activity record was entered for every kunena message. (Kunena requires uninstall/install when upgrading to J4). How can I exclude all the kunena activity altogether, and going forward?

Kunena activity is logged by CB Auto Actions. If you don't want Kunena activity unpublish the relevant system actions.

Found it and I was able to disable it. I did run a query to remove all the previous kunena activity (those alone were about 40k rows).  

I have successfully imported all the activity from the old comments. what I'm seeing however, is that the old jcomments had BB code (actually, a combo of simple bb code like 
[b] [/b] and <br />
) which CB Activity is not recognizing. What is the best way to convert or worst case remove those? Query? 

Thank you, slowly getting my head around this. 
Tomás

Please Log in to join the conversation.

7 months 3 days ago #335198 by krileon
Replied by krileon on topic CB Activity on Joomla Articles

) which CB Activity is not recognizing. What is the best way to convert or worst case remove those? Query?

CB Activity supports BBCode. You'll need to enable it under the parser parameters for that comments stream. HTML is not permitted though. It might be best to just replace those with SQL though and not support them anymore as most people don't know BBCode.

Thank you, slowly getting my head around this.

And it's all about to change with CB Activity 6.0.0, lol. The configuration will be becoming 100x easier. Auto migration will be implemented from 5.0.0 to 6.0.0 though so no need to worry. If you'd like to see what all is coming though you can find my progress below.

www.joomlapolis.com/forum/6-news-and-publicity/244334-what-am-i-working-on

Been a long road, but we're preparing to release Beta 1 of CB Activity 6.0.0 this week.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: micheleq

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.238 seconds

Facebook Twitter LinkedIn