Introducing Media Manager 2.0 Beta 1

Media Manager has been a hobby of mine ever since I first started working for SIx Apart; from my first release of BookQueueToo, which was an expanded version of BookQueue, to a nearly completely rewritten Media Manager for Movable Type 3.x, this plugin has been how I, as the Product Manager for Movable Type, understand the developer experience of building plugins with the Movable Type platform.

Media Manager - Manage Assets

When I set out to update Media Manager to work with Movable Type 4.0, I really wanted to take a fresh look at how it was built, and what the user experience was like. My previous versions of Media Manager surfaced far too much complexity by trying to bundle too many different capabilities into the product, like "reviews" and "ratings" which are probably, in all honesty, functionality best left to be fulfilled by other more specialized plugins. I also wanted to remove some vestigial features that were left over from the plugin's earliest incarnations, such as the statuses "read," "reading," and "not read" - which are perfect if the only thing you consume is books, not so great if you like DVDs, CDs and even kitchen appliances.

Despite however Media Manager's reduction in complexity, Media Manager 2.0 is a far more advanced plugin then its predecessors. That is because it integrates more smoothly and seamlessly with the core Movable Type user experience then ever before, thanks to Movable Type's incredible developer APIs. However, to some users Media Manager may seem too simple having "lost" many of its formally core features. For example here are the features that will ultimately be removed from the core Media Manager plugin once it is officially released later this year:

  • Almost all of Media Manager's template tags will be completely removed in favor of template tags defined by Movable Type itself
  • Reviews have been completely removed, because Movable Type now makes it crazy-easy to insert assets, like Books and DVDs from Amazon, into entries and page content.
  • Ratings have been completely removed because this is functionality that is best served by another plugin like Mark Carey's Ajax Rating plugin.

I do this not only because I want Media Manager to serve as a reference implementation to other developers on how plugins should be built and how they can best leverage capabilities within the platform, but also because it is what is best for the product. I want it to be simpler and easier to use, more focused, and capable ultimately of support services like YouTube and Flickr.

Media Manager Search Resuts Media Manager - Insert into Post

So today, I release the first public beta of Media Manager 2.0 to hear your feedback and your thoughts on the changes I have made, as well as get your advice and suggestions on how I can make Media Manager better.

Recommended Entries

53 Comments

Hi Byrne. I want to say that I loved your previous work with this plugin, especially MTAmazon and MTAmazon32. I have been looking forward to the updated version since I heard you mention it during the community conference call on movabletype.org. After trying to implement this plugin I want to get some feedback about the capabilities of this new version. I want to create a blog which is built from the ground up that is dedicated to amazon content (I had done so with MT 3.x). In this blog each amazon item would be a category, each of which would have subcategories like Preview, Review, Thoughts, Quotes, ect. I don't see how it is possible to associate an amazon item with a category in this new version of the plugin. I was able to do it with MTAmazon32 by placing the item's asin in the category description field. Then the amazon item would be found by and all relevant information would be produced. Does this version support a tag system that allows this type of item look up? If not I think my blog dream is dead before it even began...

hey I understand I will lose reviews and ratings and that is fine with me, I don't review as much as I used too, but will I lose the ability to bring up the covers of the books and run sql against the DB to bet counts like I have on this page. http://www.stfam.com/books.php

Byrne,

So does MM 2.0 not upgrade from the prior version? I installed MM 2.0...but don't see that it upgraded the previous db anywhere that was still hidden away in my db (even though the plugin wasn't being used...since i've upgraded to mt4.01)

Thanks, ryan

That's odd. It should upgrade your old MM content (it won't delete it), but it should move it to the new database format. I will need to investigate further.

Byrne, is there some way to force Media Manager to upgrade the db again? My old records from MM seem to missing...or at least not showing up as an asset.

Well, I want to give an apology to a question that seems to have been asked in too much haste (from above). It turns out that the Custom Fields plugin does support adding a category field for AMAZON content! How perfectly convienient for my intentions!! One problem: there is zero documentation on how these two plugins work together. A little help would be much appreciated. How do I get an Amazon asset to show up in the entry context when its specified in a custom field? Here is the code I am using in the entry context(not working):

<MTEntryCategories>
<MTCategoryCustomFields>
    <MTIfNonEmpty tag="CategoryDataAmazonBookDB">
        <MTAssets asset_id="<MTCategoryCustomFieldValue>">
        <a class="asset-image" href="<$MTAssetURL$>">
        <div style="height: 100px; width: 100px; padding: 5px; background-repeat: no-repeat; background-position: center center; background-image: url(<$MTAssetThumbnailURL width="100"$>)"></div></a>
        </MTAssets>
    </MTIfNonEmpty>
