diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php index 22bc9c9ddb..bbdfea4792 100644 --- a/phpBB/adm/admin_styles.php +++ b/phpBB/adm/admin_styles.php @@ -103,6 +103,10 @@ switch ($mode) Style Name + + Style Copyright + + Template set: @@ -136,6 +140,8 @@ switch ($mode) break; } + + adm_page_header($user->lang['MANAGE_STYLE']); ?> @@ -145,11 +151,23 @@ switch ($mode)
"> - - + + + sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $style_count[$row['user_style']] = $row['style_count']; + } + $db->sql_freeresult($result); + $sql = 'SELECT style_id, style_name FROM ' . STYLES_TABLE; $result = $db->sql_query($sql); @@ -162,8 +180,9 @@ switch ($mode) ?> - - + + + - +
Style name Style nameUsed by 
"> ">Deactivate | ">Delete | ">Export | ">Preview "> ">Deactivate | ">Delete | ">Export | Preview 
 Create new style:
lang['MANAGE_IMAGESET']); ?> @@ -220,7 +240,7 @@ switch ($mode) ?> "> -  ">Deactivate | ">Delete | ">Export | ">Preview  +  ">Delete | ">Export  _tpl_include\(\'(.*?)\'\);#', - '#echo \$this->_tpldata\[\'\.\'\]\[0\]\[\'(.*?)\'\];#', - '#echo \(\(isset\(\$this\->_tpldata\[\'\.\'\]\[0\]\[\'(.*?)\'\]\)\).*?;#', - '#if \(.*?\[\'\.\'\]\[0\]\[\'(.*?)\'\]\) \{ #', - '#\$_(.*?)_count.*?;if \(.*?\)\{#', - '#\<\?php #', - '# \?\>#', - ); - - $replace_preg = array( - '', - '{$1}', - '{$1}', - '', - '', - '', - '' - ); - - */ - - // $tpldata = preg_replace($match_preg, $replace_preg, $tpldata); - preg_match_all('##', $tpldata, $included_tpls); $included_tpls = $included_tpls[1]; } @@ -694,13 +690,12 @@ switch ($mode) // Grab template data - if (!($fp = fopen($phpbb_root_path . 'styles/themes/' . $css_external, 'rb'))) + if (!($fp = fopen("{$phpbb_root_path}styles/themes/$theme_path/$theme_name.css", 'rb'))) { die("ERROR"); } - $stylesheet = fread($fp, filesize($phpbb_root_path . 'styles/themes/' . $css_external)); + $stylesheet = fread($fp, filesize("{$phpbb_root_path}styles/themes/$theme_path/$theme_name.css")); fclose($fp); -// $stylesheet = str_replace(array("\t", "\n"), " ", $stylesheet); // Pull out list of "custom" tags @@ -785,6 +780,8 @@ switch ($mode) fclose($fp); $error[] = $user->lang['THEME_UPDATED']; + + add_log('admin', 'LOG_EDIT_THEME', $theme_name); } @@ -1324,7 +1321,7 @@ function csspreview() echo sprintf('%s%s%s', "', $row['theme_name'], ''); ?> -  ">Regenerate | ">Delete | ">Export | ">Preview  +  ">Delete | ">Export | ">Preview