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 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.

Question Phoca Gallery plugin

More
14 years 3 months ago - 14 years 3 months ago #115001 by E_Online
I recently try to hack Kunena Discuss in Phoca Gallery (for Joomla 1.7) and I would like to share my findings:

I added a component field to the kunena discuss table, to make it possible to switch between components.
Code:
kunenadiscuss.php r80: $query = "CREATE TABLE IF NOT EXISTS `#__kunenadiscuss` (`content_id` int(11) NOT NULL default '0', `thread_id` int(11) NOT NULL default '0', `component` text NOT NULL, PRIMARY KEY (`content_id`, `component` (20)) )"; r296: $query = "SELECT d.content_id, d.thread_id, m.id AS mesid, t.thread, t.time FROM #__kunenadiscuss AS d LEFT JOIN #__kunena_messages AS m ON d.thread_id = m.id LEFT JOIN #__kunena_messages AS t ON t.id = m.thread WHERE d.content_id = {$this->_db->quote($row->id)} AND d.component = {$this->_db->quote($this->_app->scope)}"; r324: $query = "DELETE FROM #__kunenadiscuss WHERE content_id={$this->_db->quote($result->content_id)} AND component={$this->_app->scope}"; r502: $query = "INSERT INTO #__kunenadiscuss (content_id, thread_id, component) VALUES( {$this->_db->quote($row->id)}, {$this->_db->quote($thread)}, {$this->_db->quote($this->_app->scope)})";

Developed a small comments template
Code:
com_phocagallery\views\category\tmpl\default_comments-kd.php <?php defined('_JEXEC') or die('Restricted access'); $item = $this->category; $item->text = $this->category->description; $item->catid = 1000; if($item->text == ''){ $item->text = 'No Discription'; } // // Process the content plugins. // JPluginHelper::importPlugin('content'); $dispatcher = JDispatcher::getInstance(); $results = $dispatcher->trigger('onContentPrepare', array ('com_phocagallery.category', &$item, &$this->params)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_phocagallery.category', &$item, &$this->params)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_phocagallery.category', &$item, &$this->params)); if(count($results) > 0){ // nothing went wrong echo $results[0]; }else{ // something went wrong } ?>

make sure it can be found
Code:
com_phocagallery\views\category\tmpl\default.php insert after ('comments-fb'); }else if($this->tmpl['externalcommentsystem'] == 3) { echo $this->loadTemplate('comments-kd');
Last edit: 14 years 3 months ago by E_Online.

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

Time to create page: 0.248 seconds