</MTCategoryCustomFields>
</MTEntryCategories>

Try this:

<mt:SetVarBlock name="tag"><mt:CategoryDataAmazonBookDB /></mt:SetVarBlock>
<MTEntryCategories>
<MTCategoryCustomFields>
    <MTIfNonEmpty tag="$tag">
        <MTAssets asset_id="<MTCategoryCustomFieldValue>"><a class="asset-image" href="<$MTAssetURL$>"><div style="height: 100px; width: 100px; padding: 5px; background-repeat: no-repeat; background-position: center center; background-image: url(<$MTAssetThumbnailURL width="100"$>)"></div></a>
        </MTAssets>
    </MTIfNonEmpty>
</MTCategoryCustomFields>
</MTEntryCategories>

Hey Byrne, it's Chris again (this time I signed in rather than commenting anonymously). Thanks for the quick suggestion, but as far as I can tell your suggestion did not work. Here is the module that I adapted to your suggestion:

<MTSetVarBlock name="AmazonBook">
    <MTCategoryDataAmazonBookDB>
</MTSetVarBlock>
<MTEntryCategories>
    <MTCategoryCustomFields>
        <MTIfNonEmpty tag="AmazonBook">
        <MTAssets asset_id="<MTCategoryCustomFieldValue>">
        <a class="asset-image" href="<$MTAssetURL$>">
        <div style="height: 100px; width: 100px; padding: 5px; background-repeat: no-repeat; background-position: center center; background-image: url(<$MTAssetThumbnailURL width="100"$>)"></div></a>
        </MTAssets>
        </MTIfNonEmpty>
    </MTCategoryCustomFields>
</MTEntryCategories>

I see the error. The tag="AmazonBook" needs to be a variable - not plain text. Variables are identified using the "$" dollar sign. So your code should look like this: tag="$AmazonBook".

Also - you should note that comments on this blog can formatted in Markdown. So if you indent your HTML code with a minimum of 4 spaces, then MT will automatically convert that text into HTML escaped code block.

Byrne, thanks again. For some reason your suggestion did not resolve the issue, the above (corrected) code will not show any amazon content when placed in the MTEntries tag block on my main index. Any other suggestions. Thanks so much for your help thus far!! After a little testing, it seems that the MTIfNonEmpty tag is failing to pass the conditional test because no simple text will be shown after this tag, while the same text is shown when placed immediately before the text. I hope that can help in figuring this out.

Maybe I'm just missing where the media list is now? I see you can add things as an Amazon Asset, I just don't see all my old stuff there already.

I am more than disappointed with the current version - a complete disaster of programming in my opinion - which is probably just aggravation from trying to post for the last twenty minutes and only being greeted by error messages.

I have officially given up on this project of yours.

@Zora - I am really sorry you have experience problems. You do realize that this is beta software right? Also, Media Manager 2.0 requires Movable Type 4.01, which may be the source of the milieu of problems you might be experiencing.

When I add an asset, the list of assets no longer works and I get this error:

fileparse(): need a valid pathname at lib/MT/App/CMS.pm line 2131

I have to go into the database to fix it up, which is somewhat annoying. Is there something I'm missing?

Sorry, I'm stupid. I missed the MT 4.01 requirement.

Getting the following error when rebuilding:

Undefined subroutine &MediaManager::Util::debug called at /mt/plugins/MediaManager/lib/MediaManager/Template/ContextHandlers.pm line 107.

Any ideas?

Thanks for the hard work, really liking the integration to MT4.

Cheers.

Hi byrne,

I'm getting the same error as droppyale. Running 4.01 upgraded from 3.3 (and way before) installation, removed mediamanager plugin entirely and reinstalled. There may be another lingering amazon somewhere. Tried setting debug in app.pm to 0 and 1, no difference.

Cheers, and thanks for all your hard work on the plugin and on the (mostly) amazing leap that is MT4!

Hi Byrne,

Perhaps I'm in the minority, but I actually do use Media Manager solely for books. I found the item statues in 1.x very useful. I could add books as I bought them, leaving them in the "unread"' status. Once I actually start reading a book, I'd flip the status to "reading," and it would automatically show up in the "Now Reading" section of my blog's sidebar. When I finished a book, I'd mark it "read" and write my review.

In the documentation for Media Manager 2.x, you say that users are encouraged to use MT's built-in tagging system to manage item statuses, and to see the documentation for assets for more information. Unfortunately, there is still no documentation for assets on movabletype.org, and I'm having a little trouble figuring out how to devise a system similar to what I had. Inserting the assets into review posts is no biggie, it's the "Now Reading" widget that I'm stuck on.

