Categories theme v0.2.1 (Frame removal works correctly.)

This commit is contained in:
Michael D. Reiley 2011-09-22 15:07:25 -07:00
parent c210cdbfea
commit a59b915b0a
2 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@
'Group-ordered, category-aware modification of the Frameset theme, with removable sidebar frame. 'Group-ordered, category-aware modification of the Frameset theme, with removable sidebar frame.
Requires $config[\'boards\'] and $config[\'categories\'].'; Requires $config[\'boards\'] and $config[\'categories\'].';
$theme['version'] = 'v0.2'; $theme['version'] = 'v0.2.1';
// Theme configuration // Theme configuration
$theme['config'] = Array(); $theme['config'] = Array();

View File

@ -39,6 +39,11 @@
. 'iframe#main{border-left:1px solid black;left:15%;top:0;width:85%}' . 'iframe#main{border-left:1px solid black;left:15%;top:0;width:85%}'
. '</style>' . '</style>'
. '<title>' . $settings['title'] . '</title>' . '<title>' . $settings['title'] . '</title>'
. '<script type="text/javascript">'
. 'function removeFrames() {'
. 'window.location = document.getElementById("main").contentWindow.location.href'
. '}'
. '</script>'
. '</head><body>' . '</head><body>'
// Sidebar // Sidebar
. '<iframe src="sidebar.html" id="sidebar" name="sidebar"></iframe>' . '<iframe src="sidebar.html" id="sidebar" name="sidebar"></iframe>'
@ -109,16 +114,11 @@
. '</style>' . '</style>'
. '<base target="main" />' . '<base target="main" />'
. '<title>' . $settings['title'] . '</title>' . '<title>' . $settings['title'] . '</title>'
. '<script type="text/javascript">'
. 'function removeFrames() {'
. 'parent.window.location = "' . $config['root'] . 'news.html"'
. '}'
. '</script>'
. '</head><body>'; . '</head><body>';
$body .= '<fieldset><legend>' . $settings['title'] . '</legend><ul>' . $body .= '<fieldset><legend>' . $settings['title'] . '</legend><ul>' .
'<li><a class="system" href="news.html">[News]</a></li>' . '<li><a class="system" href="news.html">[News]</a></li>' .
'<li><a class="system" href="javascript:removeFrames()">[Remove Frames]</a></li>' . '<li><a class="system" href="javascript:parent.removeFrames()">[Remove Frames]</a></li>' .
'</ul></fieldset>'; '</ul></fieldset>';
for($cat = 0; $cat < count($config['categories']); $cat++) { for($cat = 0; $cat < count($config['categories']); $cat++) {