- die aktuelle installierte phpBB Version
- die aktuelle Version des Styles
Es müsste vom System bei Installation eines Styles die Angabe in der Style.cfg
Code: Alles auswählen
#
# phpBB Style Configuration File
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
# At the left is the name, please do not change this
# At the right the value is entered
#
# Values get trimmed, if you want to add a space in front or at the end of
# the value, then enclose the value with single or double quotes.
# Single and double quotes do not need to be escaped.
#
#
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
style_version = 3.1.1
phpbb_version = 3.1.1
# Defining a different template bitfield
# template_bitfield = lNg=
# Parent style
# Set value to empty or to this style's name if this style does not have a parent style
parent = prosilver
phpbb_version = 3.1.1
mit der installierten phpBB Version Version des Boards: 3.1.1
übereinstimmt. Wenn das nicht der Fall ist, müsste dann eine Warnmeldung erfolgen das der Style nicht kompatibel ist mit der installierten phpBB Version. Somit würde es dann nicht mehr möglich sein Styles aus älteren phpBB Versionen, die nicht auf die neue phpBB Version aktualisiert ist, zu installieren.Es müsste doch möglich sein hier, root/includes/acp/acp_styles ab Zeile 1042, diese Abfrage einzufügen:
Code: Alles auswählen
/**
* Sort styles
*/
public function sort_styles($style1, $style2)
{
if ($style1['style_active'] != $style2['style_active'])
{
return ($style1['style_active']) ? -1 : 1;
}
if (isset($style1['_available']) && $style1['_available'] != $style2['_available'])
{
return ($style1['_available']) ? -1 : 1;
}
return strcasecmp(isset($style1['style_name']) ? $style1['style_name'] : $style1['name'], isset($style2['style_name']) ? $style2['style_name'] : $style2['name']);
}
/**
* Read style configuration file
*
* @param string $dir style directory
* @return array|bool Style data, false on error
*/
protected function read_style_cfg($dir)
{
static $required = array('name', 'phpbb_version', 'copyright');
$cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg');
// Check if it is a valid file
foreach ($required as $key)
{
if (!isset($cfg[$key]))
{
return false;
}
}
// Check data
if (!isset($cfg['parent']) || !is_string($cfg['parent']) || $cfg['parent'] == $cfg['name'])
{
$cfg['parent'] = '';
}
if (!isset($cfg['template_bitfield']))
{
$cfg['template_bitfield'] = $this->default_bitfield();
}
return $cfg;
}
Code: Alles auswählen
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
author = Styleauthor_xxx
style_version = 3.1.1
phpbb_version = 3.1.1
# Defining a different template bitfield
# template_bitfield = lNg=
# Parent style
# Set value to empty or to this style's name if this style does not have a parent style
parent = prosilver
[ externes Bild ]
ACP Styles Details
[ externes Bild ]