Calling any blocks into thickbox trough hook_filter

milosh - July 16, 2007 - 23:51
Project:Thickbox
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

The proposal is to have a certain tag (like [thickbox | navigation | 250px:300px] ), that users can insert into node body and which would then be changed into clickable link, which will open up a thickbox with any existing block content (in my example a navigation menu would be opened in 250x300 px thickbox).

Such functionality would create a great flexibility for the drupal users, who then can provide any kind of content -- not only login block -- through thickbox.

From the outset it seems to me that this functionality should be relatively easy to implement trough hook_filter.

#1

milosh - July 18, 2007 - 15:13

Yesterday I went trough block api and became a bit more pessimistic on my proposal. The blocks in Drupal are organized by modules and they are numbered rather than using readable names. So login block is referenced by block_hook in user module and is the block number 1. So one would recall the login block with using function module_invoke('user', 'block', 'view', 1). Block nr 2 is list on online users (if I remember correctly), etc. So without studying the user module code, it is quite impossible to map the reference to login box town.

In principle, implementing my proposal is still possible, but it requires some additional macro-building (path_building) framework, as references to blocks are not easily recoverable -- one just needs to build a list of blocks for obtaining correct references to them. But I don't just want to give up yet -- I think thickbox needs flexible and easy framework to show whatever content in a pop-up.

Another options would be to try to play with views rather than blocks, as views have user_defined names and should be therefore easier to refer trough appropriate keyword. Any ideas?

#2

jasonwhat - August 7, 2007 - 21:10

This would be a great feature. I like the idea of having a views -- view type that can be selected. From there the user could choose to have the whole node body load in thickbox, or table fields. This is far beyond my ability, but seems like a good way to implement this.

On the block side. You should look at the JS toolkit. There is a module that automatically can set any content in a box to dynamically load in the main body of the page. This hooks into the block api well and might be another way to do it.

#3

frjo - July 31, 2009 - 09:31
Status:active» closed

Closing old issues, please reopen and update if there is a need for it.

 
 

Drupal is a registered trademark of Dries Buytaert.