Jefferson's Newspaper

A blog about information, education, and the (digital) humanities...

Deco, an Omeka Theme

themeDeco is a free theme for Omeka. Though I started working on an Omeka theme for use by a more general audience and without any particular motivation beyond having a lame sense of fun, as I got going, I realized it might be really useful for the group of social studies teachers with whom I’ve been working this past week. As part of a grant-funded workshop, the teachers needed to start their own WordPress- and Omeka-based websites (for use in their classrooms). As you might expect, none of the teachers had experience with such things. After an arduous 4 hour workshop in which the group got all of their hosting plans purchased and sites installed and configured, we kind of slowly came to a realization that there was still foundational work to be done. Though Omeka is quite user friendly, it’s still best managed (in a self-hosted environment that is), by users having at least some experience with and understanding of web publishing. (omeka.net is a great hosted alternative by the way, and works much like wordpress.com, but for various reasons was not right for our project). And so the scope of this little side project grew as I tried to anticipate some of the problems novice users might encounter.

For one, Omeka’s publicly available themes sometimes seem lacking when combined with certain plugins. Each of the available themes is quite nice on its own terms and perfect for building out by experienced users (in fact, this theme is built on the very excellent Berlin theme by Jeremy Boggs and Ken Albers), but even for those with a moderate amount of design and coding knowledge, changing things up can be daunting, requiring a lot of time querying the forums, and browsing the documentation. I knew that most of the teachers would be using a set of plugins that require additional styling and code insertion and so I tried to prepare the theme with as much plugin-specific styling and conditional templating I could so that they would not have to fool around too much. The most common needs should hopefully be addressed by the core templates and through the many configurable theme options

This is my first public theme and it’s been quite an experience thinking through all the possible use cases. I think I have accounted for the most common possibilities, but it’s possible something could still come up and present a problem: there could be errors to debug, display problems in older browsers, poorly formed functions, etc.. Thus, I’m calling this version 0.9, just to be safe, but I think it is certainly usable at this point. Nevertheless, the usual “no warranty” caveat applies.

Deco theme for Omeka

Designed for: Omeka Version: 2.0+

Browser tested in: Internet Explorer 8+, and current versions of Firefox, Chrome, Safari, and Opera

License: GPL

Unique Features:

  • Featured Item slideshow on homepage (jQuery, Awkward Showcase)
  • Lightbox effect for images on items/show (jQuery, FancyBox)
  • Built in support for HTML 5 Video with Flash fallback (VideoJS, Flowplayer)
  • “Edit this Item” button on items/show
  • Add an RSS feed anywhere on your site using the deco_display_rss($feedUrl,$num) function (uses Zend RSS, note that using this function may lead to slower load times)
  • Configurable theme options
    • stylesheet-switching with 4 designs in the initial version (plus a custom.css option for advanced users)
    • user-defined tagline
    • user-defined “About” text on the homepage
    • user-defined number of recent items to display on the homepage
    • toggle lightbox on items/show
    • toggle slideshow on homepage
    • toggle “Random Featured Collection” on homepage
    • toggle images with “Random Featured Collection” on homepage
    • toggle theme credits in footer
  • Built in support for common plugins
    • Exhibit Builder (CSS styles)
    • DocsViewer (ideal placement in items/show if user does not choose the default embed on items/show option)

Known Issues and Planned Improvements

  • ISSUE: Conflict with Image Annotation plugin breaks the gallery and fancybox scripts.
  • PLANNED IMPROVEMENT: Additional stylesheet choices (better, more varied)
  • PLANNED IMPROVEMENT: Let users configure or at least turn off HTML5 video options in theme settings.

Download Deco [GitHub]

Author:

Category: Education, Themes

Tagged: , , , ,

