Skip to Content Skip to Menu

[#5204] K2 and Community Builder

  • sylvanr
  • sylvanr
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 0
9 years 8 months ago - 9 years 7 months ago #260368 by sylvanr
[#5204] K2 and Community Builder was created by sylvanr
I took a vacation/break from developing my CB site for a couple of weeks and then upon return, I spent some time with K2 and have been exploring whether it may be a solution or part of the solution for me and my CB site.

Krileon has given multiple suggestions in the past about my issue of data storage within comprofiler and has said that I "need to dig into code to create a solution" because I am "hitting standard database limitations." A "fieldtype plugin" was also suggested by Krileon but I don't know how to implement that. Since I am not a programmer, I am not sure where I would start as far as "digging into code" at this point either. I was told that I was looking for a "simple solution" and I am probably continuing to look for a "simple solution" since my level of expertise doesn't really allow for much else at this time so bear with me and my admitted ignorance.

My first question at this point, seeing that CB has had another upgrade, is whether this most recent upgrade affects my previous problems with the database structure? I am not expecting that to be the case but thought I better ask in case there is now a "simple solution" with the upgrade that resolved previous problems?

Otherwise, my question is about K2 and Community Builder:

In K2 with the extension JE K2 Story, I have been able to set up something that looks like it might work for me. I am able to set up forms for the end user to use in the front end for writing stories on specific topics that I specify with K2 categories. With the JE K2 Story menu of the type "K2 Submit," I can present a specific form for a specific category. That works great for my purposes for having end user's write on specific topics. With the KE K2 Story menu of the "ItemCreate" type, the end user can create a list of all THEIR own stories for a specific category or categories. That works fine.

The problem I am having now, with this setup, is having all the end user's K2 items (articles) display on their own page or a category of their items (articles) display on their own page without having to go through the list view in JE K2 "ItemCreate" menu type. Instead of accessing a list of articles from which to choose, I would like the items (articles), or at least the first few lines from the items (articles) to appear on a page and then when the end user clicks on an item (article), the entire item (article) would display. I am able to do something similar by using a K2 menu, of the type "Categories" but then all the articles of ALL users are displayed. When I look at permissions in K2 for categories, it appears I have control over editing permissions but not viewing permissions? I only want the end user to have access to their own articles that they have written and then share those articles with those they are connected with on CB. Any ideas?

I tried a CB plug in called K2 for CB which adds a tab to CB for displaying K2 items (articles) but get message, "This plugin is not compatible with your current version of CB. Any ideas on that?
Last edit: 9 years 7 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 8 months ago - 9 years 8 months ago #260407 by krileon
Replied by krileon on topic K2 and Community Builder

My first question at this point, seeing that CB has had another upgrade, is whether this most recent upgrade affects my previous problems with the database structure? I am not expecting that to be the case but thought I better ask in case there is now a "simple solution" with the upgrade that resolved previous problems?

Nope, your issue is a database limitation that we need to look into and see if there's a solution out there around it. So far I've found no solutions aside from increasing your database parameters, which you've already done. CB is just not setup to store an articles worth of information in a single field. This is only the second case I've seen of this in over 5 years so it's not common enough for us to develop some sort of special plugin/field for it. Below is the ticket for your issue where you can keep track of progress.

forge.joomlapolis.com/issues/4946

As for your K2 article display issue I suggest editing CB Articles within CB > Plugin Management then under Parameters > Articles set Model to K2. This will allow it to display K2 articles the user owns on their profile as a list. To change it from a list display to more of a blog view you'd need to modify the CB Articles template file found below.

components/com_comprofiler/plugin/user/plug_cbarticles/templates/default/tab.php

Alternatively you could leave the template file as is and rename the tab to Stories. Another option is to use CB Blogs which can handle the creation and display of Blogs from profile, but rename its tab and adjust its language strings to Stories if you wanted. Both solutions being better options than trying to put so much data into CBs user row via fields.


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.
Last edit: 9 years 8 months ago by krileon.
The following user(s) said Thank You: sylvanr

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

  • sylvanr
  • sylvanr
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 0
9 years 8 months ago #260566 by sylvanr
Replied by sylvanr on topic K2 and Community Builder
CB Articles is working well with K2 and I see how it could resolve a lot of my problems.

Is there a way for CB Articles to SORT the articles by category? I don't see anywhere to enter a parameter like that but it would be great if there is a way to do it?

It would be even greater if there was a parameter for having CB Articles to only display an end users items/articles from a specific category and to have the ability to have several instances of CB Articles that could each be used for it's own specific category. (?)

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 8 months ago #260589 by krileon
Replied by krileon on topic K2 and Community Builder

Is there a way for CB Articles to SORT the articles by category?

No, not currently. At the moment it sorts by create date. A feature is planned to let you select a different column to sort by in a later release.

It would be even greater if there was a parameter for having CB Articles to only display an end users items/articles from a specific category

Yes, see the CB Articles parameters. You can exclude categories from displaying.

and to have the ability to have several instances of CB Articles that could each be used for it's own specific category.

That's not possible with plugin tabs at this time. It would require a near complete rewrite of the plugin to implement at in its current state, which isn't going to happen anytime soon. Once we've improved our frontend API further it maybe possible as the idea is to get rid of tabs entirely in favor of a fields only like structure with tabs becoming field containers. Then everything would essentially be developed with duplication in mind. I've no idea when we'll get around to that though, but my guess is CB 3.x.


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: sylvanr

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

  • sylvanr
  • sylvanr
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 0
9 years 8 months ago - 9 years 8 months ago #260677 by sylvanr
Replied by sylvanr on topic K2 and Community Builder
Pertaining to sorting the articles with CB Articles, you had said: "At the moment it sorts by create date. A feature is planned to let you select a different column to sort by in a later release.

I am wondering if there is a line of code accessible somewhere that I could change the "sort by" to "category" instead of "create date." I know you said that there will be a feature in future but in the meantime, I just wonder if it is just a matter of changing one line of code, maybe I could do that somehow??? Of course, I'm not a programmer so if it was anything complicated, I wouldn't want to run the risk of messing everything up.

The one thing on CB Articles that I can't seem to get to work is the "email" button? I have tried using it a couple of times but the email doesn't go through?

On CB Blogs, the button reads "New Blog." Can I change that to just read, "New" ?? I tried to figure it out myself and used Safari's web inspector and found:

<button type="button" onclick="location.href=' n-retrospect.com/index.php/profile/pluginclass?plugin=cbblogs&action=blogs&func=new ';" class="blogsButton blogsButtonNew btn btn-success"> New Blog

I was able to click on "New Blog" and delete the word "Blog" and this was reflected on the button itself but when I exited that CB user record and logged in as a different user, the button said "New Blog" again??? I know I'm missing something here??

I am also having a problem with CB Blogs. When I try to add a new blog, I keep getting this message: "Blog failed to validate! Error: Category not allowed!" I have played with settings in the back end. For "Model," I have tried both Joomla and K2. I have been using K2 for CB Articles and haven't have any problems but thought I would see if using Joomla would help for CB Blogs. It didn't make a difference. I have tried various categories from both Joomla and K2 but none seem to work?
Last edit: 9 years 8 months ago by sylvanr.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 8 months ago #260738 by krileon
Replied by krileon on topic K2 and Community Builder

I am wondering if there is a line of code accessible somewhere that I could change the "sort by" to "category" instead of "create date." I know you said that there will be a feature in future but in the meantime, I just wonder if it is just a matter of changing one line of code, maybe I could do that somehow??? Of course, I'm not a programmer so if it was anything complicated, I wouldn't want to run the risk of messing everything up.

Yes, it can be changed in code of course. It's part of the ORDER BY of the article query, which is a part of the model PHP file. For example the below is the Joomla model file.

components/com_comprofiler/plugin/user/plug_cbarticles/models/joomla25.php

The one thing on CB Articles that I can't seem to get to work is the "email" button? I have tried using it a couple of times but the email doesn't go through?

Email button? CB Articles has no such thing. Once you leave the tab/profile it's no longer CB Articles. CB Articles just links to Joomla/K2 articles.

On CB Blogs, the button reads "New Blog." Can I change that to just read, "New" ?? I tried to figure it out myself and used Safari's web inspector and found:

Yes, as with nearly all strings it's a language string. It can be changed, translated, etc.. within CBs language files. Please see the below for language usage information.

www.joomlapolis.com/cb-solutions/languages

I was able to click on "New Blog" and delete the word "Blog" and this was reflected on the button itself but when I exited that CB user record and logged in as a different user, the button said "New Blog" again??? I know I'm missing something here??

Deleting from the developer tools of your browser is entirely local. You're not actually modifying your site.

I am also having a problem with CB Blogs. When I try to add a new blog, I keep getting this message: "Blog failed to validate! Error: Category not allowed!" I have played with settings in the back end. For "Model," I have tried both Joomla and K2. I have been using K2 for CB Articles and haven't have any problems but thought I would see if using Joomla would help for CB Blogs. It didn't make a difference. I have tried various categories from both Joomla and K2 but none seem to work?

Does the category dropdown actually have categories available? The user needs categories that they can access as that's where the blogs will store.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum