Scripto : how to change the default viewer to UniversalViewer

Hi, I’ve just installed an Omeka 2.4.1 with the Scripto plugin. Everything is working fine (mediawiki account setting, saving transcriptions with the “edit” button, etc.). But, as I have also installed the UniversalViewer Omeka Plugin, I would really like to set it as the default viewer in my transcription page.

Any help? Thanks.

Copy the file index/transcribe.php in a new folder scripto in your theme, and adapt it to embed the universal viewer in place of the default viewer.

Thanks a lot for your help Daniel. Do I have to keep the same tree view organisation in the new scripto folder in my theme (themes/mytheme/Scripto/views/shared/index/transcribe.php), and duplicate the whole plugin, or just copy Scripto/transcribe.php?

You have just to copy the files you change, like for files of the core (application/views/scripts). If Omeka find a file in the theme, it uses it, else it takes the default one in the core. The name of the directory should be scripto/index.

Thanks a lot for your help.

Could you please elaborate a little bit on what you mean by

adapt it to embed the universal viewer in place of the default viewer’?

How would one go about this?

Hi Sam, would you mind letting us know about the steps to make this work? Many thanks!

In many cms, the default views can be overridden by the theme, so copy the file scripto/index/transcribe.php in your theme and change:

<!-- document viewer -->
<?php echo file_markup($this->file, array('imageSize' => get_option('scripto_file_source'))); ?>

by (eventually with options):

<!-- document viewer -->
<?php echo $this->universalViewer($this->file->getItem()); ?>

Thank you, Daniel. This does indeed display the item inside UV, but it displays all the pages (files) associated with the Item, and the page shown is never updated when I click on Scripto’s ‘next page’ button. UV merely reloads the whole Item.

  1. Is there a way to only have the current page displayed? (I tried using $this->file->getFile() but that did not work)

  2. As a more general problem, how could I get UV to display transcriptions for each page separately? What I mean is this: currently, only the Item level transcription is displayed for each page inside UV. This doesn’t change as I click through pages, and it can get out of hand quickly with documents that have many pages. Instead I’d only like to have the file/page level transcriptions displayed for each page, which would change as the user navigates through the pages inside UV.

Many thanks in advance!

Might this be helpful to you, Daniel?!topic/universalviewer/7yLvfvayy5s

There are two different things: UV can display a file alone, but a manifest is needed, and the plugin creates the manifest only for the item level (and for the collection level too), so currently, it’s not possible directly to display one file only: no $this->universalViewer($file).

Nevertheless, there are three solutions that can help currently:

  • use the filter uv_manifest, for example to remove all images except the one you want;
  • use an alternative manifest, that you can built it somewhere, and set the url in a field of the item;
  • try to modify something somewhere in uv to display the file only (the discussion).

The first solution is the easiest.

Dear Daniel,

Thank you for your lightning-quick answer. I’ve seen the uv_manifest filter reference on your GitHub page too, but there are no examples provided, so I’m not sure how should I go about using it. Would you be able to give me a rough idea if it doesn’t take too long?

Also, what do you think about number 2 in my previous question?

Many thanks,

A filter should be managed by a custom plugin.

Open a manifest that is created by the plugin (the url is /iiif/:id/manifest where id is the item id). The list of images is in sequences[0][canvases][…][service][images][0][resource][service][@id] (this is a multilevel array). So you can keep only the images you need, eventually change the number of images in the item and do some more tweaks, then return the filtered manifest.

To display transcription separately, the transcription may be save in one element related to the file or extracted from scripto, then included in the uv. But this is not ready by default and requires some work. This is mainly a question about UniversalViewer itself, so see on


Thank you, Daniel, I’ll try this.

FYI Daniel and pfabri, I am now trying to do this exact same thing for the Edison Papers project. I am experimenting with various themes, plugins, etc. but out of all the image viewers, clearly UV is the most desirable. When we have an item (document) in the TAEP collection that has many files (images = pages), it will not make sense to have the item displayed in UV with all files. Instead we need the same thing pfabri has described, a single image displayed in UV when on the transcription page. I am going to see if I can follow the directions about manifest manipulation here.

Peter, did you have any luck since this last post?

To manipulate the manifest and to remove images, the filter is “uv_manifest”.