Kunena 6.2.6 released

The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

This category is for the plugin developed, endorsed, maintained and supported by the Kunena project team. The topics in this category only relate to the plugin developed for K 1.6 and later versions.

Question use absolute path to to post?

More
12 years 7 months ago #1 by tim rayworth
I'm using JMS2WIN multisites for my Joomla setup. The way it works is that I have one Joomla installation shared by several websites that have their own tables (with unique prefixes) for content. Some tables are shared across all the sites, including #__users and all the Kunena tables. This way the same forum is present on all websites. It all seems to work very well.

I'm having trouble implementing the discussbot, however. The problem I'm running into is that when a message created on one site is viewed on another, the content gets mixed up. When creating a message, the discussbot enters the content_id, section_id,and cat_id for the article into its table, and then Kunena creates links from those. I can see that I'm going to have to hack this to make it work with multisites, but I'm not sure the best approach. What I really need are either absolute URLs to be entered into the table, or the site's domain so that Kunena will create a valid link.

In looking at the plugin's files, I can't figure out where I would start making changes.

Does anyone have any suggestions?

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

More
12 years 6 months ago #2 by Matias
Sorry for the delay -- this is something that hasn't been thought before.

Interesting component.

The issue with discussbot comes from the fact that you have only one forum together with multiple contents in articles. There's no way to make this to work, without making both Kunena Discuss and Kunena (article bbcode) multi-site aware. Kunena doesn't store absolute link or even article source -- it uses bbcode tag to display article (which means that updating article will update the message).

Kunena Discuss table is only used in discuss bot and inside topic there's bbcode tag that identifies the article. So I would make #__kunenadiscuss table local for each site and only change the BBCode inside message. Then I would go to components/com_kunena/lib/kunena.parser.php, locate case 'article': and add logic to handle new options inside that bbcode tag.

If you're fluent in PHP, I suggest you to fork both Kunena and Discuss plugin in:
github.com/kunena
That allows anyone to take your work and make it better (or even include to Kunena distribution).

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

More
12 years 5 months ago #3 by tim rayworth
Thanks, Matias. I'm not fluent in PHP- more like an American in Paris with a translation guide. However, I took some of your advice on the approach and seem to have it working pretty well.

I hacked root/plugins/content/kunenadiscuss.php (version 1.7) so that when it creates a post, it adds the ID of the site that the article came from. JMS2WIN defines the site ID, so it's a good hook. The new BBCode looks something like this:
Code:
29|SITE1

I hacked root/component/com_kunena/lib/kunena.parser.php (version 1.7) so that it splits up the BBCode and uses the site ID to set the database prefix to query the appropriate tables.

So now it shows the correct article across sites and adds a nice little label above the article to say where it comes from. The parameter that sets the article to display intro vs. fulltext doesn't seem to work, so I hardcoded a 100 word limit.

There are lots of other parts that would be nice to integrate better-- the parameters don't make much sense when there are different content categories on each site-- but this will do for me for now.

I'm posting the files here in case anyone else can use them or improve them. (I couldn't figure out GitHub). If someone else tried it, look for case 'article' in kunena.paser.php to configure it for your sites. I haven't tried it with J!1.6, but I made the same edits for both versions.

Feedback is most welcome!

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

More
12 years 5 months ago #4 by tim rayworth
Oops. The forum won't allow php files. Here they are as .jms2win.txt files.
Attachments:

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

Time to create page: 0.379 seconds