Storing a Node ID temporarily
echodun - July 14, 2009 - 04:53
I use a $_GET['id'] variable in a report module running in a Block to determine whether to display particular data. The ['id'] refers to the current node id (e.g., 5, 6, 7). I'm also using the Block Refresh module which upon refreshing that block, the $_GET['id'] value changes to ' ' (blank) and the $nid variable changes to "Block". Is there any way to store the original ['id'] value prior to the Block Refresh running and then restore it after it is completed? There's a file called block_refresh.js which contains various functions for the module, but I'm not technical enough to know how to possibly create the value of the node id at the beginning and then return it at the end. TIA!

Since Block Refresh only has
Since Block Refresh only has a 5.x release are you actually running Drupal 5.x?
It is not clear why you would use Block Refresh in such a case and from your question you want the nid to stay the same so what you expect to change?
I'm using a 6.x release
There was a message post in the forum on Block Refresh and a 6.x release so it should be compatible. Perhaps a diagram could better describe what I'm doing:
[--WEBFORM--] A webform exists in a block for url ...node/x?id=x (where x is the node
number). The webform has a hidden field called 'placeholder' with a
default value equal to %get[id] (which is the node id above).
[--WEBFORM REPORT--] Webform report prints in a separate block in the content section.
It filters the data in the report by only printing those records
where field 'placeholder' = $_GET['id'] (which again is the node id
above).
[--BLOCK REFRESH--] Block Refresh refreshes the block that the webform report is in every
30 seconds so that the user gets an almost real-time view of the
data as it's submitted. Even though the url remains node/x?id=x,
the $_GET['id'] function in webform report returns a value of 'Block'
after Block Refresh is run and displays no records since they are all
filtered out.
In looking at the viewsource of the page, Block Refresh apparently has run the following:
<div class="block block-block" id="block-block-5">which could explain why the [id] value has changed from the node number in the url to 'block'. Is there another argument I can run in the webform report ?php form instead of $_GET['id'] which would return that portion of the url that describes the node number so that I can compare it to field 'placeholder'?