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

Solved Crypsis Template bugged?

More
8 years 10 months ago #11 by BamiGorengo
The template.php from my Kunena Template:
Code:
<?php /** * Kunena Component * * @package Kunena.Template.Blue_Eagle * * @copyright (C) 2008 - 2015 Kunena Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org **/ defined('_JEXEC') or die(); // Compile CSS from LESS files. $this->compileLess('style.less', 'kunena.css'); $this->addStyleSheet('kunena.css'); /** * Class KunenaTemplateDev_Mafuba */ class KunenaTemplateDev_Mafuba extends KunenaTemplate { // Try to find missing files from the following parent templates: protected $default = array('dev_mafuba'); protected $css_compile = false; protected $userClasses = array('kwho-', 'admin' => 'kwho-admin', 'globalmod' => 'kwho-globalmoderator', 'moderator' => 'kwho-moderator', 'user' => 'kwho-user', 'guest' => 'kwho-guest', 'banned' => 'kwho-banned', 'blocked' => 'kwho-blocked'); public $categoryIcons = array('kreadforum', 'kunreadforum'); /** * Icon Classes mapped * * @var array */ static protected $fileIcons = array('image' => array('png', 'jpg', 'gif', 'jpeg'), 'archive' => array('tar', 'zip', 'gz', 'tgz', 'bz2', 'rar', '7z'), 'txt' => array('txt', 'doc'), 'pdf' => array('pdf'),); public function initialize() { KunenaFactory::loadLanguage('com_kunena.tpl_blue_eagle'); // Enable legacy mode KunenaTemplateLegacy::load(); require_once JPATH_SITE . '/' . $this->getFile('initialize.php'); // $this->addStyleSheet ( 'css/kunena.20.css' ); // Dev-Mafubas compiled less file // $this->addStyleSheet('css/style.css'); // Toggler language strings JFactory::getDocument()->addScriptDeclaration('// <![CDATA[ var kunena_toggler_close = "' . JText::_('COM_KUNENA_TOGGLER_COLLAPSE', true) . '"; var kunena_toggler_open = "' . JText::_('COM_KUNENA_TOGGLER_EXPAND', true) . '"; // ]]>'); } public function getButton($link, $name, $scope, $type, $id = null) { $types = array('communication' => 'comm', 'user' => 'user', 'moderation' => 'mod', 'permanent' => 'mod'); $names = array('unsubscribe' => 'subscribe', 'unfavorite' => 'favorite', 'unsticky' => 'sticky', 'unlock' => 'lock', 'create' => 'newtopic', 'quickreply' => 'reply', 'quote' => 'quote', 'edit' => 'edit', 'permdelete' => 'delete', 'flat' => 'layout-flat', 'threaded' => 'layout-threaded', 'indented' => 'layout-indented', 'list' => 'reply'); $text = JText::_("COM_KUNENA_BUTTON_{$scope}_{$name}"); $title = JText::_("COM_KUNENA_BUTTON_{$scope}_{$name}_LONG"); if($title == "COM_KUNENA_BUTTON_{$scope}_{$name}_LONG"){ $title = ''; } if($id){ $id = 'id="' . $id . '"'; } if(isset($types[$type])){ $type = $types[$type]; } if($name == 'quickreply'){ $type .= ' kqreply'; } if(isset($names[$name])){ $name = $names[$name]; } return <<<HTML <a $id class="kicon-button kbutton{$type} btn-left" href="{$link}" rel="nofollow" title="{$title}"> <span class="{$name}"><span>{$text}</span></span> </a> HTML; } public function getIcon($name, $title = '') { return '<span class="kicon ' . $name . '" title="' . $title . '"></span>'; } public function getImage($image, $alt = '') { return '<img src="' . $this->getImagePath($image) . '" alt="' . $alt . '" />'; } /** * Extract the Link Uri (href) * * @param string $html * * @return bool */ static public function getOriginalUri($html = '') { $matches = array(); $pattern = '/href="(.*?)"/'; preg_match($pattern, $html, $matches); if(isset($matches[1])){ return $matches[1]; } return false; } /** * Helper to get an css Class for mapped file icons in template * * @param null $file * * @return string */ static public function getFileIconClass($file = null) { /** * Use in Css the following css Classes * * class="fileIcon-images" * class="fileIcon-archive" * class="fileIcon-txt" * class="fileIcon-pdf" * * if filetype not detected * class="fileIcon-default" * */ $prefix = 'fileicon-'; if($file){ $ext = pathinfo($file, PATHINFO_EXTENSION); foreach(self::$fileIcons as $type => $matchingExtensions){ if(in_array($ext, $matchingExtensions)){ return $prefix . '' . $type; } } } return $prefix . 'default'; } /** * Getting the Svg immage resource dir to include * * @param $file * * @return string */ static public function getFileIconSvg($file = null) { $icon = self::getFileIconClass($file); $ficonFile = dirname(__FILE__) . '/images/svg/' . $icon . '.svg'; if(file_exists($ficonFile)){ return $ficonFile; } $ficonFile = dirname(__FILE__) . '/images/svg/fileicon-default.svg'; if(file_exists($ficonFile)){ return $ficonFile; } return false; //throw new RuntimeException('missing default fileicon'); } }

