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.
v.2.1.3
 
Gallery
 
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.

   
cooliris  
   
 

Examples:

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

<?php @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=32&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=11&useThumb=1&column=4&rss=1');?>

 
Beach Path
 
 
Thatscountry
 
 
A Walk In Time
 
 
Highway at night
 
 
Mushroom Satjubilee Nature Trail Park
 
 
Fishing At Dusk
 
 
Green Fields of Sweden
 
 
Whitehouses
 
 
Mandown
 
 
Chicago Skyline
 
 
Newcastleridge
 
 
 
 

<?php @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=32&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=11&useThumb=1&column=4&useMicro=40');?>

 
Mushroom Satjubilee Nature Trail Park
 
 
Rock Face
 
 
Queimadas
 
 
Rushing Wave
 
 
Sunset Beach
 
 
Green Hoops
 
 
Doubtfull Sound New Zealand
 
 
Colorful Place
 
 
Mupe Bay Dreams
 
 
Driftin
 
 
A Walk In Time
 
 
 
 
Add a single video using mediaBlock with:
 

<?php @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=21094'); ?>

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

<?php @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=3735'); ?>

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

<?php @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=1400&limit=2&useThumb=1&shuffle=1'); ?>

 
Dodge_Viper.jpg
 
 
Jaguar_XKR_Coupe.jpg
 
 
 

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 ie.video/x-flv 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.
 

Configuration

Edit line 28 to reflect your setup,
line28
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!

| View Printable Version