Customizing your publication - Calaméo Knowledge Base
Not a Calaméo member yet?
Sign up now! It's FREE!
Get the latest news on Calaméo
Follow us on Facebook
Get Calaméo updates in real-time
Follow us on Twitter

Customizing your publication

From Calaméo Knowledge Base

Available options to customize your self-hosted publication.

We are currently working on this page. Please come back later.

Contents

Publication

The data/book.js file contains all the publication properties formatted as JSON (Javascript Object Notation).

Parameter Type Description
url.public string URL of the publication overview page
url.view string URL of the publication reading page
url.image string URL of the publication cover
url.thumbnail string URL of the publication thumbnail
social.facebook string Template for the "Share on Facebook" URL
social.twitter string Template for the "Share on Twitter" URL
social.embed string HTML embed code for the publication
document.view string Default view for the publication. Can be either book (pageflip), slide (slideshow) or scroll (vertical scrolling)
document.direction string Reading direction. Can be either left (left to right) or right (right to left)
features.mini.enabled boolean Is the mini mode allowed. Can be either true or false
features.mini.allowswfpages boolean Display the SWF pages instead of the thumbnails in mini mode. Can be either true or false
features.mini.allowskin boolean Allow the skin to contains mini specific designs. Can be either true or false
features.localization.url string Path for the localization files
features.localization.fallback string Fallback path for the localization files in case the default one is unreachable
features.localization.allowexternalurl boolean Allow to pass a localization file URL directly in the publication parameters
features.share.enabled boolean Define if the share features are enabled. Can be either true or false
features.links.enabled boolean Defines if the links are enabled. Can be either true or false
features.links.url string URL of the Javascript file containing the links data
features.links.fallback string Fallback URL of the Javascript file containing the links data in case the default one is unreachable
features.download.enabled boolean Defines if the download is enabled. Can be either true or false
features.download.url string URL of the original document for download
features.print.enabled boolean Defines if the printing options are enabled. Can be either true or false
features.related.enabled boolean Defines if the related button is enabled. Can be either true or false
features.related.url string URL of the Javascript file containing the related publications data
features.related.fallback string Fallback URL of the Javascript file containing the related publications data in case the default one is unreachable
features.search.enabled boolean Defines if the search button is enabled. Can be either true or false
features.search.minlen string Minimum length for search query
features.toc.enabled boolean Defines if the table of content button is enabled. Can be either true or false
features.toc.url string URL of the Javascript file containing the table of content data
features.toc.fallback string Fallback URL of the Javascript file containing the table of content data in case the default one is unreachable
features.skin.url string URL of the skin
features.skin.fallback string URL of a fallback skin if the first one is unreachable
features.background string URL of a background image
features.music.url string URL of a background audio file. Can be a MP3 file or a SoundCloud track
features.music.mode integer Defines if the background audio file is looping or not. Can be either 0 (looping) or 1 (no looping)
features.sfx.url string URL of a sound effect audio file triggered when the page flips. Can be a MP3 file or a SoundCloud track
features.sfx.mode integer Defines if the sound effects are played or not. Can be either 0 (not played) or 1 (played)
features.audio.soundcloud.clientid string To be able to use Soundcloud tracks, you will have to get a Soundcloud client ID
We strongly recommend using the Calaméo website to configure your publication before buying a self-hosted version.

Table of content

To modify or create a table of content, add this XML code in the data/book.xml file before the </Book> statement:

 <Toc>
    <Item level="..." nr="..." /><![CDATA[Entry label for page 1]]></Item>
    <!-- Add as many Item statement as you like -->
</Toc> 
Attribute Required Type Description
level yes integer Hierarchy level of the item
nr yes integer Page number associated with the item
We strongly recommend using Calaméo Table of content editor before buying your self-hosted publication.

Links and rich-media

To add links and rich-media to your publication, add this XML code in the data/book.xml file before the </Book> statement:

<Links>
    <Link nr="..." type="..." sx="..." sy="..." ex="..." ey="...">
        <to>URL</to>
        <text><![CDATA[Link label]]></text>
    </Link>
    <!-- Add as many Link statement as you like -->
</Links> 
Attribute Required Type Description
nr yes integer Page to display the link
type yes integer Type of link: 1 (external), 2 (internal), 3 (MP3 file), 4 (SWF file), 5 (e-mail), 6 (FLV video file), 7 (YouTube video)
sx yes integer Left coordinate of the link box. Starting from the upper left corner of the publication
sy yes integer Top coordinate of the link box. Starting from the upper left corner of the publication
ex integer Right coordinate of the link box. Starting from the upper left corner of the publication. Optionnal for type 3 links (MP3 file)
ey integer Bottom coordinate of the link box. Starting from the upper left corner of the publication. Optionnal for type 3 links (MP3 file)
For YouTube links, use the following format: youtube:xxx where xxx is the video ID you will find in the video URL (?v=xxx).
We strongly recommend using Calaméo Link Editor before buying your self-hosted publication.

Related publications

The data/subscription.xml file lists alternative publications you can suggest to your users in the subscription panel of the publication.

Here is the format of the file:

 <?xml version="1.0" encoding="UTF-8"?>
<Subscription>
    <name><![CDATA[Panel title]]></name>
    <books>
        <book width="..." height="..." thumb="..." url="...">
            <name><![CDATA[Publication's name]]></name>
            <description><![CDATA[Publication's description (255 character maximum)]]></description>
        </book>
        <!-- Add as many book statement as you like -->
    </books>
</Subscription> 
Attribute Required Type Description
width yes integer Thumbnail width
height yes integer Thumbnail height
thumb yes integer Thumbnail URL
url yes integer Publication's absolute URL