The index.php of my Joomla Template:
Code:
<?php defined( '_JEXEC' ) or die; include_once JPATH_THEMES.'/'.$this->template.'/logic.php'; // LESS require_once(__DIR__ . '/less/lessc.inc.php'); $inputFile = __DIR__ . "/less/style.less"; $outputFile = __DIR__ . "/css/style.css"; $cacheFile = $inputFile . ".cache"; if (file_exists($cacheFile)) { $cache = unserialize(file_get_contents($cacheFile)); } else { $cache = $inputFile; } $less = new lessc; $newCache = $less->cachedCompile($cache); if (!is_array($cache) || $newCache["updated"] > $cache["updated"]) { file_put_contents($cacheFile, serialize($newCache)); file_put_contents($outputFile, $newCache['compiled']); } ?><!doctype html> <html lang="<?php echo $this->language; ?>"> <head> <jdoc:include type="head" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> <link rel="apple-touch-icon-precomposed" href="<?php echo $tpath; ?>/images/apple-touch-icon-57x57-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo $tpath; ?>/images/apple-touch-icon-72x72-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo $tpath; ?>/images/apple-touch-icon-114x114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo $tpath; ?>/images/apple-touch-icon-144x144-precomposed.png"> <!-- Google Fonts --> <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900' rel='stylesheet' type='text/css'> <!-- JavaScript --> <script type="text/javascript" src="<?php echo $tpath; ?>/js/menu.js"></script> <script type="text/javascript" src="https://getdpd.com/js/cart.js"></script> </head> <body class="<?php echo (($menu->getActive() == $menu->getDefault()) ? ('front') : ('site')).' '.$active->alias.' '.$pageclass; ?>"> <!-- Temlpate Divs --> <jdoc:include type="modules" name="debug" /> </body> </html>

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

More
8 years 10 months ago #12 by 810
Replied by 810 on topic Crypsis Template bugged?
you need to add it on public function initialize()

not on the top of the file
The following user(s) said Thank You: BamiGorengo

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

More
8 years 10 months ago - 8 years 10 months ago #13 by BamiGorengo
Ahh i understand...

but now i get this error:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in /www/htdocs/w21491v3/libraries/vendor/leafo/lessphp/lessc.inc.php on line 617

Last edit: 8 years 10 months ago by BamiGorengo.

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

More
8 years 10 months ago #14 by 810
Replied by 810 on topic Crypsis Template bugged?
try with protostar template.

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

More
8 years 10 months ago #15 by BamiGorengo
Still same Error =/

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

More
8 years 10 months ago #16 by 810
Replied by 810 on topic Crypsis Template bugged?
try this:

1) rename template Dev_Mafuba to mafuba
2) Change:
Code:
class KunenaTemplateDev_Mafuba extends KunenaTemplate
to
Code:
class KunenaTemplateMafuba extends KunenaTemplate
3) edit on template.xml
Change title to: mafuba

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

More
8 years 10 months ago #17 by BamiGorengo
Changed but still same.
I added you in skype.

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

More
8 years 10 months ago #18 by scenium
Replied by scenium on topic Crypsis Template bugged?
BamiGorengo, I see that you managed to solve the problem (your forum works). How I solved the problem? I, too, gives a 500 error template Crypsis.

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

More
8 years 10 months ago - 8 years 10 months ago #19 by hipnotyka
Replied by hipnotyka on topic Crypsis Template bugged?
Hello. The same problem. How to solve?
Thanks
Last edit: 8 years 10 months ago by hipnotyka.

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

More
8 years 10 months ago #20 by 810
Replied by 810 on topic Crypsis Template bugged?
enable kunena debug, and you see the line what's wrong

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

Time to create page: 0.472 seconds