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.

CommentFileSizeAuthor
#15 blockterm-6.x-0.5-update.patch10.12 KBnanobyt3
#15 blockterm-6.x-0.5-update.module.patch2.54 KBnanobyt3
#13 blockterm-6.x-0.4.tar_.gz9.4 KBbwinett
#12 blockterm-6.x-0.3.tar_.gz8.05 KBAnonymous (not verified)
#1 blockterm-6.x-0.2-update.patch25.71 KBAnonymous (not verified)
blockterm-6.x-update.patch25.04 KBAnonymous (not verified)

Comments

Anonymous’s picture

StatusFileSize
new25.71 KB

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.

janne’s picture

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?

Flying Drupalist’s picture

What's the status of this update?

Anonymous’s picture

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

emdalton’s picture

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

emdalton’s picture

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.

emdalton’s picture

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?

emdalton’s picture

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.

summit’s picture

Hi,
Will a D6 version be build shortly please?
Would be great to have a version build so specific D6 issues can be made.
greetings, Martijn

skizzo’s picture

subscribing

federico’s picture

subscribing

Anonymous’s picture

StatusFileSize
new8.05 KB

I took another look at the 6.x version of the module this week.
This resulted in a new version with the following changes:
- No more need to modify block.tpl.php, just copy block-ignore.tpl.php to your theme directory
- Some (debugging)code cleanup, which hopefully resolves the white screens (#5 and #7)
- Some code rewrite, to make sure the blocks don't appear on none-node pages (#8)
- @emdalton I had a quick look at using db_sql_rewrite. I think it might work and eliminate the need of the block-ignore.tpl.php file, but it will take some more time to implement and might have some unwanted side-effects.

As for creating an official release, I still don't have the rights to do that, but I'll try to obtain them. For now I'll attach a zipped version of the module to this comment. Please let me know what you think of it.

Gertjan

bwinett’s picture

StatusFileSize
new9.4 KB

Thanks g.idema - great module!

I enhanced it to include a permission used to specify which roles see and edit the taxonomy settings.

lolandese’s picture

In the meantime until there is a stable 6 version:
If you want to show content with the same taxonomy terms as the shown node in a block, using Views.
http://drupal.org/node/450786#comment-1542476

Just import the given code as a new View and Save.
Take care. The given solution only shows content:

  • with exactly the same taxonomy terms (AND = ,). To show all nodes that have at least one term in common you should use OR ( = +). 
  • of the same content type. If you want other content types, delete the Content Type field in the Arguments and use the regular Views Filter instead.
nanobyt3’s picture

Hi,
I have enhanced the 6.x-0.4 revision further to work without the need of a template file(block-ignore.tpl.php).
Another feature is a checkbox on block configuration form to enable functionality of block-by-term module. If this checkbox is not checked, the block behaves normally.

The patch(blockterm-6.x-0.5-update.patch) provided below, is for 5.x-1.x (GIT HEAD) revision.

The second patch(blockterm-6.x-0.5-update.module.patch) is for 6.x-0.4 revision