Popup filter

Ever wanted to put nodes or into popups or tooltips?
The popup filter allows the insertion of tooltip-like popups wherever input formats are applicable.

But wait. There's more! Text, nodes, blocks, menus, forms, views and php-generated content can all be popped up.

Instructions

  • Install the popup_filter module
  • Insert [popup] tags in content, and set the input format to "Popup filter"

Popup goes the content.

[popup] tag format

[popup type=value id=css-id title="my title" link=URL origin=corner expand=corner-direction activate=click|hover effect=slide|fade flat]

Where:

type

text | node | block | form | menu | view | php

value

popup text: the text to be popped up (like a normal tooltip)
popup nodes, blocks and menus: the unique integer id of the item
popup form and view: name of the desired form or view
popup php: php that returns text or formatted html

css-id

The id that will be assigned to the outermost div of the html popup element

title

The text to be displayed as the anchor of the popup. If not supplied text popups will use "Text", forms "Form", php "php" and node, block and menu will use the node, block or menu title, respectively.

link

The URL to assign to the popups' anchor (activate=click will use a nohref, regardless)

origin

where in the popup's anchor the origin of the popup body will appear (top-left (default) | top-right | bottom-left | bottom-right).
Any values other than top-left requires a width and height to be assigned to the popup item itself (div.popup) for it to work properly in IE, or actual top & left offset values set on the popup body positioner element (div.popup div.popup-positioner)

expand

the direction in which the popup will be displayed. (defaults to bottom-right)

activate

how the popup should be activated (click | hover) defaults to hover

effect

jquery animation effect to use to display the popup (fade | slide) defaults to no effect

flat

Prevents a popup menu's root from displaying.

Examples

this is [popup text='Yay this is the popup text!' effect=fade title='TEST POPUP TEXT' link='/']<br /><br />

this is a [popup node=1 effect=fade origin=top-right title='TEST POPUP NODE']<br/><br />

this is a [popup block=3 effect=slide origin=top-right expand=top-left title='TEST POPUP BLOCK']<br/><br />

this is a [popup form=search_theme_form effect=fade activate=click title='TEST POPUP FORM']<br/><br />

this is a test menu [popup menu=5 effect=fade]<br /><br />
this is a test click menu [popup menu=5 effect=slide activate=click]<br /><br />
this is a test flat menu [popup menu=5 flat]<br /><br />

this is a test [popup view=test_view type=page nodes=2 title='POPUP VIEW']

this is a test php popup [popup php="return date('d-M-Y');" link=/admin/build/menu]<br /><br />

NOTE: Whenever a space is to be used within any parameter, it should be wrapped in either single or double quotes, eg:
[popup text="this is my popup text"]
[popup node=1 title='My node popup title']

Dependencies

http://drupal.org/project/jquery_update 5.x-2.0
http://drupal.org/project/views 5.x-1.6 (If you're popping up views)

Releases

Official releasesDateSizeLinksStatus
5.x-1.02008-Dec-0242.76 KBRecommended for 5.xThis is currently the recommended release for 5.x.


 
 

Drupal is a registered trademark of Dries Buytaert.