Media Block
Feed media into your HTML pages and CMS applications with our MediaBlock technology and Gallery. With many of the features found inside our G2Bridge, MediaBlock is able to work with WordPress, Joomla, Drupal and many more.
Word Press Joomla Drupal

With Gallery as your "media manager", MediaBlock gives you the power to control our MiniSlide Show and the cooliris plugin as well, so embedding easy access to your Gallery content is simple.

MediaBlock is written in PHP so it's Open Source and and extremely versitile –and free! The MediaBlock.php can be used just like the imageBlock module for including Gallery content in external pages.

Below are some examples, along with the usage information on how to get MediaBlock working for your web site. If you have any questions on how to get this working for you, feel free to ask us in our forums.



The example below is calling in 11 items from a Gallery album. Notice how it closes the table properly?

<?php @readfile('');?>

Blue Sunrise
Welcome To Hell
Ansesourced Agent
Sunset Beach
Giants Causeway

<?php @readfile('');?>

Arthurs Seat
Sunset Beach
Giants Causeway
Marina Sunset
Helix Nebula
Welcome To Hell
Sandringham Beach
Cavern Ray
Mupe Bay Dreams
Sunny Highlands
Add a single video using mediaBlock with:

<?php @readfile(''); ?>

JavaScript required to view this content.
and how about an mp3:

<?php @readfile(''); ?>

JavaScript required to view this content.
another call to mediaBlock to display a couple of thumbs out of an album like:

<?php @readfile(''); ?>


Available parameters

Param Description
g2_itemId Can be that of a single item or an album, but not a derivative image.
mode Can be: dynamic or search for dynamic albums below. Or link ie mode=link to display only a link.
g2_view Used with mode=dynamic, can be: dynamicalbum.UpdatesAlbum, dynamicalbum.PopularAlbum, dynamicalbum.RandomAlbum, keyalbum.KeywordAlbum, or tags.VirtualAlbum.
mime Used with mode=search for specific mimetypes or image/jpeg
recursive Display items from an album recursively. Possible values: 0 false or 1 true default: false.
limit Numeric limit of items to be displayed. Default: unlimited.
g2_maxImageHeight Display derivatives with max height, must accompany g2_maxImageWidth
g2_maxImageWidth Display derivatives with max width, must accompany g2_maxImageHeight
useThumb Display the thumb instead of full image. Possible values: 0 false or 1 true default: false.
useMicro When useThumb, render micro thumbs - possible values: integer pixel width of thumbs default: 0.
showTitle Display the items title. Possible values: 0 false or 1 true default: false.
noLink Display item with no link. Possible values: 0 false or 1 true default: false.
noShadow Display item without dropshadow. Possible values: 0 false or 1 true default: false.
g2_keyword Keyword to search for with mode=dynamic&g2_view=keyalbum.KeywordAlbum&g2_keyword=my_fun_keyword
g2_tagName Tag to search for with mode=dynamic&g2_view=tags.VirtualAlbum&g2_tagName=my_fun_tagname
shuffle Randomize results. Possible values: 0 false or 1 true default: false.
column Number of columns in display table for multiple items. Default: 1.
rss Include mediaRss feed for Cooliris - possible values: 0 false or 1 true default: false.
linkText To be used with mode=link - the text for the link. If not present with mode=link, title will be used.
linkTarget Set your link(s) target. ie. linkTarget=blank
popupLink Open your images in a popup - Images only, g2_maxImageWidth and g2_maxImageHeight required. example
highlight Display the thumb if your g2_itemId belongs to a album.


Edit line 28 to reflect your setup,
upload to your gallery2 directory,
and start calling content using our examples above as a guidline ;)
We are a small development team which focuses on creating applications that positively impact Open Source communities and projects. Donate a few and help support FlashYourWeb development. Thanks!