[racktables-users] Re: URLs for objects?

Hi there,


on 2009-07-21 at 12:09:47 CEST, Denis Ovsienko wrote:
> Local addons are best kept in inc/local.php file. For example, you
> could do the above with the following template:
> 
> <?php
> 
> $tab['object']['mytab'] = 'special management';
> $tabhandler['object']['mytab'] = 'localfunc_ManagementTab';
> 
> function localfunc_ManagementTab()
> {
> // do something
> }
> 
> ?>
> 
> You can even make the custom tab show and hide depending on special
> conditions (see triggers). After you make sure, that all added work ends
> up in one file, upgrades will become much more trivial.

I found this hint helpful for my needs and just tried it out, but I've hit
a (possible) bug, which should be mentioned, but is not essential, but not
always obvious.

When having whitespace in local.php outside the php start/stop tags, the
render_image.php also generates this whitespace, which renders the
resulting PNG graphics broken.

E.g. if you put this in your local.php:

---------------------------- start here ---------------------------------
<?
echo "blah";
?>
---------------------------- stop here ----------------------------------

it works, but

---------------------------- start here ---------------------------------
<?
echo "blah";
?>

---------------------------- stop here ----------------------------------

doesn't :-)




 
Le deagh dhùraghd,

        Frank Altpeter

-- 
FA-RIPE || http://www.altpeter.de/
Viva la evolution
|     You're gonna have to answer to the Coca-Cola company.
|         -- Colonel "Bat" Guano, "Dr. Strangelove or: How I Learned to
|            Stop Worrying and Love the Bomb"

Other related posts: