Introduction

The Platform is an electronic books distribution platform developed by De Marque, puts a vast array of tools for the consultation and sale of online publications at your fingertips. To use these tools, you must connect your website to our gateways. This guide details the steps to follow to do so.

Currently, the gateways allow you to make use of three components:

  1. Collection of metadata for publications (sale price, author, release date, etc.)
  2. View publication excerpts (online viewer or PDF excerpt)
  3. Delivery service for secured electronic publications that could be linked to your electronic business.

These functionalities have been created with great attention to simplicity, so that the connection to the Platform can be made quickly. Do take note however that a basic knowledge of HTML is required. A good knowledged of CSS is also an asset to make the most of the page layout options offered by the Platform. Finally, a PHP/ASP or Ruby programmer, depending on your system, will be needed to setup the electronic publications delivery.

1 : Metadata Collection

The Platform's metadata bank will give you access to a range of information on a publication that you can display in your online catalogue in real time. To access this data, please follow these three steps:

1.1 : Connection to the Toolbox

First, your site must connect to the Platform. To do this, simply place the following code at the end of each page containing one or more publications. Make sure you place the code just before the tag </body>, and never add it to the same page more than once, even if the page contains more than one publication.

<script type="text/javascript"
src="http://[platform]/api/bridge.js?v=2&mid=[mid]&amp;l=[language]">
</script>

Once done, you must replace the two parameters, [mid] and [langue]. Here's their meaning:

Key Mandatory Description
platform Yes The platform that you're using to connect to your account. For example : www.entrepotnumerique.com, www.edenlivres.fr, edigita.cantook.net or transcontinental.cantook.net.
mid
Yes
Your company number on the Platform. This number is given to you when you register.
language

No

Data display language. You can choose between "fr" (French) or "en" (English). If this parameter is left blank, the French version will be used by default.

Congratulations! Your website is now connected to the Platform.

1.2 : Identify Publications

Now that your pages are connected to the gateway, a container must be setup to receive the data sent by the Platform. To do this, copy the following line to the place where you would like to see the data appear for a particular publication.

<div id="[platform_code]-wrap-[publication_id]" class="[platform_code]-wrap">[contents]</div>

Once again, you have two parameters to replace, [publication_id] and [contenu].

Key Mandatory Description
platform_code Yes The 4 letter code describing your Platform. For example : enqc, edgt, trco or eden
publication_id
Yes
EAN or ISBN13 of the publication. The identifier does not have to include "-". ISBN10s are not accepted.
contents

No

You can insert whatever you want into this tag. You can then place the tags managed by the gateway and retrieve metadata (see point 1.3). If you have data, graphic or other elements that you are not putting on the Platform, you can also insert them here.

Make sure to never insert a publication into another one. Example:

 * Do not do 
<div id="enqc-wrap-9781234567890" class="enqc-wrap">
<div id="enqc-wrap-9782222222222" class="enqc-wrap"></div>
</div>

In the case where the Platform does not contain this publication, the gateway will hide all tags inside "enqc-wrap" that are related to it. The gateway will not make any changes to the others tags.

1.3 : Retrieve Relevant Metadata

This is the final step, the metadata retrieval. You should choose, from the list of available metadata at the Platform (Annex 1), the information you would like to display on your page. Next, copy them into the tags described in step 1.2 (by replacing the "contents" parameters). The gateway will automatically fill the content of the tags with the system information, or will make them disappear if the publication does not exist.

For this step, you are at complete liberty to choose the metadata that interests you. You can place them in the order you want, make lists and tables, there is no limit.

1.4 : Example of Use

<div id="enqc-wrap-9781234567890" class="enqc-wrap">
<div class="details">

<span class="enqc-issued-on">&nbsp;</span>
<span class="enqc-authors-name">&nbsp;</span>
</div>
<div class="achats">
Buy <span class="enqc-title">&nbsp;</span> in PDF format
for only <span class="enqc-pdf-cost">&nbsp;</span>

</div>
</div>

Let's go over the example once again, line by line.

  • Line 1: The gateway will check that publication 9781234567890 exists. This line is the container that will contain everything related to that publication.
  • Line 2: Tag not managed by the gateway.
  • Line 3: Metadata. The gateway will replace its content with the release date.
  • Line 4: Metadata. The gateway will replace its content with the author(s)'s name(s).
  • Line 6: Tag not managed by the gateway.
  • Line 7: Text containing metadata. The gateway will replace the content of the span "enqc-title" with the title of the publication.
  • Line 8: Text containing metadata. The gateway will replace the content of the span "enqc-pdf-cost" with the sale price of the PDF version.

If the Platform does not contain the publication "9781234567890", lines 3 and 4 will be removed along with the tags "enqc-title" and "enqc-pdf-cost"

1.5 : Refresh DataOptional

In the case where, during AJAX calls, new publications are generated on your page, you can use the following method at any time to fill in the metadata for these new publications.

