This module does not work for Drupal 6.

I've reviewed the code and this module does not work properly.

1. When you choose to set a node as block, it sets the status field in the blocks table to 0, it should be 1, a major problem, basically the block never appears !
2. When you choose to turn off the node as block it does not set the status field back to 0, so you basically can't undo creating the block.

If i had the time right now I'd help fix it but I need this working and have no budget left on this project.
Can you please fix it.

I've tried the other patches, and the beta version and nothing works.

CommentFileSizeAuthor
#1 nodeasblock-559458-1.patch1.16 KBcolincalnan

Comments

colincalnan’s picture

Assigned: Unassigned » colincalnan
Status: Active » Patch (to be ported)
StatusFileSize
new1.16 KB

I have created a patch that first sets the status to 1 so that it can apply that to the block when you first create the node in _nodeasblock_node_form(). This means that the block is visible when it's supposed to be.

Then I modified the update hook in nodeasblock_nodeapi(), so that if the user has chosen to disable the block, it is removed from the block table as it should be.

This patch is against 6.x-1.x-dev.

drupalninja99’s picture

It seems to me if you change the region value from -1 to '' it would work. The way normal blocks are disabled is that they have region = '', seems like we could just have a check if region = -1, then set region to ''