Kunena 7.0.4 Released

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

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 Discussions on Blog Pages

More
14 years 4 months ago - 14 years 4 months ago #112135 by gray
I had the same problem - the quick reply form was showing on a blog view, which is not recognized as blog because of no menu item (if you have categories showing up on articles as link, try clicking on them - you'll get a "false blog view").

What I needed - to have quick reply form (as well as posts) to be shown ONLY on articles. I have to introduce new option - "Show on Articles", and hack plugin files (description is given below). Result - www.zerno.org.ua .

1. File: /plugins/content/kunenadiscuss/kunenadiscuss.php
Find code:
Code:
$view = JRequest::getVar ( 'view' ); $layout = JRequest::getVar ( 'layout' ); $isBlogPage = ($view == 'section' || $view == 'category') && $layout == 'blog'; $isFrontPage = $view == 'frontpage' || $view == 'featured'; if ($isBlogPage) { $this->debug ( "onPrepareContent: we are in blog page." ); $show = $this->params->get ( 'show_blog_page', 2 ); } else if ($isFrontPage) { $this->debug ( "onPrepareContent: we are in front page." ); $show = $this->params->get ( 'show_front_page', 2 ); } else { $this->debug ( "onPrepareContent: we are in {$view}/{$layout} page." ); $show = $this->params->get ( 'show_other_pages', 2 ); }

Replace with:
Code:
$view = JRequest::getVar( 'view' ); $layout = JRequest::getVar( 'layout' ); $isBlogPage = ( $view == 'section' || $view == 'category' ) && $layout == 'blog'; $isFrontPage = $view == 'frontpage' || $view == 'featured'; $isArticle = $view == 'article'; if ( $isBlogPage ) { $this->debug ( "onPrepareContent: we are in blog page." ); $show = $this->params->get( 'show_blog_page', 2 ); } else if ( $isFrontPage ) { $this->debug ( "onPrepareContent: we are in front page." ); $show = $this->params->get( 'show_front_page', 2 ); } else if ( $isArticle ) { $this->debug ( "onPrepareContent: we are viewing an article." ); $show = $this->params->get( 'show_article_pages', 2 ); } else { $this->debug ( "onPrepareContent: we are in {$view}/{$layout} page." ); $show = $this->params->get( 'show_other_pages', 2 ); }

2. File: /plugins/content/kunenadiscuss/kunenadiscuss.xml

Find:
Code:
<field name="show_blog_page" type="radio" default="2" description="PLG_KUNENADISCUSS_SHOW_BLOG_PAGE_DESC" label="PLG_KUNENADISCUSS_SHOW_BLOG_PAGE"> <option value="0">PLG_KUNENADISCUSS_OPTION_NOTHING</option> <option value="1">PLG_KUNENADISCUSS_OPTION_LINK</option> <option value="2">PLG_KUNENADISCUSS_OPTION_REPLIES</option> </field>

Insert after:
Code:
<field name="show_article_pages" type="radio" default="2" label="Show in Articles" description="What to display on article view pages"> <option value="0">PLG_KUNENADISCUSS_OPTION_NOTHING</option> <option value="1">PLG_KUNENADISCUSS_OPTION_LINK</option> <option value="2">PLG_KUNENADISCUSS_OPTION_REPLIES</option> </field>

Find:
Code:
<param name="show_blog_page" type="radio" default="2" label="PLG_KUNENADISCUSS_SHOW_BLOG_PAGE" description="PLG_KUNENADISCUSS_SHOW_BLOG_PAGE_DESC"> <option value="0">PLG_KUNENADISCUSS_OPTION_NOTHING</option> <option value="1">PLG_KUNENADISCUSS_OPTION_LINK</option> <option value="2">PLG_KUNENADISCUSS_OPTION_REPLIES</option> </param>

Insert after:
Code:
<param name="show_article_pages" type="radio" default="2" label="Show in Articles" description="What to display on article view pages"> <option value="0">PLG_KUNENADISCUSS_OPTION_NOTHING</option> <option value="1">PLG_KUNENADISCUSS_OPTION_LINK</option> <option value="2">PLG_KUNENADISCUSS_OPTION_REPLIES</option> </param>

www.justPHP.net - Custom coding for Joomla!
Last edit: 14 years 4 months ago by gray. Reason: better code format
The following user(s) said Thank You: sozzled

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

Time to create page: 0.293 seconds