×
Kunena 5.2.5 and Blue eagle 1.6.5 released (30 May 2021)

The Kunena team has announce the arrival of Kunena 5.2.5 [K 5.2.5] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.2 and issues discovered during the development stages of K 5.2.5

REQUIREMENTS
Blue Eagle 1.6.x requires Kunena 5.2.x to work with, this template isn't designed to works with Bootstrap 3 and Bootstrap 4.

Question Neues Template auf BlueEagle Basis verwendet css aus blue_eagle folder

More
6 years 2 months ago #1 by BamiGorengo
Hey,

Ich habe mir vorgenommen für meine Webseite ein neues Template zu erstellen und habe dafür das Blue Eagle Template Kopiert und umbenannt. In der template.xml habe ich das Template natürlich auch umbenannt.

Ich habe an allen stellen im Template nach dem begriff blue_eagle gesucht und diese ersetzt mit dem neuen Template Namen...

Trotzdem verwendet er immer noch die CSS files aus dem blue_eagle Ordner...
Woran liegt das?

Mir ist klar das wenn ich in der initialize.php den Part mit den css Files raus lösche sich das Problem erledigt hat... Mir geht es jedoch darum zu VERSTEHEN wieso das Template Files aus dem alten Template Läd?

template.php
<?php
/**
* Kunena Component
* @package Kunena.Template.Blue_Eagle
*
* @copyright (C) 2008 - 2015 Kunena Team. All rights reserved.
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link https://www.kunena.org
**/
defined( '_JEXEC' ) or die();
 
// LESS COMPILER
require_once(__DIR__.'/less/lessc.inc.php');
$less = new lessc;
$less->checkedCompile(__DIR__."/less/style.less", __DIR__."/css/output.css");
 
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');
 
	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' );
 
		// 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.'" />';
	}
}

initialize.php
<?php
/**
* Kunena Component
* @package Kunena.Template.Blue_Eagle
*
* @copyright (C) 2008 - 2015 Kunena Team. All rights reserved.
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link https://www.kunena.org
**/
defined( '_JEXEC' ) or die();
 
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$template = KunenaFactory::getTemplate();
 
// Template requires Mootools 1.2 framework
$template->loadMootools();
 
// We load mediaxboxadvanced library only if configuration setting allow it
//if ( KunenaFactory::getConfig()->lightbox == 1 ) {
//	$template->addStyleSheet ( 'css/mediaboxAdv.css');
//	$template->addScript( 'js/mediaboxAdv.js' );
//}
 
// New Kunena JS for default template
$template->addScript ( 'js/default.js' );
 
$rtl = JFactory::getLanguage()->isRTL();
$skinner = $template->params->get('enableSkinner', 0);
 
if (file_exists ( JPATH_ROOT . "/templates/{$app->getTemplate()}/css/kunena.forum.css" )) {
	// Load css from Joomla template
	CKunenaTools::addStyleSheet ( JUri::root(true). "/templates/{$app->getTemplate()}/css/kunena.forum.css" );
	if ($skinner && file_exists ( JPATH_ROOT. "/templates/{$app->getTemplate()}/css/kunena.skinner.css" )){
		CKunenaTools::addStyleSheet ( JUri::root(true). "/templates/{$app->getTemplate()}/css/kunena.skinner.css" );
	} elseif (!$skinner && file_exists ( JPATH_ROOT. "/templates/{$app->getTemplate()}/css/kunena.default.css" )) {
		CKunenaTools::addStyleSheet ( JUri::root(true). "/templates/{$app->getTemplate()}/css/kunena.default.css" );
	}
} else {
	$loadResponsiveCSS = $template->params->get('loadResponsiveCSS', 1);
	// Load css from default template
	$template->addStyleSheet ( 'css/kunena.forum.css' );
	if ($loadResponsiveCSS) $template->addStyleSheet ( 'css/kunena.responsive.css' );
	if ($skinner) {
		$template->addStyleSheet ( 'css/kunena.skinner.css' );
	} else {
		$template->addStyleSheet ( 'css/kunena.default.css' );
	}
}
$cssurl = JUri::root(true) . '/components/com_kunena/template/dev_mafuba/css';
?>
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php echo $cssurl; ?>/kunena.forum.ie7.css" type="text/css" />
<![endif]-->
<?php
$mediaurl = JUri::root(true) . "/components/com_kunena/template/{$template->name}/media";
 
$styles = <<<EOF
	/* Kunena Custom CSS */
EOF;
 
$forumHeader = $template->params->get('forumHeadercolor', $skinner ? '' : '#5388B4');
 
