This site is developed to XHTML and CSS2 W3C standards.
If you see this paragraph, your browser does not support those standards and you
need to upgrade. Visit WaSP
for a variety of options.
Posted by talmdal Tue 24th Jun 2008 23:31
Description: This puts the debug output into a floating movable panel,
|
-- on the <header> element in theme.tpl
<script>
var initParms = {ldelim}
isDebugging: {$theme.isDebug},
pageType: '{$theme.pageType}',
useFullScreen: {if $theme.useFullScreen}true{else}false{/if},
showSidebar: {if ! empty($theme.params.sidebarBlocks )}true{else}false{/ if}
{rdelim};
</script>
-- on the <body> element in theme.tpl
<body class="gallery" onload="init(initParms);">
-- bottom of the theme.tpl
{if ! empty($theme.isDebug )}
<div id="debugDialog">
<div class="hd">Debug Output</div>
<div class="bd" id="showDebug">
<form>
{* Put any debugging output here, if debugging is enabled *}
{g->debug}
<form>
</div>
<div class="ft"></div>
</div>
{/if}
-- in each showXXXX () method in theme.inc
$debug = $gallery->getDebug();
$theme['isDebug'] = ! empty($debug) ? 'true' : 'false';
-- javascript initialization
init: function(initParms) {
if (initParms.isDebugging) {
var dialog = new YAHOO.widget.Dialog('debugDialog', {
close: true,
visible: true,
x: 10, y:10,
zindex: 5000,
width: '500px',
height: '400px'
});
dialog.render();
dialog.show();
}
}
-- css
#showDebug {
overflow: scroll;
height: 370px;
width: 492px;
text-align: left;
margin: 0;
font: .8em Verdana, Arial, sans-serif;
}
|
PermaLink to this entry http://tools.gallery2.org/pastebin/2003
Download 2003.txt
Submit a correction or amendment below. (click here to make a fresh posting)
Page generated in 0.152 seconds.