diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php index 69fc9a2076..c51fffea88 100644 --- a/phpBB/adm/admin_styles.php +++ b/phpBB/adm/admin_styles.php @@ -590,6 +590,8 @@ switch ($mode) 'login' => array( 'login_body.html', 'login_forum.html', ), + 'bbcode' => array( + 'b', 'u', 'i', 'color', 'size', 'flash', 'img', 'url', 'email', 'code', 'quote', 'quote_username', 'listitem', 'olist', 'ulist'), 'custom' => array(), ); @@ -597,7 +599,6 @@ switch ($mode) switch ($action) { case 'cache': - $sql = 'SELECT * FROM ' . STYLES_TPL_TABLE . " WHERE template_id = $template_id"; @@ -633,6 +634,87 @@ switch ($mode) trigger_error($user->lang['TEMPLATE_CACHE_CLEARED']); } + if (!empty($_GET['source']) && file_exists($phpbb_root_path . 'cache/' . $cache_prefix . '_' . $_GET['source'] . '.html.' . $phpEx)) + { + adm_page_header($user->lang['TEMPLATE_CACHE']); + +?> + +

+ +', '', '','[', ']', '.'); + $str_to = array('<?php '; + $str_to[] = ''; + $str_from[] = '<?php '; + $str_to[] = ''; + $str_from[] = '?>'; + $str_to[] = ''; + } + + $code = str_replace($str_from, $str_to, $code); + $code = preg_replace('#^()\n?(.*?)\n?()$#is', '\1\2\3', $code); + $code = explode("$marker", $code); + +?> + + + $line) + { + +?> + + + + + +
  $j) + { + $indent = substr($indent, 0, -6); + $j++; + } + unset($code[$key]); + +?>
+ +
+ + @@ -688,7 +777,7 @@ function marklist(match, status) ?> - + " onclick="viewsource('');return false"> format_date($times_ary['cache']); ?> format_date($times_ary['src']); ?> diff --git a/phpBB/adm/subSilver.css b/phpBB/adm/subSilver.css index f1d8d23537..775c32d98f 100644 --- a/phpBB/adm/subSilver.css +++ b/phpBB/adm/subSilver.css @@ -53,6 +53,13 @@ h2 { color: #006699; } +.syntaxbg { color: #FFFFFF; } +.syntaxcomment { color: #FF8000; } +.syntaxdefault { color: #0000BB; } +.syntaxhtml { color: #000000; } +.syntaxkeyword { color: #007700; } +.syntaxstring { color: #DD0000; } + /* Anchors */ @@ -146,6 +153,20 @@ td.cat { background-color: #D1D7DC; } +.sourcenum { + color: gray; + font-family: 'Courier New', monospace; + font-size: 9pt; + font-weight: bold; + line-height: 160%; +} +.source { + font-family: 'Courier New', monospace; + font-size: 9pt; + line-height: 160%; +} + + /* Misc */