Hey there,

I know I know, 7x is about to come out and 5x is about to be deemed old school, but I was curious if there is anyway this module might be able to be ported back to 5x. We have a client project that could benefit greatly from this module. If there is no possibility or interest in this being checked out, we may go about trying to port it back (granted its technically possible) if that is OK.

Thanks,
Kevin

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JohnAlbin’s picture

Title: Port to 5x? » Port to 5.x
Version: 6.x-1.x-dev » 5.x-1.x-dev
Category: feature » task
Status: Active » Needs review

Unfortunately, 404 Blocks uses D6's preprocess functions which allow modules to alter the variables in template files. D5 did not have any mechanism for allowing modules to alter template variables. :-(

So, you would be required to modify your theme in order to get the proper modifications. Page Title 5.x and Advanced Forum are examples of modules that require you to modify your theme for functionality. I've made some rough installation instructions in the README file.

I've spent about 45 minutes doing a quick backport. But its completely untested. So please test it. http://drupal.org/node/570706

vishun’s picture

JohnAlbin, ah yeah i had a feeling there was a decent reason that it wasnt available. theme modification for 5x is totally fine, i understand that for some it may be unacceptable but if thats the case for those handful of people, then they dont really need it that bad to begin with ;)

thank you -so- much. It is much appreciated, and we will make sure to test it and give any feedback or modification suggestions based on our findings.

JohnAlbin’s picture

Status: Needs review » Fixed

Well, I guess this wasn't needed then. :-\

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mikebell_’s picture

Status: Closed (fixed) » Needs review
FileSize
568 bytes
952 bytes

Thanks for the initial port, I took a look at it today and created the two attached patches to make it functional.

This is very rough but works, tested using drupal 5.20 and Zen theme.

module_load_include is not available for 5 so replaced by require_once, this probably needs additional checking around for sanity sake.

I also iterated through any regions defined in the theme to make sure that all regions are being built up. I noticed that in $vars left and right sidebar are prepended with sidebar_ not sure if this is a Zen theme thing or core.

These patches are provided as is. I'll do more testing on our dev site tomorrow morning and add any additional patches for changes I make. Feedback would be great.

mikebell_’s picture

FileSize
627 bytes

I checked a default install of Drupal 5 and the sidebar_ is there as well, odd but I guess my fix will work.

I've attached a new patch for the module file which includes some of the checking from module_load_include taken from the Drupal 6 api.

blocks404_reset_body_classes() doesn't seem to be working correctly so I'll look into that next.