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.

Gallery Pastebin - Paste and link to it

Posted by talmdal Tue 24th Jun 2008 23:31

Description: This puts the debug output into a floating movable panel,
  1. -- on the <header> element in theme.tpl
  2.     <script>
  3.       var initParms = {ldelim}
  4.             isDebugging: {$theme.isDebug},
  5.             pageType: '{$theme.pageType}',
  6.             useFullScreen: {if $theme.useFullScreen}true{else}false{/if},
  7.             showSidebar: {if !empty($theme.params.sidebarBlocks)}true{else}false{/if}
  8.         {rdelim};
  9.     </script>
  10.  
  11. -- on the <body> element in theme.tpl
  12.    <body class="gallery" onload="init(initParms);">
  13.  
  14. -- bottom of the theme.tpl
  15.     {if !empty($theme.isDebug)}
  16.       <div id="debugDialog">
  17.         <div class="hd">Debug Output</div>
  18.         <div class="bd" id="showDebug">
  19.           <form>
  20.               {* Put any debugging output here, if debugging is enabled *}
  21.               {g->debug}
  22.           <form>
  23.         </div>
  24.         <div class="ft"></div>
  25.       </div>
  26.     {/if}
  27.  
  28. -- in each showXXXX() method in theme.inc
  29.         $debug = $gallery->getDebug();
  30.         $theme['isDebug'] = !empty($debug) ? 'true' : 'false';
  31.  
  32. -- javascript initialization
  33.         init: function(initParms) {
  34.             if (initParms.isDebugging) {
  35.                 var dialog = new YAHOO.widget.Dialog('debugDialog', {
  36.                     close: true,
  37.                     visible: true,
  38.                     x: 10, y:10,
  39.                     zindex: 5000,
  40.                     width: '500px',
  41.                     height: '400px'
  42.                 });
  43.                 dialog.render();
  44.                 dialog.show();
  45.             }
  46.         }
  47.  
  48. -- css
  49. #showDebug {
  50.   overflow: scroll;
  51.   height: 370px;
  52.   width: 492px;
  53.   text-align: left;
  54.   margin: 0;
  55.   font: .8em Verdana, Arial, sans-serif;
  56. }
  57.  

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)

Your Name
Syntax:
For (optional)
Leave permalink as note for user. Remember my name in a cookie

Select channel for announcement:
#gallery#gallery-support

Code: To ensure legibility, keep your code lines under 80 characters long.

You can highlight lines: start with "@#" and end with "!#"

Description: You can leave a small description for your code. (Errors, etc)

Please note that your script will be available publicly.
Page generated in 0.152 seconds.