24 Responses

  1. David says:

    Hi! I’ve tried to install your theme on my brand new Omeka installation, but I’m running into some troubles. When I install the theme, the site crashes on load and all I get is the following error message: “Fatal error: Call to undefined function queue_css() in /home/dmorgen36/davidmorgen.com/themes/deco/common/header.php on line 14″

    When I install one of the default themes, which all seem to work just fine, and view the source code, it shows a file structure that looks like this instead: “http://davidmorgen.com/themes/…”

    Is this about the autodiscovery of the file structure in header.php? Any idea how to fix it? This is my first time playing around with Omeka, though I’ve done some WordPress installs and customized themes before. I suspect I’m missing something pretty basic, but after an hour or so fiddling with things, I haven’t figured out what’s going on.

  2. E. Bell says:

    Hi David, I believe queue_css() is new to Omeka 1.3, so it’s likely your site is running an older version. Can you check to verify that you are running 1.3 (it should be listed in the dashboard)?

  3. David says:

    I’m running 1.2.1. I am hosted on Dreamhost, and that’s the latest version that they offer, so they told me that I had the most up-to-date version but now I see that Omeka’s on 1.3.2. Ok, off to update now, and hopefully that’ll fix things. Thanks!

  4. David says:

    Updating to the latest version of Omeka fixed it! Thanks!

  5. John Oakley says:

    Hi David,
    I have just tried to install Deco on a clean copy of Omeka 1.4 and I get an error when I tried to activate it. I get the following trace (Omeka is installed in wingart):
    ….

    2011-06-24T22:36:46+02:00 DEBUG (7): SELECT `s`.* FROM `omeka_simple_pages_pages` AS `s`
    2011-06-24T22:36:46+02:00 DEBUG (7): REPLACE INTO omeka_options (name, value) VALUES (?, ?)
    2011-06-24T22:36:46+02:00 ERR (3): exception 'Zend_Config_Exception' with message 'syntax error, unexpected BOOL_TRUE in /opt/lampp/htdocs/wingart/themes/deco/config.ini on line 79
    ' in /opt/lampp/htdocs/wingart/application/libraries/Zend/Config/Ini.php:181
    Stack trace:
    #0 /opt/lampp/htdocs/wingart/application/libraries/Zend/Config/Ini.php(201): Zend_Config_Ini->_parseIniFile('/opt/lampp/htdo...')
    #1 /opt/lampp/htdocs/wingart/application/libraries/Zend/Config/Ini.php(125): Zend_Config_Ini->_loadIniFile('/opt/lampp/htdo...')
    #2 /opt/lampp/htdocs/wingart/application/forms/ThemeConfiguration.php(54): Zend_Config_Ini->__construct('/opt/lampp/htdo...', 'config')
    #3 /opt/lampp/htdocs/wingart/application/libraries/Zend/Form.php(240): Omeka_Form_ThemeConfiguration->init()
    #4 /opt/lampp/htdocs/wingart/application/controllers/ThemesController.php(47): Zend_Form->__construct(Array)
    #5 /opt/lampp/htdocs/wingart/application/libraries/Zend/Controller/Action.php(513): ThemesController->switchAction()
    #6 /opt/lampp/htdocs/wingart/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('switchAction')
    #7 /opt/lampp/htdocs/wingart/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #8 /opt/lampp/htdocs/wingart/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #9 /opt/lampp/htdocs/wingart/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #10 /opt/lampp/htdocs/wingart/application/libraries/Omeka/Core.php(166): Zend_Application->run()
    #11 /opt/lampp/htdocs/wingart/admin/index.php(45): Omeka_Core->run()
    #12 {main}

    The config.ini line 79 is:
    docs_viewer_placement.options.description = “Display embedded Docs Viewer at the top of items/show? NOTE: Somewhat unintuitively, you will need to disable the “embed on public items show pages” option in the Docs Viewer plugin configuration for this to work. Otherwise the plugin will default to the bottom of the page, per Omeka’s usual behavior, using the plugin_append_to_items_show function. Suggested dimensions are 600px (width) x 500px (height).”

    Help would be appreciated..

  6. E. Bell says:

    I’ll post an update as soon as I get a chance to check out Omeka 1.4. Sorry about that.

  7. John Oakley says:

    David, don’t apologize. I’m just thankful that you have produced the package and documented it so extensively via your blog. Anything beyond is a bonus. I’d like to delve into the problem myself but I’m fighting a couple of other fires.

  8. E. Bell says:

    Hi John, looking at your error details, it seems like this is an issue with your Zend library. I’ve upgraded my development installation to Omeka 1.4 and (despite some upgrade issues relating to my server host), everything seems fine. How did you go about upgrading Omeka? Some FTP clients (like FileZilla) don’t properly overwrite old files (they do something closer to a merge), so you will want to make sure your install is totally clean and not containing any older files. Either way, you might want to consult the Omeka.org forums on this one as Zend issues are mostly over my head.

    Nevertheless, you may still want to download the latest version of Deco above, as there was in fact a conflicting function in custom.php that had to be removed (I’m guessing you figured that part out on your own since you didn’t mention it… that was the only change in this version so if you already fixed it, no need to re-install).

    Best — Erin

  9. Hi Erin,

    Similar problem to John’s. I’m running Omeka 1.4.1 with Deco version 0.9.6.2:

    Zend_Config_Exception
    syntax error, unexpected BOOL_TRUE in /home/d554431/public_html/omeka/themes/deco/config.ini on line 79

    Back Trace

    exception 'Zend_Config_Exception' with message 'syntax error, unexpected BOOL_TRUE in /home/d554431/public_html/omeka/themes/deco/config.ini on line 79
    ' in /home/d554431/public_html/omeka/application/libraries/Zend/Config/Ini.php:181
    Stack trace:
    #0 /home/d554431/public_html/omeka/application/libraries/Zend/Config/Ini.php(201): Zend_Config_Ini->_parseIniFile('/home/d554431/p...')
    #1 /home/d554431/public_html/omeka/application/libraries/Zend/Config/Ini.php(125): Zend_Config_Ini->_loadIniFile('/home/d554431/p...')
    #2 /home/d554431/public_html/omeka/application/forms/ThemeConfiguration.php(54): Zend_Config_Ini->__construct('/home/d554431/p...', 'config')
    #3 /home/d554431/public_html/omeka/application/libraries/Zend/Form.php(240): Omeka_Form_ThemeConfiguration->init()
    #4 /home/d554431/public_html/omeka/application/controllers/ThemesController.php(70): Zend_Form->__construct(Array)
    #5 /home/d554431/public_html/omeka/application/libraries/Zend/Controller/Action.php(513): ThemesController->configAction()
    #6 /home/d554431/public_html/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('configAction')
    #7 /home/d554431/public_html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #8 /home/d554431/public_html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #9 /home/d554431/public_html/omeka/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #10 /home/d554431/public_html/omeka/application/libraries/Omeka/Core.php(166): Zend_Application->run()
    #11 /home/d554431/public_html/omeka/admin/index.php(45): Omeka_Core->run()
    #12 {main}

    The config.ini line 79 is:
    docs_viewer_placement.options.description = “Display embedded Docs Viewer at the top of items/show? NOTE: Somewhat unintuitively, you will need to disable the “embed on public items show pages” option in the Docs Viewer plugin configuration for this to work. Otherwise the plugin will default to the bottom of the page, per Omeka’s usual behavior, using the plugin_append_to_items_show function. Suggested dimensions are 600px (width) x 500px (height).”

    Anything you can suggest would be a great help.

    Kind Regards,

    Garret

  10. E. Bell says:

    Hi Garret,

    A couple questions:

    Do you have the Google Docs viewer plugin installed and activated and if so, which version?

    Does it still throw the error if you turn that option to “no” in the theme settings?

    Have you tried changing the plugin settings to see if that makes a difference?

    I haven’t been able to replicate this problem so far, so let me know.

    Thanks — Erin

  11. Deirdre O'Regan says:

    Hi! Deco is a really nice theme for Omeka, thanks!

    I am working with Garret, and we have now fixed the bug discussed above. So, config.ini line 79 was:

    docs_viewer_placement.options.description = “Display embedded Docs Viewer at the top of items/show? NOTE: Somewhat unintuitively, you will need to disable the “embed on public items show pages” option in the Docs Viewer plugin configuration for this to work. Otherwise the plugin will default to the bottom of the page, per Omeka’s usual behavior, using the plugin_append_to_items_show function. Suggested dimensions are 600px (width) x 500px (height).”

    The problem for us were the double quotes surrounding “embed on public items show pages”. Changed these to single quotes (‘), and now everything works fine. So changed to:

    docs_viewer_placement.options.description = “Display embedded Docs Viewer at the top of items/show? NOTE: Somewhat unintuitively, you will need to disable the ‘embed on public items show pages’ option in the Docs Viewer plugin configuration for this to work. Otherwise the plugin will default to the bottom of the page, per Omeka’s usual behavior, using the plugin_append_to_items_show function. Suggested dimensions are 600px (width) x 500px (height).”

    Removing or escaping them would probably work either!

    Kind regards,

    Dee

  12. E. Bell says:

    Thanks Dee, I’ve updated deco to 0.9.6.2 (yeah, I’m not very good at version naming). Great catch, I wonder why it didn’t throw an error on my server(s).

    Anyway, you can download here: http://jeffersonsnewspaper.org/wp-content/uploads/2010/12/deco-0.9.6.3.zip (the only change is that one line in config.ini, so it’s probably easier to just edit that file directly).

  13. Deirdre O'Regan says:

    Hi Erin,

    I have another query.. this time about the Awkward Showcase slider on the homepage of Deco (which looks SO lovely that I MUST have it there!). Does it have an upper limit to the amount of Featured Items it can showcase?

    We have been using Deco for a site with over 3,000 Still Images. All of these were uploaded as “Featured” using the CsvImport plugin, but this seemed to break the Deco homepage. I know it is a AS slider issue since turning that off fixes everything otherwise.

    After much ado, I’ve figured out that I can feature about 10 images from our archive safely without the slider breaking. Any more and it messes up the homepage – this seems to be an issue with style / space on the page – looks like divs end up encroaching on others and the “Recent Items” list gets pushed down the page. But really weirdly, after about 6 browser refreshes everything looks ok (but will break again on the next refresh!)

    Is there something really obvious I am overlooking here? Is it a hard-coded upper limit on the number of Featured Items allowed, and if so, can that be changed?

    Thanks very much!

    Dee

  14. E. Bell says:

    I’ll look into this before releasing v 1.0. In the meantime, if you want to check it out yourself, though, the Awkward Showcase documentation is available at:

    http://www.awkwardgroup.com/sandbox/awkward-showcase-a-jquery-plugin/

    Please share any improvements.

    I do have one question, which I don’t have time to investigate at the moment.

    In custom.php around line 59, do you see the following?

    function deco_display_awkward_gallery(){
    //this loops the most recent featured items
    $items = deco_get_random_featured_items(10);

    Changing the number should limit the total items returned, e.g. setting it to deco_get_random_featured_items(15) should only return 15 items. By default, I think it’s set to return only 10, so I’m wondering if you are seeing something different or if you edited that to something much larger.

    Anyway, again, let me know, and thanks for the feedback. I hope to iron out all the bugs, etc. sometime soon and get this listed at omeka.org.

  15. Deirdre O'Regan says:

    Hi Erin,

    I have just done some investigating and I am baffled. My Awkward Showcase is working perfectly now.

    Thanks so much for pointing that line of code out to me – I increased $items = deco_get_random_featured_items(10) from 10 to 25. Increasing this any more than 28 it looks silly since the little bullets below run beyond the AS screen in deco default width.

    I then featured loads of items (100) and it seemed to work fine! So, I checked with $items = deco_get_random_featured_items(10) again, and… it seemed to work fine! :o

    I am stumped. But at least I can have 25 images featured in my slider now so thanks anyway! If I figure out what the (probably unrelated) issue was, I’ll report back!

    Kind regards,

    Dee

  16. Deirdre O'Regan says:

    Hi Erin,

    Apologies, but I spoke too soon! The featured items were changed by an Administrator user of our site, and now my homepage is messed up again due to the Awkward Showcase (AS) slider. However, I think that I have some useful analysis for you. With regard to our particular instance of Omeka+Deco, it seems that:

    - One item must be featured individually before Items are batch/bulk featured (i.e. featured in bulk using the “Edit Selected Items” facility in the Admin interface). If the Featured Items list goes from nothing to many all at once, the AS breaks somehow and messes up the page.
    - If Items are then featured (either batch or individually) by another user (in our case an Administrator, where I had previously featured Items as the Super), the AS breaks in the same way.

    When the page broke, I ran it through the W3C XHTML Markup Validater and I think that the following error may be related to the problem:

    Error Line 78, Column 23: document type does not allow element “style” here

    #showcase,.showcase, h2.awkward{display:none; visibility…

    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements — such as a “style” element in the “body” section instead of inside “head” — or two elements that overlap (which is not allowed).

    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s “self-closing” tags for “meta” and “link” in the “head” section of a HTML document may cause the parser to infer the end of the “head” section and the beginning of the “body” section (where “link” and “meta” are not allowed; hence the reported error).

    Further errors from the Validator suggest that whatever is happening produces an improperly nested hierarchy (i.e. perhaps a is not being closed off somewhere as a result of the issue).

    Im hoping that some of this information might highlight our problem and perhaps reveal an easy bug fix? In the meantime, we are trying to keep featured item manipulation to the Super user.

    Kind regards,

    Dee

  17. Deirdre O'Regan says:

    I noticed that the last post stripped some of my HTML! Second last sentence should read:

    Further errors from the Validator suggest that whatever is happening produces an improperly nested DIV hierarchy (i.e. perhaps a DIV is not being closed off somewhere as a result of the issue).

    Thanks a million,
    Dee

  18. leeann says:

    I love this theme–it’s creative and versatile.

    I’m running Omeka 1.4.1; deco: 0.9.6.2.

    I’ve run into a problem though–also with the awkward slider on the home page. My site is just underway, and after adding roughly a dozen image files today averaging about 2MB each, the slider stopped working and featured collections, featured exhibit and the entire right sidebar disappeared on the home page.

    Based on the comments above, I gradually reduced the number of items in the slider, but found the page will only work if one item is featured. As above, divs encroached each other’s space. I’m guessing that may be because of the size of the files?

    I too, ran the validator and received the same message as Deidre O’Regan. I’ve reduced the number of featured items to show to three and reduced the number of selections in Omeka admin to six, the selections became erratic: some worked and the entire page displayed as it should. With the larger files, however, the abovementioned site divs disappeared and the slider ground to a halt.

    Now, I’ve selected only three items as featured items. None of them are the larger files and the slider works just fine. Is it likely, then that the issue is simply one of file size–if the fullsize image is too large, the slider can’t cope?

    Thanks, though, again for this theme, Lee Ann

  19. Geoff says:

    Just wanted to say thank you. This theme was the answer to my struggles with trying to add a slideshow and lightbox to one of the default Omeka themes. I’ve found it really easy to customise and a pleasure to use. Many thanks indeed!

  20. salvador says:

    Thank you for all you work with this theme. I am working on several projects and this is exactly what I need to make best use of omeka’s explorability potential.

  21. Jonathan says:

    Hi,

    This theme looks ideal for setting up the type of gallery we are looking for. But I have a couple of questions – and I’m new to Omeka…

    When using the lightbox can we change the text that comes up at the bottom? At the moment it is the title of the whole item, can it be for each file? (assuming we have all our images in one item)

    Or – is it possible to use the light box function to skip between different items. (assuming each of our images is a separate item)

    Thanks for any help,
    Jonathan

  22. E. Bell says:

    Hi Jonathan,

    You can customize that text in the file items/show.php around line 81.

    Where it says ‘title’ => item(‘Dublin Core’, ‘Title’)), just replace the item(‘Dublin Core’, ‘Title’) part with the text or function you would like to use for the image caption title.

    For example, I replaced this…

    item('Dublin Core', 'Title')

    with the variable $caption, defined right above the if statement like so…

    $caption = (item_file('Dublin Core', 'Title')) ? item_file('Dublin Core', 'Title') : item('Dublin Core', 'Title');

    The end result looks something like this:


    $caption = (item_file('Dublin Core', 'Title')) ? item_file('Dublin Core', 'Title') : item('Dublin Core', 'Title');
    if (($file->hasThumbnail()&&($index == 0)&&(item_file('MIME Type')!=='image/tiff')))
    echo 'Click the image to launch gallery view'.display_file($file, array('imageSize'=>'fullsize','linkAttributes'=>array('rel'=>'fancy_group', 'class'=>'fancyitem','title' => $caption)),array('class' => 'fullsize', 'id' => 'item-image'));
    elseif (($file->hasThumbnail()&&($index !== 0)&&(item_file('MIME Type')!=='image/tiff')))
    echo display_file($file, array('imageSize'=>'square_thumbnail', 'linkToFile'=>true,'linkAttributes'=>array('rel'=>'fancy_group', 'class'=>'fancyitem','title' => $caption)),array('class' => 'square_thumbnail'));

    The end result uses any text entered in the title field for the individual file, falling back to the item name where no custom title has been entered.

  23. E. Bell says:

    I’ve updated the theme on GitHub as this seems generally useful:

    https://github.com/ebellempire/Deco/zipball/master

  24. Jonathan says:

    Bravo! I think this is just what I needed. Will check it out and report back. Thanks, Jonathan

Leave a Reply