Thanks for all your great work!

Dave

The biggest impediment right now to enable the use case you mention is the fact that Movable Type does not allow users to edit asset meta data. This is something we really wanted to accomplish for the release of 4.0, but simply didn't have time for. But are working on getting that functionality into the next major release of Movable Type.

Once users are allowed to edit assets, then you can very easily edit the tags associated with an asset.

To add a book to a reading queue simply add the tag "reading". To move a book from the reading queue to have read queue, remove the tag "reading" and add the tag "read." Then a template tag can be used to filter a list of assets by tag. For example:

<h3>Currently Reading</h3>
<p><MTAssets lastn="1" tags="reading"><MTAssetTitle></MTAssets></p>
<h3>Just Finished</h3>
<p><MTAssets lastn="1" tags="read"><MTAssetTitle></MTAssets></p>

I think Media Manager is likely to remain in Beta until we can get Movable Type 4.1 out the door. In the mean time, I hope to add support for adding Flickr photos in Movable Type.

Byrne,

Pardon me for taking this back to 40,000 feet, but I have to ask a very basic question. I've never successfully used Media Manager (or MTAmazon) before in previous MT versions, though I've wanted to. (I installed all of them and never got them to work.)

So what I'm wondering is: What exactly does Media Manager 2.0 Beta 1 DO? What do you use it for? If you're not using it for Amazon links to products and you're not using it for reviews of products, what is left?

@fanzinger - I am really sorry to hear that you have never used Media Manager successfully. I am hoping that with MM 2.0 you will have a different experience. As for what Media Manager does, you should checkout the screencast I made that demonstrates its functionality. That will at least show how it works. As for what I use it for... I use Media Manager to make it easier to blog about books I am reading and DVDs I am watching. My wife uses it to maintain a queue of things she has read/watched/listened to recently. I have heard of others using it to maintain a virtual store front. Bottom line, what you do with it is not constrained by the software, only your imagination.

Hi Byrne,

So very glad that you've put out a new version of MediaManager. I also use it like davewells, for maintaining my reading list and reviews (looks like I'll have to figure out a slightly different way of starring them though. The Ajax Rating plugin may yet work, but I'm not sure I see a way to let myself issue a rating, but not anyone else with that plugin).

I digress. The reason I'm commenting is that I have the same issue as rhino: all my old media manager records were not imported as assets. The mt_mediamanager and mt_mtamazon tables are there in the database with all the proper records, but mt_asset is empty. Is there any way to get the old records in? I don't mind if I have to go in and re-tag everything, or if they're not necessarily linked to a review, but I don't want to have to manually add every single Amazon item (I've got somewhere around 150).

Thanks for your help, and good work on the plugin (and MT4 overall!).

Byrne - thanks for all you do for MT. I'm having problems adding Amazon assets after what appears to be a successful install of Media Manager. I am able to successfully search for items on Amazon and get a list of items returned from which I can choose in the "Insert Asset" dialog. But when I select an asset and click "Continue" I get back the following error:

Statement has no result columns to bind (perhaps you need to successfully call execute first) at /home2/xanthan/hammerland-www/mt/extlib/Data/ObjectDriver/Driver/DBI.pm line 120.

I believe I've meticulously gone through the install process and checked (and rechecked) that each file was successfully uploaded... but apparently something is missing. The DBI.pm file appears in tact, in its place, with the same number of bytes as the original. Line 120 is:

$sth->bind_columns(undef, @bind);

Any clues as to what is going wrong for me?

Thanks,

Tom

@Tom - can you do me a favor and make sure you are using the most recent version of DBI. I have often heard of problems like this that are quickly and recently resolved by upgrading DBI. If this doesn't fix or relate to your problem, let me know and we will go to the next step.

Byrne, my service provider has v1.21 of DBI installed. I don't know if it matters, but it's also running MySQL v2.1011.

Yikes Tom. MySQL 2.1? That is not even supported by MySQL anymore. I am almost certain this is your problem.

I'm actually getting the same error, but with mysql v 3.23.58. If that is an issue (i'm used to 5-oh myself) I can see about upgrading, but its a corporate server, so I'm not sure what the chances of that happening are.

I'd hate to go through all the hassle of upgrading only to find out that that isn't the issue.

I've installed the plugin, but I get an odd error when rebuilding my index templates.

Undeclared prefix: _NS1 at /home/ektopos/www/movabletype/cgi-bin/plugins/MediaManager/lib/XML/NamespaceSupport.pm line 293.

Any help?

