New block not installing properly

Permalink
I'm running into some problems with custom made blocks. I've downloaded the basic_test block and installed it without any problems. It installs it and moves it from "new" to "currently installed" list.

Now to try my own custom block I've done the following:

1) Uninstall the "basic_test" block.

2) Renamed the "basic_test" folder to "publisher" (my custom block name)

2) Edited /publisher/controller.php to the following code

<?php
   class PublisherBlockController extends BlockController {
      var $pobj;
      protected $btDescription = "Publisher block test";
      protected $btName = "Publisher";
      protected $btInterfaceWidth = "350";
      protected $btInterfaceHeight = "300";   
   }
?>


3) removed the tablename and db.xml for testing purposes

Now it shows up in the "New" list. But when I install it, it says "Block Type Installed." yet it isn't installed and remains in the "New" list. No error messages whatsoever. I've tried setting the PHP error_reporting level to E_ALL, but still nothing.

Any ideas?

 
Nitrev replied on at Permalink Reply
so apparently you always need a db.xml with a table config? Because that is the only way I can get this going.
Nitrev replied on at Permalink Reply
I've managed to bypass it by instead of defining a table in the db.xml file, I just added a dummy query.

Still, the manual part which describes creating custom block isn't quite clear on whether or not a db.xml is required, so a little feedback from the dev's on this matter would be welcome (when you wake up that is, damn timezones!).
McPadawan replied on at Permalink Reply
McPadawan
Experiencing the same problem, only I don't know the syntax to place a dummy query in the db.xml. Can you post what you got to work? Thanks in advance
Mnkras replied on at Permalink Reply
Mnkras
for blocks you NEED a db.xml, it only has to be like this though:

http://pastie.org/1148932

change btBlockName to bt then the blocks name