Port to 6.x

g.idema - April 18, 2008 - 11:22
Project:Block Term
Version:5.x-1.0
Component:Code
Category:task
Priority:normal
Assigned:g.idema
Status:needs review
Description

I just finished creating a Drupal 6.x port of the blockterm module.

Added functionality:

  • Added functionality to add taxonomy settings to newly created (custom) blocks without having to save them first
  • Added functionality to show the block also on pages containing a child term of the selected term. (Even better would be to make this optional using a depth variable)

Changed installation procedure

Instead of adding code to [yourtheme]_block($block) in template.php, you have to surround your block.tpl.php (or any other block template you use) with the following tags:

  <?php if (!$block->hidden): ?>
  <?php endif;?>

I'm not completely happy with this solution, but it's the best I can do. Please let me know if you found a way to change block visability from within module code.

For testing and deployment, I added a patch from blockterm-5.x-1.2 to blockterm-6.x-0.1.

AttachmentSize
blockterm-6.x-update.patch25.04 KB

#1

g.idema - April 21, 2008 - 19:10

Updated patch

Unfortunatly, the patch I posted before wasn't created from the most recent version and doesn't work properly.
Here's the good patch. Please don't use the previous one.

AttachmentSize
blockterm-6.x-0.2-update.patch 25.71 KB

#2

Janne - January 1, 2009 - 22:52

It seems this module will do just what I need. However, I'm no good with patches, so... Will there be a "proper" 6.x-version released anytime soon?

#3

Flying Drupalist - April 15, 2009 - 17:54

What's the status of this update?

#4

g.idema - April 21, 2009 - 08:22

The status hasn't change since I posted the Patch. Reason is, I don't have permissions to update this project and I haven't heard from the maintainer. Furthermore, I don't use the module myself anymore, as I'm using panels now to achieve my goals.
I'll have a look at it to see if I can somehow update the project. Otherwise, I will post a complete 6.x module in this message.

Gertjan Idema

#5

emdalton - July 2, 2009 - 18:12

I tried the patch and got a white screen when trying to configure a block with the module enabled. Any suggestions for troubleshooting?

#6

emdalton - July 2, 2009 - 18:55

Could you use this? (Are you already using it?)

http://drupal.org/node/155282
Add db rewriting to blocks query

I think this might get around having to edit block.tpl.php, though I'm not sure.

#7

emdalton - October 7, 2009 - 23:49

Ok, I got this working, but when I submit the block with the appropriate terms selected, I get returned to a white screen with the name of the block ($module .'-'. $delta) at the top in fixed-width text, and the URL shows that I'm still pointed at the .../admin/block/configure/... page. I can manually get back to the build/block page, but it's a nuisance, and I'd like to get this cleaned up before I let any of my users try it. Any suggestions?

#8

emdalton - October 7, 2009 - 23:53

Also, every block configured is showing up on the calendar page. I could exclude this with the "all except" function, but I'd rather not have to manually configure this for every block I want to display. More to the point, I don't think I can rely on my users to configure it correctly.

 
 

Drupal is a registered trademark of Dries Buytaert.