Kunena 6.3.0 released

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

This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 1.7, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.

Important Slider for DiscussBot

More
12 years 6 months ago - 12 years 6 months ago #1 by jfabitz
Using the NoNumber! Slider plugin you will be able to show the DiscussBot beneath each article as a collapsible vertical accordian-style slider.

(You can download the Slider plugin at www.nonumber.nl/extensions/slider and install)

1. Open the file /plugins/content/kunenadiscuss/kunenadiscuss.php in editor

2. Add Slider to "Posts in discussion" display as outlined below...

a. Find line (approx. line 438)
Code:
protected function showForm($row, $catid, $thread, $subject ) {

b. Locate ob_start (); and ob_end_clean (); section at bottom of this function

c. Insert line to initialize $str variable as slider start tag just below ob_start ();
New line to add (Note: Change "View Comments" to match Slider title desired)...
Code:
$str = '{slide=View Comments|closed|noscroll}';

d. To concatenate (add to) $str variable, change line $str = ob_get_contents (); to...
Code:
$str .= ob_get_contents ();

e. Insert line just above ob_end_clean (); to further concatenate and finalize returned $str variable as slider closing tag
Code:
$str .= '{/slides}';

The ending lines of protected function showForm($row, $catid, $thread, $subject ) {
should now be...
Code:
ob_start (); $str = '{slide=View Comments|closed|noscroll}'; $thread->display (); $str .= ob_get_contents (); $str .= '{/slides}'; ob_end_clean (); return $str; }

3. Add Slider to "Discuss this article" form display...

Do the same for the next function in the same file co that the ending lines of
Code:
protected function showForm($row, $catid, $thread, $subject ) {
will now be...
Code:
ob_start (); $str = '{slide=Add Comments|closed|noscroll}'; $this->debug ( "showForm: Rendering form" ); include (JPATH_ROOT . "/{$this->basepath}/kunenadiscuss/form.php"); $str .= ob_get_contents (); $str .= '{/slides}'; ob_end_clean (); return $str; }

Note: You may change the Slider title (in line after ob_start()') from "Add Comments" to whatever you prefer.

4. Save edited file /plugins/content/kunenadiscuss/kunenadiscuss.php

5. Disable Kunena DiscussBot plugin, Check-in, enable Plugin and Check-in again.

DiscussBot plugin should now show as collapsible slider.

You're welcome. :)
Last edit: 12 years 6 months ago by jfabitz.
The following user(s) said Thank You: korkunov, dunebeat

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

More
12 years 4 months ago #2 by jfabitz
Replied by jfabitz on topic Re: Slider for DiscussBot
I just found a weird bug when using slider for DiscussBot.

If the article has a "Vote" option for user rating, the vote plugin is adding "&hitcount=0" to the URL that is used by slider and it will mess up the javascript. The form gets submitted and the page will be repainted when the slider link is clicked open BEFORE you can enter Kunena comments.

I have removed the "$hitcount=0" that gets added to the URI by the "Vote" plugin and it seems to now be working OK. I have yet to figure out why that would have been put in there to begin with, as "hitcount" is already a form variable used in the vote form (and is set to equal "0" when the form is submitted anyhow).

I tested and all still seems to work - even identifying if the user (from the same IP) has already voted today.

The line that needs to be remarked out is in /plugins/content/vote/vote.php on line 67...
Change to...

//$uri->setQuery($uri->getQuery().'&hitcount=0');

...and all will be well (I hope).

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

Time to create page: 0.494 seconds