Category Archives: Dynamic Media

Image Captions in Drupal 7 – A method

Image captions are supposed are a fairly standard item in a web developer’s toolkit. In a modern CMS they seem to be a given. However, Drupal leaves this to the contrib space, as it should, since each site has different needs. However, the lack of an adopted contrib method for achieving image captions was a bit surprising.

With Drupal 7 the media module is used to handle media. No problem, however it doesn’t do anything to allow for automatic captions to appear. However, it does allow us to show users when they upload an image that an alt tag is a good idea and a title tag can be used. Most auto-caption techniques rely on that title tag to be used as the caption and you show it with a bit of javascript and CSS.

My goal for the end user was to have them get captions for free but have the ability to turn them off. I do not want them to assign a special class for a caption to appear because in my use case, the majority of folks want the captions. However, to disable a caption I want a fairly straight forward method that can be accomplished in the WYSIWYG editor.

To make this work I leveraged several contrib modules and now have it working except it still will not automatically show in the WYSIWYG editor. That last issue seems to be somewhere that improvements can still be made.

Ingredients (List of Modules):

  • Media Module 7-x.1.2
  • Insert
  • Image Caption
  • WYSIWYG with the CKeditor Library
  • HTML Purifier (Not needed if you allow full HTML)
  • Any dependencies of the above modules, i.e. ctools, views, etc…

Configuration:

Go ahead and download the modules and install them on your site whatever your preferred method. You can enable them as well.

Now, most of these modules auto-configure themselves. For this example we will use the basic page content type but add an image field.

Basic Page content type
Basic page content type configuration screen.

Notice that we use the image widget which is augmented via the media module. The next screen we need to edit is the images field. Make sure to check the Enable Alt field and Enable Title field.

The alt and title field checkboxes are checked.
Don’t forget to enable the alt and title fields.

Right below those check boxes, if you have the Insert module enabled you will see a collapsed field labeled insert. Expand it. Check the Enable Insert button check box. Choose the styles you want to make available to your users. Add the word “caption” without the quotes to the Additional CSS Classes text field. This will add the caption class to every image inserted into your nodes. This makes the caption magic happen automatically, as long as you fill out the title field with each image, because the image caption module looks for the class caption on all images.

The insert configuration screen.
Enable the insert button, choose some styles, and add caption to the classes field.

Make sure you have the image caption module enabled and let’s make a new test node.

Go to Content -> Add Content -> Basic Page and title your new node to test the image caption.

Then go down to your image field and upload a new image or graphic. Fill in the alt field and the in the title field add the text you want for your caption. Click the insert button near the style dropdown menu and the image appears in your post.

An image field being configured in Drupal 7.

Now, click the preview button and you will see the caption appear beneath your image. Styling the caption class is up to you.

 

A picture of the author with a caption below.
Look ma’ a caption!

Fairly awesome.

Why this approach:

OK, so why did I decide to do it this way? There are a few other modules, notably jCaption. You could also make each image a node and then attach a caption field to the image. That approach seemed unrealistic as then I would have to easily allow authors to import nodes, into their post in an easy manner. However, the author would have to create at a minimum two nodes/entities just to create a page with one image. That doesn’t entice many people.

jCaption looks interesting except that you cannot turn off captions. Anything with a title attribute gets a caption. Sometimes, captions are not appropriate but people still want the contents of the title attribute to appear on mouseover. With the image caption module because the caption is controlled by a class, the user can edit the image in their WYSIWYG editor and remove the class. In the next image you can see the caption class has been removed, meaning no caption will appear. This gives control to the page creators which is a fundamental goal of CMS.

The advanced property screen of the CKeditor image window.
No caption class means no caption accompanying the image.

Improvements:

I am happy with this approach except for the fact that users cannot see the captions directly in the WYSIWYG. It would be fantastic if that were possible and it will require more research. Since the caption appears because of jQuery we would have to utilize a drupal behavior to fire whenever an image is inserted and then with ajax save the state of the page and add in the caption. It sounds messy.

I wish there was an easier way for users to disable the caption as well. It is not hard to go into the properties of an image but it would be great if they could just click the image and remove the caption class via a dropdown menu or contextual editor.

Overall:

This seems to be a robust approach that helps the user by minimizing the knowledge and time needed to add captions. I need to find a good way to alert them of how to remove a caption, but I am hopeful for the use of this technique.

New themes and Concrete 5

As you may have noticed, I have switched the theme on the blog to something other than the default WordPress install. I did this in anticipation of eventually getting my Google AdWords campaign back running at the bottom of the page.

Concrete 5 Logo
Concrete 5 Logo

Along with the new theme I installed Concrete 5 on the Linux server to evaluate it and eventually move my site to the software. Concrete is a Content Management System that I believe has great promise. It balances the need for attractive front ends on websites and allows for powerful customization ala PHP. It is straightforward out of the box too. Check out my default install. The link will open the Concrete site in a new window. I applied one of their themes to the default site but have not yet done anything with it.

