Topics: Floated Images | Images in Teasers | Resource links |Links Within Wiki Text | Encrypted E-mail | Example Markup | Flexible Tibetan Display
Note: This page describes only how to code the content of wiki pages that are included as the content of a teaser box and so forth. The description of how to create such a teaser box on a PHP page is found at Creating Teaser Boxes that Use Wiki Content.
In order for the wiki-import code to work, the wiki pages that are absorbed into the THL look-and-feel have to be formatted in the same way. There are two ways that wikis are imported into a THL page: into highlight (or teaser) boxes or as the complete contents of the page. However, the same basic rules apply to both instances. The basic rules for formatting wiki pages for inclusion in THL pages are:
{link:Extended Wylie|http://www.thlib.org/reference/transliteration/#essay=/thl/ewts/}
Two rules apply only to the use of wiki for spotlight boxes (tzr-box-1 and tzr-1):
The following sections deal with other topics relating to the markup of wiki pages for inclusion (via AJAX) into THL pages. Each topic is linked to from the topic list above for easy reference. Further topics will be added as the occasions arise.
Back to Top {anchor:fltimg}
Images in wikis can be floated within a THL page by wrapping them in a div with either the class "img-right-plain" or "img-left-plain". To do this, one uses the code {block:img-…-plain}…{block} code. An example of this using an image in collab:
{block:img-right-plain}{image:worksite:/THDL Toolbox Images/lamawriting.gif|lamawriting.gif}{block}
An example using an image on quandu:
{block:img-left-plain} {image:|/places/monasteries/sera/people/images/sera-ticket.jpg}Figure 1: A Sera Entrance Ticket from 2002. {block}
The teaser boxes, such as tzr-box1, often have small images at the top right-hand quadrant of the box. The URL for these images should be included at the bottom of the wiki page, marked up in the wiki as a link with the text of the link as "image" and the URL of the link as the URL for the image. For the time being, images are stored in the appropriate images folder on the regular THL site, and not in the wiki's resource section. In the future, once the Media Management System (MMS) is integrated into THL, all images can be stored there and the URLs will be configured accordingly. A caption that appears when the cursor is hovered over an image can be added in a caption block after the image. An example of an image wiki in a teaser box wiki would be:
{link:image|/encyclopedias/literary/images/sm-stacked-texts.jpg} {block:caption}A cabinet containing a collection of Tibetan texts{block}
The general size for such images should be around 120 x 120 px. Once the MMS is in action, the URL can ask for a specific size image.
Should you want the spotlight box or other teaser box to link to a resource other than the wiki page, the URL for that resource can be included at the bottom of the page within a block (div) whose class is set to "resource-link". This is done by including the link within {block:resource-link} … {block} wiki codes.
For either teaser boxes or whole wiki pages embedded in a THL context, URLs for resource links or images can be either absolute to the "http://www.thlib.org/…" site or relative to the staging site, http://staging.thlib.org/…". To include a relative link without using the {link: …} syntax you can simply use the word "DOMAIN" in place of the www.thlib.org as in:
{block:resource-link} http://DOMAIN/places/monasteries/sera/ {block}
Relative THL links can also be coded. Example:
{block:resource-link} {link:/places/monasteries/sera/} {block}
To link to a specific Place Dictionary record:
{block:resource-link} http://DOMAIN/places/polities/#iframe=http://places.thlib.org/features/15483 {block} {link:image|/places/polities/images/A2189.jpg}
PLEASE NOTE THAT IF THE LINK IS A DOMAIN LIKE PLACES.THLIB.ORG, YOU HAVE TO USE TWO SLASH MARKS (//) INSTEAD OF ONE AFTER LINK:!!
For links to wiki pages included within the THL page, use "WIKI", as in:
{block:resource-link} http://WIKI/access/wiki/site/881b357c-7a1a-49ce-80b5-009e07d50d63/mailing%20lists.html {block}
Note: if the URL for the wiki has spaces in it at the end, such as mailing lists, then replace the white space with %20 (as in the example above).
Note: if the URL for the wiki has an ampersand in it, such as /site/c06fa8cf-c49c-4ebc-007f-482de5382105/community & communication.html, then replace the ampersand with %26. This would then be:
{block:resource-link} http://WIKI/access/wiki/site/c06fa8cf-c49c-4ebc-007f-482de5382105/community%20%26%20communication.html {block}
Note that in the wiki page itself this link won't work, but when you open the thlib.org page into which the wiki content is delivered, the page will display (and in the URL the %26 will become |amp|).
For links to essay pages included within the THL page, use "ESSAY", as in:
{block:resource-link} http://ESSAY/cabezon/sera/monks/ {block}
Note: this will link to an essay page and change the links in the side column to the TOC for the essay. Should you want just the text of the essay in the body of the page without changing the side column links to the essay's toc, use "ESSAYPG", as in:
{block:resource-link} http://ESSAYPG/cabezon/sera/monks/ {block}
To link to an MMS page (the media management repository): the only way to do such links right now (Sept 26, 2011) is to link directly to production so
{link:Sera Monastery|http://mms.thlib.org/media_objects?category_id=4176&type=Picture}
To link to an MMS page (the media management repository) and keep the banner of the page you are linking from: the only way to do such links right now (Sept 26, 2011) is to link directly to production so
{link:Sera Hermitages|/places/monasteries/#iframe=http://mms.thlib.org/media_objects?category_id=4176&type=Picture}
To link to a page in SPT (the THL bibliographic repository), use "SPT" as the wiki constant, as in:
{link:PIATS 1|http://SPTHOME/SPT--BrowseResources.php?ParentId=1151}.
Note: this is how the Wiki page will display. However, in the actual code in the wiki page you need to insert a backslash before each of the two dashes.
Finally, the "Explore!" text used for these links can be customized by adding the custom text to the resource-link in the wiki. This is done by using the {link:text|url} wiki-command, and placing the desired link-text followed by a vertical bar (|) prior to the URL of the link. Example:
{block:resource-link} {link:View Degé Kangyur|/encyclopedias/literary/canons/dege-kangyur-cat.php} {block}
Should a wiki teaser contain links to a variety of resources, such links would be included within the text of the wiki that is used as the content for the teaser box. These take the normal wiki link form of:
{link:Link Text|URL of link}
such as:
{link:Monasteries Home|/places/monasteries/}
To get such links to open in a new window, append "|THLIB-NEWWIN/places/maps/" to the beginning of the URL as in:
{link:Monasteries Home|THLIB-NEWWIN/places/monasteries/}
Note: This is only for links within the text of a teaser box. As described elsewhere, the way to get a teaser box to link to a new window is by adjusting the PHP link to the teaser wiki and adding a class "o4" to it. See the page on Creating Teaser Boxes that Use Wiki Content.
Using the THL e-mail encryptor, one first creates the encrypted e-mail string and then adds a link such as:
{link:send e-mail|javascript:linkTo_UnCryptMailto('nbjmup;uimAdpmmbc/jud/wjshjojb/fev');}
Try this test e-mail link. For more information, see encrypted email links.
An example of a properly marked-up wiki page to be included in a spotlight is:
h6 [About THL | home] > [Features & Spotlights] > Spotlights in the Literary Encyclopedia h1 Spotlight in the Literary Encyclopedia h2 Tibetan Literature: Studies in Genre h3 ~ Essays in Honor of Geshe Lhundup Sopa A collection of essays by leading scholars that address an array of topics concerning Tibetan literature, including history, biography, canonical texts, philosophical and ritual literature, literary arts, non-literary arts and sciences, and guidebooks and reference works. {block:resource-link} http://www.thdl.org/collections/literature/genres/book/show.php {block} {link:image|/encyclopedias/literary/images/sm-stacked-texts.jpg} See our [Archive of Spotlights in the Literary Encyclopedia].
In certain areas of the THL site, such as the catalogs, an option form is provided to display or not display certain languages or transliterations. In order for this to work properly on wiki pages included in such areas, the languages need to be marked up properly. This refers only to alternative languages included in parentheses after the initial term or title.
The basic principles of the wiki markup for such situations are:
Thus, when you have something like "The Foundations of Monastic Conduct (འདུལ་བ་གཞི་, ’dul ba gzhi, vinayavastu, D.0001)":
Thus, the markup for the above example is:
Foundations of Monastic Conduct ({span:tib}འདུལ་བ་གཞི་{span}{span:sep}, {span} {span:wyl}’dul ba gzhi{span}{span:sep}, {span} {span:san}vinayavastu{span}{span:sep}, {span} {span:textnum}D.0001{span})