block refresh for 6.x

onkiro - May 7, 2008 - 13:15
Project:Block Refresh
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:aaron
Status:active
Description

Hi there,

i would really love to see this module working for version 6.x.
if í could help i would but i worry i do not have the necessary know how in coding such things.

thanks though

onk

#1

rapsli - May 27, 2008 - 11:55

yeah, would be a nice module...

#2

aaron - May 28, 2008 - 03:05
Assigned to:Anonymous» aaron

i'll do this after i'm done writing this module

#3

onkiro - May 29, 2008 - 14:27

sounds great.....thank you....

#4

aaron - June 2, 2008 - 11:59

fyi, it'll also be after the update of embedded media field, which itself will be another week or two.

#5

Dubs - June 6, 2008 - 16:02

Aaeon - great - looking forward to this module!

#6

yngens - August 11, 2008 - 11:13

subscribe

#7

ramper - September 5, 2008 - 23:40

Me too waiting - thanks in advance.

#8

basicmagic.net - September 29, 2008 - 14:28

subscribe

#9

guldi - October 3, 2008 - 13:32

subscribe :) thx!

#10

Babalu - October 3, 2008 - 13:33

subscribing

#11

miahawk - October 7, 2008 - 16:33

I would also love to see this for 6.x.

I'm using ACL which makes block caching inactive, but none of my blocks will refresh unless I manually clear the cache which is a huge pain.

#12

Flying Drupalist - November 5, 2008 - 16:10

subscribe

#13

dunkelfuerst - February 17, 2009 - 01:31

Last night i rewrote some Code of this, so it works with Drupal 6.x. But i_ll give no guarantee.
An example is seen on
http://www.hazzardeur.de/

On the left side there's a random Number, refreshed every 15 Seconds. U can refresh it manually too.

This isn_t really a patch, just replace the old code by the new one.

edit: Please use the Attachment of #17.

AttachmentSize
block_refresh.tar_.gz 11.46 KB

#14

youkho - February 16, 2009 - 04:30

dunkelfuerst i just downloaded your module but it says that it's not compatible is there another way to install it ?

#15

dunkelfuerst - February 17, 2009 - 01:31

Sry, i forgot to change the .info-file.

Simply edit the .info-file and change the version to 6 or download the updated package:

edit: Please use the Attachment of #17.

AttachmentSize
block_refresh.tar_.gz 11.46 KB

#16

youkho - February 16, 2009 - 15:16

Same thing i'm i missing something?

Block Refresh 6.x-1.x-dev Allows blocks to automatically refresh their content.
This version is incompatible with the 6.9 version of Drupal core.

#17

dunkelfuerst - February 16, 2009 - 17:08

sry, i forgot a line

now it should work

sry for the inconvenience

AttachmentSize
block_refresh.tar_.gz 11.46 KB

#18

youkho - February 17, 2009 - 00:54

I've enabled the module configured it and tried to make a view block auto refreshable but nothing happened then i switched to manual refresh the icon appears but nothing change (i'm testing locally) i saw it on your website it's working pretty well. We need someone to test it maybe there's something wrong on my local server.

#19

paganwinter - February 21, 2009 - 07:36

Just tried it out.
Doesn't seem to work as expected.

I am using the Flag module to add/remove content from my favorites. I am also using a views block to display current users favorites.
I tried the manual refresh option and it didn't work.

#20

dunkelfuerst - February 21, 2009 - 14:31

Seems to be a Problem with Views-Blocks. I'll try to fix it later this day/tomorrow.

#21

youkho - February 21, 2009 - 14:39

can't wait for it :p thanks dunkelfuerst

#22

dunkelfuerst - February 22, 2009 - 00:50

Okay, i did a quick-n-dirty, but at least, it should work now with views-blocks, too.
I hope i didn't forget a line again. ;)

AttachmentSize
block_refresh_6.tar_.gz 11.51 KB

#23

paganwinter - February 23, 2009 - 06:49

It now works :)
Thanks a lot for the quick fix...

What I am trying to now do is integrate this with the Flag module so that whenever a user adds or removes a flag, it gets reflected in a view block on the same page as the node being flagged/unflagged.

The Flag module gives a handle to call a JS function whenever a flag is set/unset. I plan to do something like this:

When a user sets/unsets a flag, call Block Refresh's block_refresh_manual(div) function. But I am unsure what is the best way to pass the div argument.
Where is the block_refresh_add_button() function being called? Or what div do I have to pass to the block_refresh_manual(div) function?

#24

dunkelfuerst - February 23, 2009 - 15:07

Look into the sourcecode of your site, where you can see the refreshing block. There'll be something like

$(document).ready(function() {
  _block_refresh_data['#block-block-1 .content'] = new block_refresh_data(30000, '/block_refresh/block/1');
  block_refresh_timer('#block-block-1 .content');  block_refresh_add_button('block-block-1', '/block_refresh/block/1', '#block-block-1 .content');
})