Installation was extremely straightforward, possibly even easier than installing WordPress. The goal with Concrete will be to integrate my Facebook information, blog posts, and any other services that I use with OpenId authentication. I want it to be easy for my friends and family to check out what I am up to when I am away this summer wrapping up my student teaching.

I am very impressed with the Concrete product and am excited to start making it my own.

Using Dynamic Media in the classroom

Citation: Bull, Glen & Garofalo, Joe. (2009). Dynamic Media. Learning & Leading with Technology, (36, 5), 40-41.

Summary: Dynamic Media consists of six characteristics, Cultural: media that can be remixed, shared, and is social. The authors use YouTube as an example of Cultural Dynamic Media. You can post video, share it with others, and rate the videos themselves. Google Earth is an example of technical Dynamic Media: Interactive, Multilayered, and Mobile. This new media needs to be used in the classroom to engage students and encourage them to gain a deeper understanding of the content.

Response: Before reading this article I did not really consider interactive applications such as Google Earth as dynamic media. The piece mentions mashups, that was my initial thought of dynamic media when scanning the article. After a thorough read the shift towards Dynamic Media is great. As more and more portable devices that can connect to the internet become available, this type of media will be more useful. Imagine a lesson where you as a teacher post a google earth route that students need to follow. Along the way they need to collect evidence of where they have been. Aggregating data from several sources the students can add to the path you created. At the end of the lesson you can fly through the route and record it as a movie and have each student explain what they found and why they chose to include it on the trip. That is interactive and engaging. The author’s mention a book titled Remix by Lawrence Lessig. Lessig discusses, ” ‘interest-based’ learning.” This type of learning is possible with dynamic media. I encourage all future educators to read this article and let your imagination go wild.

Information Literacy – Paramount to deep understanding

Citation: Diana, G. Oblinger and Brian, L. Hawkins(2006). The Myth About Student Competency Our Students are Technologically Competent. Retrieved March 03, 2009, from http://connect.educause.edu/Library/EDUCAUSE+Review/TheMythAboutStudentCompet/40622

Summary:
Oblinger and Hawkins assert that students must be trained in information literacy, not just technological competency. Most students already posses the tech competency but need help learning how to filter the massive amount of data that they can access via the computer. They pose 5 strategic questions for us to consider.

  1. What skills do students and faculty need in a digital world?
  2. Do we have an operative definition of IT literacy?
  3. Do we help students acquire the skills they need?
  4. Is IT literacy integrated across all units?
  5. Do we know how well we are doing?

Response:
I think the last question should be answered before addressing the prior 4. The importance of developing a measuring system is important because what needs to be taught is dynamic in IT. Focusing on Information Literacy, this fluidity which is IT, can be constantly revisited without having to rework the metric. Since IT is fluid, the evaluation system needs to be fluid as well. Possibly a set of authentic tasks could be presented to the student and using the appropriate technology and literacy skills, an answer could be formulated. Again, due to the rapid change in IT, understanding of the concepts and skills should be sought, not raw answers that may not be constant from one day to the next.
Doing this would allow teachers to integrate technology in ways that are authentic to their discipline and not superficial. In this way we help students achieve the skills they need in the content area we can honestly help them with.
Questions 1 & 2 are both nebulous and could be debated for years, I will leave them to others to shed light upon.

MISESS – An interesting project

Citation: Zuhal Tanrikulu (2006). MISESS: Web-Based Examination, Evaluation, and Guidance. Retrieved March 02, 2009, from http://connect.educause.edu/Library/EDUCAUSE+Quarterly/MISESSWebBasedExamination/39955

Summary:
The MISESS system is outlined and the design considerations are discussed in this article. Systems design is difficult and Tanrikulu does a nice job of touching on the main considerations he and his colleauges went through while designing this system. MISESS really was a pre-cursor to the types of course management systems that now exist. It is always good practice to evaluate past attempts at system design before embarking on a new system.

Response:
MISESS – The Management Information Systems Electronic Support System is a very cool idea. As described it sounds similar to Blackboard or Moodle with the additional feature of the Guidance Subsystem which allows instructors to link course notes to the questions on an exam. If you get it wrong, you can look at why you got it wrong rather than just knowing you missed points. I think that is a great feature and would be interested to find out whether Blackboard or Moodle currently support such a feature. MISESS seemed very cumbersome for the System Administrators, it seemed counter-intutitive to have them enter all the info. The students and instructors could do it just as effectively. 1000 data entries is mind-numbing. Errors were bound to creep in. I could not find mention of MISESS on the University of Boun’s website. Perhaps it was not scalable enough or modular enough running on Access, to succeed. It would be interesting to see the full table design of the system, the article leaves alot to the imagination. If the Guidance Subsystem does not exist in other education CMS’s I hope it is added.