I'm also seeing the Undefined prefix error. It happens each time Feeds.App refreshes its index template (as a Scheduled Task, every 15 minutes). The index build fails.

To fix this (at least I think it's fixed, the error is gone) I removed the XML lib installed by MediaManager, but I added the MediaManager's ParserDetails.ini file to the XML::SAX directory within MT's extlib directory structure.

What would be great - and this may be a comment more for the MTAmazon community - would be the ability to either select or edit the source of / link to the content. I very much would like to add books to my blog, but I don't want to link to Amazon.com, for a variety of reasons. I would prefer to link to Goodreads.com, but that's neither here nor there. From a top-level perspective, something like a link constructor component would be awesome (i.e. replacing "amazon.com" with "goodreads.com", replacing, say, "?id=$name" with "book/show/$name"), without needing to go in and hack the Media Manager / MTAmazon files themselves.

I think this tool is fantastic, however - I can't wait to see further permutations.

I've got MM2.0 beta on an install of 4.1. I imported my data from an export.html file, so I'm starting with totally empty tables. When I try to add something to MM, I can search, and I get results, but I can't tell it which item I want to add as an asset. If I click on the "Continue" button, I get a blank entry and an invalid asset added to my database.

Any suggestions?

Hi Byrne,

I'm having a problem that others seem to be having as well (judging from some previous comments). I have Media Manager 2.0b1 installed on MT 4.1, and it seems to be working smoothly - I can add and edit Amazon assets just fine. The problem is that none of my old MM 1.0 data was imported. The data exists in my MT database, but I can't figure out how to get MM to do anything with it. Is there any way to force MM 2.0 to import the old data?

Hi there,

How long have I been looking for this MT4 version of this plugin?!?!

It's installed, and working a treat, but I can't find a way to disply my list in the blog's sidebar.

I tried the code you used in an earlier comment, but is apparently not a valid tag, and I don't know what I'm doing! Can you help, or point me in the right direction please?

Thanks.

I upgraded from MT 4.0 to MT 4.1 and the Media Manager plugin no longer works properly. Instead of being presented with a search list of items with graphics for selection, I get a text list of titles that I cannot select.

Can you help?

I'm also experiencing the same problem using MT4.1. I get a text list of titles that I cannot select. This is a fresh install of MT4.1 and MM2.0b1.

I've been trying to update my main website to MT 4.1 and part of that meant upgrading from an ancient version of MTAmazon to MediaManager 2.0 Beta 1. I had nothing but problems with the upgrade, so I decided to try it on a totally clean machine, brand new installation. Still have a problem, here's the info:

MT - 4.1 MediaManager 2.0 beta 1

snippet from template:
<MTAmazonItemLookup ItemId="B00005JNOG" >
<MTAmazonImageTag size="medium" > <br / >
<a href=" <$MTAmazonDetailPageURL$ >" > <$MTAmazonTitle$ > </a > <br / >
Directors: <$MTAmazonItemAttributes name="Director"$ >
</MTAmazonItemLookup >

And I get the following error when I try to build:
Publish error in template 'Main Index': Error in tag: Amazon returned the following error: The query parameter @ is invalid. Please see service documentation for correct syntax. at /Library/WebServer/CGI-Executables/mt/plugins/MediaManager/lib/MTAmazon3/Plugin.pm line 30.

I did some debugging and MT is passing in this argument:
{ "\@" => [], ItemId => "B00005JNOG", ResponseGroup => "Small,Images,OfferSummary", }

Yep, the first item in that list is a hash with a key of "\@" and an empty list value.

Looks to me like this is a bug in MT4, but I'm no where near an expert on these things.

Anyway, I changed the following line in the MTAmazon3/Util.pm:
unless ($_ eq "AWSAccessKey" || $_ eq "Operation") {
==>
unless ($_ eq "AWSAccessKey" || $_ eq "Operation" || $_ eq "\@") {

This is hack I know, but it gets me working again.

Is there a better way to deal with this? Am I doing something obviously wrong somewhere?

Thanks

I just installed MM beta. I followed the install instructions, grabbed and set my Amazon ID, etc.

However, when I try and add an Amazon asset what I get back is a plain text list. If I hit either button, I get the following error message:

Error reading response from Amazon. It is possible that Amazon returned an HTTP Status of 500 due to an intermittent problem on their end. Here is the content of their response: at /usr/lib/cgi-bin/mt/plugins/MediaManager/lib/MTAmazon3/Plugin.pm line 30.

If I try and add a Youtube asset, again, I receive a plain text list. If I hit either button I get the following message:

File does not exist: at /usr/lib/cgi-bin/mt/plugins/MediaManager/lib/YouTube/CMS.pm line 150

Thoughts?

OK, things are working.

I found that the mt-static directory is in /var/www and also /usr/lib/cgi-bin/mt.

I had only copied mt-static into the latter location. Copying it to the former fixed my problem.

Very nice plugin!

Installed the most recent beta of MM on my MT 4.21 server, and got the Amazon ID, etc., but the Amazon asset feature isn't working.

The search feature in add asset works, and it allows me to pick (highlight) an item, but as soon as I press 'continue' I get this error:

Can't call method "execute" on an undefined value at C:\wamp\www\mt\extlib/Data/ObjectDriver/Driver/DBI.pm line 127.

Is this a problem with my installation, or is MM not compatible with MT 4.21 yet?

Thanks!

I've installed Media Manager and I'm trying to drop an Amazon Asset into an entry: http://www.atomicecho.com/photos/brio_dachshund.shtml

It's not appearing in the page though. I can seen there's some code for it there when I view source but not when I view the page. Where am I going wrong? Do in need something to my stylesheet or do I need to create a custom field or something?

Have set up the amazon auth stuff OK and didn't have any problem creating the asset, just not getting it in my published entry.

Any help much appreciated.

I've had another look and it is there but the image seems to either be 1px by 1px or is a 1px high line. So that must make it a stylesheet thing then?

Hello Byrne. I'm finally upgrading to MT4.x, and glad that Media Manager is still around. Thanks for your continued support of it.

I blog occasionally about Japanese books and English books. In the past I used to switch the MTAmazon setting before blogging in order to get asset info.

With the updated versions I can't find a way to change the country. Can you point me to it?

I'm stuck on Japan right now. So I get to catch up on my Japanese book reviewing~~

(BTW: it would be nice if on the MM1.1 page you point people here for MT4 support. I know it's still beta, but I thought I was skeerewed and was about to move my reviews to a third party platform, off of MT)

Weird, I found the setting, per blog setting under plugins. I'm absolutely stumped why I couldn't find it before.

I am new to MovableType and I am wondering if you can create a currently reading list with this new plugin because I cannot figure it out. Thanks.

Nevermind, I figured it out.

Hello All,

I'm getting the "An error occurred close Statement has no result columns to bind (perhaps you need to successfully call execute first)" when I try to add an Amazon Asset. This problem is listed above as well. Anyone solve this yet?

I have installed beta 1 on a brand new 4.25 MT Pro install.

I can search for an Amazon asset and add it to the assets list. I have made a new custom field for an entry, and select Amazon as the type.

However clicking the 'choose Amazon' link in the entry causes a problem. I get the option to select the Amazon asset I have added (great) but when I click 'insert' I get an error box. Unfortunately the error box does not have an error message, just the ! icon!

Any ideas, and any plans for the full release. I have some money to send you to pay for a working version!

Hi Byrne,

I've been using Media Manager for a number of years now, and I've been very happy with it. But, it seems that Amazon is now rejecting any requests that aren't signed. Have you, by any chance, updated Media Manager (or really MTAmazon, I guess) to sign requests? I checked your Media Manager code on GitHub, but it looks like the request code is the same as in the 2.0 beta I'm using.

Thanks, Dave

As a matter of fact I am working on an upgrade, but I am on vacation right now so it may take a week or so. My apologies!

No need to apologize, Byrne! You're providing a great and free service, which I greatly appreciate. I can certainly make do until you finish the update.

I took a look at Amazon's sample perl code for signed requests and made an attempt to combine it with MTAmazon, but my Perl-Fu is almost non-existent.

I was wondering why the plugin had stopped working! Now I realise it is the Amazon signing issue :)

Looking forward to an upgrade when you get a chance.

Hi Byrne. Any news on when you might get the Amazon issue fixed?

@Matt and @Everyone - thank you for your patience. Media Manager is getting some love: To learn more, check out my latest blog post: http://bit.ly/Ma42D.

Leave a comment

what will you say?


Recent Comments

  • @Matt and @Everyone - thank you for your patience. Media Manager is getting some love: To learn more, check out my latest blog post: http://bit.ly/Ma42D. ...

  • Hi Byrne. Any news on when you might get the Amazon issue fixed? ...

  • I was wondering why the plugin had stopped working! Now I realise it is the Amazon signing issue :) Looking forward to an upgrade when you get a chance. ...

  • No need to apologize, Byrne! You're providing a great and free service, which I greatly appreciate. I can certainly make do until you finish the update. I took a look at Amazon's sample perl code for signed requests and...

  • As a matter of fact I am working on an upgrade, but I am on vacation right now so it may take a week or so. My apologies! ...

Close