if ($forumHeader) {
	$styles .= <<<EOF
 
	#Kunena div.kblock > div.kheader,#Kunena .kblock div.kheader { background: {$forumHeader} !important; }
	#Kunena #ktop { border-color: {$forumHeader}; }
	#Kunena #ktop span.ktoggler { background: {$forumHeader}; }
	#Kunena #ktab a:hover,
	#Kunena #ktab li.Kunena-item-active a	{ background-color: {$forumHeader}; }
	#Kunena #ktab ul.menu li.active a { background-color: {$forumHeader}; }
	#Kunena a:link,
	#Kunena a:visited,
	#Kunena a:active {color: {$forumHeader};}
	#Kunena a:focus {outline: none;}
	#Kunena a:hover {color: #FF0000;}
EOF;
}
 
$forumLink = $template->params->get('forumLinkcolor', $skinner ? '' : '#5388B4');
 
if ($forumLink) {
	$styles .= <<<EOF
	#Kunena a:link,
	#Kunena a:visited,
	#Kunena a:active {color: {$forumLink};}
	#Kunena a:focus {outline: none;}
EOF;
}
 
$announcementHeader = $template->params->get('announcementHeadercolor', $skinner ? '' : '#5388B4');
 
if ($announcementHeader) {
	$styles .= <<<EOF
	#Kunena div.kannouncement div.kheader { background: {$announcementHeader} !important; }
EOF;
}
 
$announcementBox = $template->params->get('announcementBoxbgcolor', $skinner ? '' : '#FFFFFF');
 
if ($announcementBox) {
	$styles .= <<<EOF
	#Kunena div#kannouncement .kanndesc { background: {$announcementBox}; }
EOF;
}
 
$frontStatsHeader = $template->params->get('frontstatsHeadercolor', $skinner ? '' : '#5388B4');
 
if ($frontStatsHeader) {
	$styles .= <<<EOF
	#Kunena div.kfrontstats div.kheader { background: {$frontStatsHeader} !important; }
EOF;
}
 
$onlineHeader = $template->params->get('whoisonlineHeadercolor', $skinner ? '' : '#5388B4');
 
if ($onlineHeader) {
	$styles .= <<<EOF
	#Kunena div.kwhoisonline div.kheader { background: {$onlineHeader} !important; }
EOF;
}
 
$inactiveTab = $template->params->get('inactiveTabcolor', $skinner ? '' : '#737373');
 
if ($inactiveTab) {
	$styles .= <<<EOF
	#Kunena #ktab a { background-color: {$inactiveTab} !important; }
EOF;
}
 
$activeTab = $template->params->get('activeTabcolor', $skinner ? '' : '#5388B4');
 
if ($activeTab) {
	$styles .= <<<EOF
	#Kunena #ktab ul.menu li.active a,#Kunena #ktab li#current.selected a { background-color: {$activeTab} !important; }
EOF;
}
 
$hoverTab = $template->params->get('hoverTabcolor', $skinner ? '' : '#5388B4');
 
if ($hoverTab) {
	$styles .= <<<EOF
	#Kunena #ktab a:hover { background-color: {$hoverTab} !important; }
EOF;
}
 
$topBorder = $template->params->get('topBordercolor', $skinner ? '' : '#5388B4');
 
if ($topBorder) {
	$styles .= <<<EOF
	#Kunena #ktop { border-color: {$topBorder} !important; }
EOF;
}
 
$inactiveFont = $template->params->get('inactiveFontcolor', $skinner ? '' : '#FFFFFF');
 
if ($inactiveFont) {
	$styles .= <<<EOF
	#Kunena #ktab a span { color: {$inactiveFont} !important; }
EOF;
}
$activeFont = $template->params->get('activeFontcolor', $skinner ? '' : '#FFFFFF');
 
if ($activeFont) {
	$styles .= <<<EOF
	#Kunena #ktab #current a span { color: {$activeFont} !important; }
EOF;
}
 
$toggleButton = $template->params->get('toggleButtoncolor', $skinner ? '' : '#5388B4');
 
if ($toggleButton) {
	$styles .= <<<EOF
	#Kunena #ktop span.ktoggler { background-color: {$toggleButton} !important; }
EOF;
}
 
$profileIcons = $template->getFile("media/iconsets/profile/{$template->params->get('profileIconset', 'default')}/default.png", true);
$buttonIcons = $template->getFile("media/iconsets/buttons/{$template->params->get('buttonIconset', 'default')}/default.png", true);
$editorIcons = $template->getFile("media/iconsets/editor/{$template->params->get('editorIconset', 'default')}/default.png", true);
 
$styles .= <<<EOF
	#Kunena .kicon-profile { background-image: url("{$profileIcons}"); }
	#Kunena .kicon-button { background-image: url("{$buttonIcons}") !important; }
	#Kunena #kbbcode-toolbar li a,#Kunena #kattachments a { background-image:url("{$editorIcons}"); }
	/* End of Kunena Custom CSS */
EOF;
 
$document->addStyleDeclaration($styles);

Ich bin mir sicher das dieses Problem noch haufenweise andere Leute haben.

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.086 seconds