default userpic

Photo Captions

Vote 0 Votes

I am new to MT. Have used Blogger and Word Press.
They have a way to add captions to images inserted into entries.
For the life of me, I can't figure out how to do it on MT.
Can anyone out there help?

6 Replies

| Add a Reply
  • I would recommend you to provide a "description" when you upload an image and then to grab it on your templates using the tag: <$mt:AssetDescription$>

  • Thanks Mihai, I'm working with tferrick. That would work if we were hard-wiring something into the templates. Unfortunately we want to use the "Insert Image" button on the entries to put in Asset images. There's no obvious way to have the insert also include the AssetDescription field.

    I ran across a relatively ancient MT thread where it was suggested that one could hack the file in /lib/MT/Asset/Image.pm but that file's a lot different now and I didn't seen any place to add the AssetDescription.

    Really all we'd want is for Insert Image to create somethink like:




    AssetTitle: Asset Description.




    I could use CSS to align it and make the text act as a description. But how to do this? Hmm.

  • Meh, the code didn't go through. I meant:

    <div class="imageinsert">
    <img src="AssetURL" alt="AssetTitle">
    <p>AssetTitle: AssetDescription</p>
    </div>

  • I am wondering the exact same thing. I to have been strugelling with this issue and wonder if this plugin might help. Custom Asset Markup plugin for Movable Type By using this plugin I wonder if you would be able to take Mihai Bocsaru suggestion and change the way that Movable type actually plugs in the image to the entry. My thought was to have MT evey time you insert an image then grab the and put it under the image wrapped with specific css. That would then allow you to have Photo Captions and not worry about hacking the core files. I will give it a try and see if it happens. But if anyone out there has any suggestions please let me know we need this to work.

  • I've been struggling with this for some time.

    jgrossman, you're right -- Custom Asset Insertion Markup is probably the best way to go. I've used that with MT 4.2 and it works well. It provides "mini-templates" for each type of image (e.g. plain images, images with popups, thumbnail images...)

    My problem with it is that if you change the CAIM template, you won't see the affects on (for example) your custom-field images until you reinsert the image. Each and every one! For images inserted into stories, you may only have to re-publish every story, but I think you have to reinsert the images.

    Assetylene is another plugin that does about the same thing as CAIM, but I had further problems with Assetylene -- while it did everything it was supposed to do, I found it harder to work with.

    I'm still looking for a way to do this without these plugins. I need the ability to modify the templates without having to go and reinsert images every time!

  • Martin, I would **love** to know if editing Image.pm would work.

    I don't currently have access to update this file -- I may not be alone in using this server! But if you wish to experiment (i.e. be the guinea pig), try replacing your Image.pm with this one
    http://docs.google.com/Doc?docid=0AYCFWAIYpMcKZGRtM2JzbnpfNGM5cm40bWQ4&hl=en

    Tell me if it works, almost works, or blows up in your face & takes down your entire system.

    Back up your old copy, of course. You can see what changes I made by comparing with the old one; I didn't do anything very fancy.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012