On this page
Content Display Modules
- Chart
- Charts and Graphs Documentation
- Composite Layout: Turn your node into a complex layout of nodes, blocks, and content fields.
- Contact form blocks
- Crumbs, the breadcrumbs suite
- Custom Breadcrumbs: Customizing the breadcrumb trail
- Custom Pagers
- CustomPage Documentation
- Disable / Hide messages shown to end users
- Display Suite
- Displaying mathematics with TeX
- Dynamic menu elements with tokens
- Embed Widgets
- Front_page: A different first page for your site
- Get Content Type
- Graphing modules
- Header Image: Display an image on selected pages
- HighchartTable
- Image Zoom
- Indexpage: summary of node type information
- InsertFrame - Insert auto-sized iframe in any content
- Longer Node Titles
- Mantra
- Module Template System (D5)
- MySite: custom user homepages
- Nivo Slider
- Node_Type_Filter
- Nodecarousel
- Nodequeue tutorial
- PageEar: Page peel/curl effect
- Paging: Break long pages into smaller ones
- Path Breadcrumbs
- Peekaboo; Ajax field formatter
- Print: Printer, e-mail and PDF versions
- Read More Control
- Read More Link: Taming Drupal’s "read more" link
- Schema: UI for the Schema API
- Scrollshow - Like a slideshow, but you scroll!
- Simplenews Template: themable newsletters
- Speed Reading Toolkit
- Submitted_by: Submission line by content type
- Teaserbytype: specify teaser length for each content type
- Texy! filter
- Token - Generic placeholder substitution
- Using Galleryformatter module in Drupal 7
- Visualization
- Weight - Control node placement
- oyoaha Liquid Layout
InsertFrame - Insert auto-sized iframe in any content
InsertFrame is an input filter to include frames anywhere in your site.
Frames can be auto resizabled according to content.
Installation
- Extract zip file in the modules directory
- Enable the module in the admin settings
- Add the filter to an input format.
Syntax
[[[<url> width=<w> height=<h> scrolling=<yes|no|auto> className=<class> ID=<id> offset=<offset> transparency=<true|false> wrapper=<html|htmlpage|text>]]]
Where :
- url : Url of the page
- w : Size as css declaration (%,px,em) - Default : 100%
- h : Height as css declaration (%,px,em). if height=100% and url is in the same domain as web site, the height will be ajusted to the real height of the source- Default :100%
- scrolling : Scrollbar settings. Values from IFRAME tag - Default : no
- class : Name of a CSS class
- ID : Id and name of the frame - default iframe1
- transparency : Allow (true) or not (false) iframe transparency
- offset : offset is a number to add to correct (if needed) auto calculated height - Default 15
- wrapper (since 2.x) : InsertFrame can include some externals pages (wrapper). Values can be text, html, or htmlpage.See Features for more details.
URL not starting with http will be considered as relative path.
Examples
- To include the page www.myurl.com/myapp.html with auto-height with a width of 100%
[[[http://www.myurl.com/myapp.html]]] - To include the page www.myurl.com/myapp.html with height of 500px and width of 300px
[[[http://www.myurl.com/myapp.html height=500px width=300px]]] - To include a frame of id myframe with the myCSSClass css class
[[[http://www.myurl.com/myapp.html id=myframe class=myCSSClass]]]
Features
Version 1.x :
You can add your own tags (tag=value). To custom code with this tags, you must create a theme function. To do this, add in your template.php a function called yourtheme_insertFrame_custom($onload, $iframe_params). The first param is the default code of onload event, the second, an array of all tags of the filter. You function may return any text that will be add as is in the IFRAME html tag.
You can also theme the function insertFrame_init to add javascript for example.
Example :
// Add javascript
function mytheme_insertFrame_init() {
drupal_add_js(drupal_get_path('module', 'insertFrame') . '/myinsertFrame.js');
}
// Add resizing feature if resize=Y
function yourtheme_insertFrame_custom($onload, $iframe_params) {
if ($iframe_params["resize"] != "Y") {return $onload;}
return $onload . " onresize='resize(this)'";
}
Theming insertFrame_getURL($url) function, you can customize the url (with token module for example). To theme the function, see this example :
function yourtemplage_insertFrame_getURL($url) {
return token_replace($url);
}
Version 2.x
- All tags can be rendered as your own by using themed function (see insertFrame_theme()) or by creating insertFrame_render_<the tag to render> function. Both have two parameters :
- $value : Value of the tag
- $params : Array of all params and values
Functions must return html output to render the tag.
Exemple :
function insertFrame_render_resize($value, $params) { if ($value != "Y") {return "";} return "onresize='resize(this)'";} }By default, all non-themed tags are rendered as is (tag="value"). For example, to add transparency behaviour, type :
[[[url allowtransparency=true]]]insertFrame_getURL() and insertFrame_custom() have been deleted. Migrate them to insertFrame_render_url and insertFrame_render_<tag>
To insert spaces in tag's values, replace them by %20.
[[[url style="border:1px%20solid%20red"]]] - Support of Token module for url
- Wrapper : External pages can be included directly in Drupal, so Drupal theme can be used.
- Text : Inserted as plain text (surrounded by pre tag)
- html : Inserted as html fragment page
- htmlpage : Insert only the body of the html page
2.1 features
- A setting paramater has been added. Checking it, make relative path from base url, not from parent path
Remarks
- You can use the filter with wiki modules but you must enclose the lines with <nowiki> tag.
- if HTML filter is active, add <iframe> in the "Allowed HTML tags" input box in the configure tab of your input format
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion