Hello everyone,
I had a project that required this block to be region-specific rather than apply to the entire page. I have done some significant revisions to the module and rolled them up as a patch.
With this patch, you will need to re-save your settings on the Floating Block configuration page, but you will now have the added bonus of being able to specify a container DIV that everything will float within. When the block reaches the bottom of the DIV, it will stop moving.
To put a block into a div, use this format:
#block-block-1|#main
... assuming that you want Drupal's first block to float within a container in your theme called #main. I've noted that this module seems to prefer working with ID tags (#) more than classes (.) for you noobs out there, this tip might come in handy.
This development was sponsored by TP1 Drupal development in Montréal.
I have also included an install file (which did not get into the patch - git weirdness) so if you are the author of this module I recommend adding it! If you are a site builder applying the above patch, just ignore it. The install file will prompt site builders to re-save their settings to gain the new functionality. If you're reading this you've already been warned!
| Comment | File | Size | Author |
|---|---|---|---|
| floating_block.install.txt | 276 bytes | Anonymous (not verified) | |
| floating_block-11.patch | 6.72 KB | Anonymous (not verified) |
Comments
Comment #1
sibany commentedgreat work Ryan Weal! :D
Testing....
Sincerely yours ,
M.sibany
Comment #2
sibany commentedHey, Ryan Weal!
i did the patch
i follow the instructions..
i got error
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/........../public_html/sites/default/modules/floating_block/floating_block.module on line 43ok what am doing wrong!!
i looked in the module file on line 43
and i looked on the old file module
was missing i past it and no error... but still no floating block
idid add #block-ad-12|#main and saved
in blocks i saved the block
run a cron
flashed all catch
heres the code files
the floating_block.js file
and here the floating_block.module..
what am i missing!?
Sincerely your,
M.sibany
Comment #3
Anonymous (not verified) commentedThe patch was for the 7.x branch (from git, which seems newer than the 7.x-dev branch), so I'm not certain it will work in D6. I do not have any D6 sites I can test this on at my office. If I have time on the weekend I will see what happens when it is used in D6... it is probably something minor but it can sometimes be hard to debug this stuff. Sorry in advance if I do not have time to review, I do not do much D6 work anymore.
Comment #4
alexpottHi Ryan,
Thanks for your excellent work. Your interest and others has prompted me to re-visit this module and include the functionality you've added. See http://drupalcode.org/project/floating_block.git/commit/c817344
The upgrade from your patch to the new dev version will require you to re-configure floating blocks as I've made some significant changes to the how this module is configured.
The way to configure a floating block to be contained is now:
#block-block-1|container=#mainThis format allows for (a) nicer javascript (b) additional settings - i've already added padding_top and padding_bottom eg.
#block-block-1|container=#main,padding_top=5,padding_bottom=10The latest dev version of the module showing the new container functionality is demoed here: http://dev.vit-al.co.uk/floating_block7/
Once I have test this in various versions of IE I'll release it. Any feedback would be gratefully received - tentatively setting to fixed.
Comment #6
jitumiet commentedCan any one tell me the steps how to apply this patch for floating block module. In which file I have to change code.
I am using http://ftp.drupal.org/files/projects/floating_block-7.x-1.2.tar.gz