<script type="text/javascript">alveos_bridge.update('[scope_id]');</script>
Key Mandatory Description
scope_id
No
To improve performance, you can limit publications search fields to a particular element. To do this, you just have to replace "scope_id" with the ID of a page element. An empty value will result in a complete scan of the page.

2 : Publication Excerpts Consultation

For most publications, one or more excerpts will be made available to the general public to provide a content preview. These excerpts will be presented in the form of a browser application or a PDF file. You can give access to your clients by choosing one of the five formats below and then copy the code associated with your choice in the container described in section 1.2.

2.1 : Text Button/CSSType: Open a new window containing the viewer

This format will show you a simple hyperlink that you can personalize with CSS.

<div class="flipbook-text">[title]</div>
Key Mandatory Description
title
Yes
Link text. Example: View this publication

2.2 : CoverType: Open a new window containing the viewer

This format will display the publication cover. The cover is always 65 pixels wide.

<div class="flipbook-cover"></div>

2.3 : Miniature ViewerType: Viewer embedded in the page

This format will display a miniature, simplified version of the viewer. For improved performance, it is not recommended to display more than one viewer per page.

<div class="flipbook-mini" style=" 
background-color:#[color];width:[width]px;"></div>
Key Mandatory Description
color
Yes
Viewer's background color in hexadecimal format. Example: FFFFFF = White, 000000 = Black
width

Yes

Viewer size in pixels. The value should fall between 100 and 350.

2.4 : Full ViewerType: Viewer embedded in the page

This format will display the viewer's full version. For improved performance, it is not recommended to display more than one viewer per page.

<div class="flipbook-full" style=" 
background-color:#[color];width:[width]px;"></div>
Key Mandatory Description
color
Yes
Viewer's background color in hexadecimal format. Example: FFFFFF = White, 000000 = Black
width

Yes

Viewer size in pixels. The value should fall between 550 and 950.

2.5 : PDF ExcerptType: Download a PDF file

This format will show you a simple hyperlink that you can personalize with CSS.

<div class="[platform_code]-pdf-excerpt">[title]</div>
Key Mandatory Description
platform_code Yes The 4 letter code describing your Platform. For example : enqc, edgt, trco or eden
title
Yes
Link text. Example: Download the PDF excerpt

2.6 : Display the list of resseller in a popup window

<div class="resellers">[title]</div>
Key Mandatory Description
title
Yes
Link text. For example "Where to buy"

Appendix 1

To display metadata, you can use two elements: values and containers.

The values are metadata themselves (title, price, authors, genre, etc.) while containers are tags allowing you to display or hide content depending on its availability. The containers are very useful when the gateway does not find content associated with your structure (for example, no ePub for a publication), so that the client does not see a form full of blank fields.

The first example describes the simplest use of a value.

<div id="enqc-wrap-9781234567890" class="enqc-wrap">
<span class="enqc-pdf-cost">&nbsp;</span>
</div>
  • Line 1: The gateway will verify that the 9781234567890 publication exists. This line is the container that will contain everything related to that publication.
  • Line 2: Metadata. The gateway will replace its content with the sale price of the PDF version.

Here's another example describing the use of a container.

<div id="enqc-wrap-9781234567890" class="enqc-wrap">
<div class="enqc-wrap-pdf">
PDF version : <span class="enqc-pdf-cost">&nbsp;</span>

</div>
</div>
  • Line 1: The gateway will verify that the 9781234567890 publication exists.
  • Line 2: Container. In case the publication does not have an available PDF file, the container, and everything it contains, will be hidden.
  • Line 3: Text containing metadata. The gateway will replace the content of the span "enqc-pdf-cost" with the sale price of the PDF version.

This example clearly shows the importance of containers, because in the case where the PDF does not exist for publication 9781234567890, the text "PDF version:" will not be visible to the user.

Containers

Note that all the containers have the prefix "enqc-wrap-" but it has been removed in order to reduce the document size.

Key Description
pdf The PDF exists and is available for sale.
pdf-no-acs4 The PDF exists, is available for sale, and is not exclusively protected by the ACS4 DRM.
pdf-image-only The PDF has been created from images only.
epub The ePub exists and is available for sale.
epub-no-acs4 The ePub exists, is available for sale, and is not exclusively protected by the ACS4 DRM.
epub-image-only The ePub has been created from images only.
authors There is at least one author.
not-found The publication does not exist on the Platform.

Values

For each value, a container of the same name is associated. For example, the value "enqc-summary" has an associated container "enqc-wrap-summary". If the summary is empty, the container "enqc-wrap-summary" is hidden.

Note that all values have the prefix "enqc-", but it has been removed in order to reduce document size.

Key Description
title Main title
summary Summary
tags Content associated keywords
authors-name Author(s) full name(s)
language Publication language
translated-from Original language
pdf-cost PDF sale price
epub-cost ePub sale price