Commit 06e78013 authored by walkah's avatar walkah

g2_filter.module from Michelle (closes #40465).

needs updating for HEAD
parent 9fe08b6a
This module would not exist without image_filter by Eric Scouten ( I started with that module and transformed it bit by bit into this module. While there's not a lot of original code left, I wouldn't have been able
to do this without using image_filter as a template.
This module is dependent on Drupal (of course), Gallery 2, and the gallery.module ( so thanks to everyone for all the work on those. Without them, this module would be useless. :)
\ No newline at end of file
1) Unpack the g2_filter module into your /modules directory.
2) Enable the module under admin/modules.
3) Add the filter to at least one of your input types at /admin/filters
3) Configure the filter. This is important because there are some path settings it needs to know.
This module creates a filter that lets you embed items from your embedded Gallery 2 install.
* Gallery 2 -
* gallery.module -
[G2:item_id class=name size=number frame=name]
* item_id (required) *
This is the item ID from G2. If you look at the URL of the item, this is the last number.
* class *
The block that G2 returns is wrapped in a DIV so additional styling can be done. The classes for this DIV are located in g2_filter.css. Included with the module are "left", "right", and "nowrap". These position the image block to the left or right or on a line all its own with the text not wrapping. You can also add your own class(es) to the CSS file and they will automatically be available.
* size *
The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio.
* frame *
G2 comes with several item/album frames and allows you to add more. You can use any of these frames for the embedded thumbnail just by specifying a name. Frames included with the default install are: Bamboo, Book, Branded Wood, Dot Apple, Dots, Flicking, Gold, Gold 2, Polaroid, Polaroids, Shadow, Shells, Slide, Solid, Spiral Notebook, Wood.
Send comments to
Left to do as of 2005/Oct/21:
* Add arguments for the rest of the "show" items
* Add arguments for the rest of the "block" items
* Improve the CSS for the div class.
* Investigate the float clearing brought up by kiz
Keizo's notes:
/******issues that remain
*should we keep n as an option in the config settings? see comments in get_settings_form()
*should n be required to solve that issue?
*how should the 'show' param be implemented. I've put it in the settings, which works good for defaults.
*How should the syntax be? it could be caption=yes/no title=yes/no date=yes/no etc.
*is that optimal? how about about show=title,caption,date ..this one seems easier interms of usability, yes?
*are the syntax standard enough? it would be a pain to change them later
*since it would break all instances of the filters use.
*Should we make the default tag [image:id] instead of G2? like the image filter? or may [img:id]? or just lower case [g2:id] for easyness?
*what should we use as the default for 'type', right now it's viewedImage. recentImage might be more useful?
*do we need to bother making different types per block? I don't think so, people could just make a second block
*still need to implement link target
*does the 'frame=' work? its not working for me in this version, i didn't look too closely as to why
***features wish list
*I would like it so there was an 'see all photos' link when an album is displayed. selecting an item_id of an album with n=1 does this.
*any possible to make the block display horizontally?
*and ofcourse an auto javescript thing to auto insert the [G2] tags
Oct 21, 2005
* Changed class names internally to add "giImageBlock." to make them unique. Classes are still refered to as "left, right, nowrap" in the filter call.
* Moved CSS file links to the HEAD via theme_add_style()
Oct 7, 2005
* Add ability to specify "none" for class and not have block wrapped in div (not added to docs)
* Removed redundant / from frame CSS link
float: left;
margin: 1em;
float: right;
margin: 1em;
div.giImageBlock.nowrap {
float: none;
margin: 1em
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment