Newly Created Block doesn't show up under "Add Functionality"

Permalink
Hello everyone.

I'm quite new at developing with Concrete 5.

I was looking at this tutorial, which explains how to buiild a custom Block:
http://www.concrete5.org/documentation/developers/blocks/understand...

If I download the basic test block they offer for download, and upload it to my test site, I can see the block just fine under "Add Functionality."

If I try to create my own Block, by using exactly the same files as the example, only modifying a field and the database table (and the block name of course), the new Block doesn't show up on my test server.

For reference, these are my files:

The controller:
<?php
   class HalfWidthBlockController extends BlockController {
      var $pobj;
      protected $btDescription = "MyDescription";
      protected $btName = "Half Width Block";
      protected $btTable = 'btHalfWidthBlock';
      protected $btInterfaceWidth = "350";
      protected $btInterfaceHeight = "300";
   }
?>

The add.php:

<?php echo $form->label('h2', 'Title');?>
<?php echo $form->text('h2', array('style' => 'width: 320px'));?>


The db.xml:
<?xml version="1.0"?>
<schema version="0.3">
   <table name="btHalfWidthBlock">
      <field name="bID" type="I">
         <key />
         <unsigned />
      </field>
      <field name="h2" type="X2">
      </field>
   </table>
</schema>


Can anyone spot my error? I've been looking crazy for the problem, but haven't been able to find it yet.
If I need to post some more code, or w/e, don't hesitate to let me know.

Thanks a lot for your help!
So far, I'm really enjoying Concrete, but seem to be stuck right now.

 
boomgraphics replied on at Permalink Best Answer Reply
boomgraphics
Make sure your block folder name has underscores between the words. For this block your folder would need to be named 'half_width'. To make it so it would need to be named 'halfwidth' your controller class would need to be called HalfwidthBlockController (no uppercase 'W'). Hope it helps. :-)
BailHope replied on at Permalink Reply
Thank you so very much. It solved my problem.
My folder was named half_width_block. I've removed the "_block" part and now it works.