'#block-block-1 .content' is the div your are searching for. (it will have a different name)

So, i if you want to refresh the block by yourself(or by the flag-module) simply call

block_refresh('#block-block-1 .content');

, but with the name, which is given in your source. But make sure, that this is called AFTER the $(document).ready() has been called, otherwise it will not work.

#25

paganwinter - February 24, 2009 - 07:29

dunkelfuerst
Thanks, I got it working by calling this:

block_refresh_manual('block-views-<my-view-name>-block_1');

#26

dropchew - April 24, 2009 - 02:54

Does it works with eg,

<?php
$block
= module_invoke(views, 'block', 'view', 'block_1');
print
$block['content'];
?>

? If not, Anyway to get it working with it? Thanks

#27

erdubya - April 25, 2009 - 19:38

For some reason it's not working for me in 6.10

To test I created a custom block to display a random number in php...

I expected it to flash a different number in the block every 5 seconds but it does nothing.

The code is

<?php

echo rand(5, 15);
?>

I changed all my roles to access block refresh content but it doesnt refresh.

In fact in MSIE I get an error:

Line: 28
Char: 3
Error: '_block_refresh_data' is undefined
Code:0
URL: http://projectvibe.net/home

EDIT:
It works... I used the inner archive from the tar-gz file and it works instead of the outer one. Thanks!

#28

arbel - May 3, 2009 - 16:24

Has anyone been able to use block refresh and exposed filters together? have user defined filter that will refresh and keep the filter.

for me, every time it refreshes the filters are lost.

Idan

#29

erdubya - May 4, 2009 - 00:12

I'm having trouble with getting the block refresh module to refresh a node.

I created a custom node that reads the xml file http://projectvibe.net/drupal_bridge/nowPlaying.xml. This xml file is updated every song change (usually takes 3-5 minutes for a new song to play).

My nowplaying block displays the information as a node on http://projectvibe.net/home/ (nowplaying block).

I have the nowplaying block to refresh every 10 seconds via the block refresh module. Theoretically it should read the xml file and display the updated info but block refresh just re-displays the old (cached) node. If you hit [F5] on the browser, it reads the xml file and displays the node/block properly.

Is there a way this module can be adjusted to read a fresh copy of the node (or any content) that's in the refreshing block instead of reading a cached copy?

Thanks,

Elliott

#30

dunkelfuerst - May 4, 2009 - 06:16

@arbel:

Do you have a site, where i can test it? Seems that you need a module for saving the exposed filter(http://drupal.org/project/views_savefilter), but there's no D6.x -version. But maybe i'm just missing some info here. ;)

@erdubya:
How is your block provided? Do you use direct php or is the block produced by a module? In the latter case, maybe following comment is helpful:
http://drupal.org/node/309394#comment-1138899

#31

arbel - May 4, 2009 - 12:29

Hi,

Thanks for the help, I think the module is great.

Here's the link:

http://69.50.199.29/

you can use the exposed filter to change the node type and see that once it's refreshed it resets the filters.

on the exposed filter the setting to remember the filter is turned on.

Idan

#32

arbel - May 7, 2009 - 08:05

any ideas on how the refresh module can save the exposed filters?

#33

erdubya - May 19, 2009 - 17:43

@dunkelfuerst I have a new problem. Fivestar doesn't show correctly with refresh.

I have custom code to display a changing node in a refreshing block. This node is a changing song (currently playing). At first everything appears correctly, specifically the fivestar module. Every time the block refreshes the song, the fivestar module doesn't display fully and is replaced by a drop down instead (perhaps the underlying voting api?).

To see for yourself, please go to http://projectvibe.net/home and notice the right sidebar with the refreshing song node and fivestar rating module. After refresh (manual or automatic) the fivestar disappears and is replaced by the dropdown.

Any suggestions on how this can be fixed?

#34

lachralle - June 9, 2009 - 13:06

Usually this module works superb on my Drupal 6 installs, thank you. My problem is that I always use a combination of Drupal 6 and Menalto Gallery 2.3 bridged by the gallery module from http://drupal.org/project/gallery However as soon as the Block Refresh module is enabled the gallery navigation block totally disappears when going to an embedded gallery page.

My example is a german website: http://www.goetting.de/de/multimedia In the sidebar on the right there's a "Multimedia-Bereich" block which is the embedded gallery navigation. As soon as Block Refresh is enabled that block disappears.

#35

dunkelfuerst - June 21, 2009 - 20:40

@erdubya:
http://dunkelfuerst.com/projekte/drupal-block-refresh-6x
I've updated some js, now fivestars should work. (needed to call Drupal.attachbehaviors())

sry for the delay

 
 

Drupal is a registered trademark of Dries Buytaert.