Forum Index > FlashYourWeb OS Support > MediaBlock New Topic Post Reply
 How to use MediaBlock
 |  Printable Version
Anonymous: JT101
 March 14 2010 08:00 AM (Read 1480 times)  


Hello

I am a complete beginner with Media Block. It would be nice if I could have a one stop shop for all my media. Maybe this can play MP4, Avi and MP3 and display images


Just to verify, would it present media both from a Gallery2 thumbnail placed in a post e.g.

http://www.thebreadcrumbtrail.org/archives/541

AND

the normal Gallery2 library that I have in my gallery? For example, if I clicked on one of the automatically generated thumbnails here:

http://www.thebreadcrumbtrail.org/wp-content/themes/Breadcrumb%20trail/gallery.php?g2_itemId=4880, it will open your player?

If yes, then this is definitely what I need.

I see the code fro MP3 is something like: <?php @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=3735'Wink; ?>

But if I copy and paste this into one of my template files this is permanent. i.e. every post or page that uses that template file will have a media player embeded into it? I only want it to run if I click on one of the thumbnails mentioned above.

So if this is what I need, where do I start? I've uploaded the edited mediablock.php file to my gallery2 folder. Here is the code............

/* Connect to gallery */
function init() {
require_once ('embed.php'Wink;
$ret = GalleryEmbed::init(array('fullInit'=>true, 'embedUri'=>'http://www.thebreadcrumbtrail.org/wp-content/themes/Breadcrumb trail/gallery.php', 'g2Uri'=>'http://www.thebreadcrumbtrail.org/gallery2/main.php'Wink);
if ($ret) {
print 'GalleryEmbed::init failed, here is the error message: '.$ret->getAsHtml();
exit;
}
GalleryEmbed::done();
}

What can i do to ensure it A) plays when a thumbnail in a post is clicked
Cool plays when thumbnail in my gallery is clicked (my gallery is running using gallery.php which I am attaching to this comment)


Thanks

James


 
Quote
suprsidr
 March 14 2010 09:01 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

mediaBlock is for displaying gallery content outside of gallery.
If you are displaying a thumb or set of thumbs via mediaBlock(useThumb=1) the thumbs would link to the full size display in your gallery or if you configure mediaBlock with an embedUri the links would point to your embedded gallery.

without useThumb mediaBlock uses the same renderer gallery would use to generate the proper html to display the full item be it a photoItem, movieItem or audioItem.

mediaBlock does not force items to be displayed in an unusual way ie. to force a windows media video(wmv) to display in the flash video player. It simply would not play.

I have spent much of my personal time creating examples to guide users in the right direction.
It is up to you the user to experiment/extend mediaBlock to your own requirements.

I am available for hire for specialized solutions.

-s


There will always be...
 
Profile Email Website
Quote
Content generated in: 0.05 seconds
New Topic Post Reply



 All times are PDT. The time is now 08:36 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
HTML Allowed 
Censored Content