Creating A New Portal Or Project

THL Toolbox > Developers' Zone > Web Development > Creating A New Portal Or Project

Creating A New Portal Or Project

Note: Before beginning a new portal-project you should have the following preparations completed.


So if all required steps above are completed let's begin creating a new THL Portal site…

1. Create a new folder (directory) name and location on the server for the new portal.

Using your PC's local THL Quandu SVN directory, name and locate this new portal's "root" folder accordingly based on the standards established throughout the THL Quandu server directory. In this new directory folder that acts as the "home" or "root level" of the new portal's directory you should add 4 new folders: "images", "css", "js", "documentation". Then in the images folder add 1 additional folder: "originals"

2. Next review and select one of several portal template styles.

  1. The first template option can be seen in use online, Example: THL Home Page layout itself.
  2. Next template option can be clicking the tabs on the THL global navbar; see Example: Encyclopedias
  3. Then moving onto the third portal template used commonly for a sub-portal's home pages, Example: Tibetan Literary Encyclopedia

(-NOTE- here is where we should note that these templates ready-to-use are located in the /templates folder, named: portal-home1-template.php, portal-home2-template.php, portal-home3-template.php - you agree??)

3. Add the following default template files to your new portal directory at the root level.

  1. Add 1 copy: Portal homepage layout: (Example, portal-home1-template.php) Note: rename this file to index.php before committing it to SVN
  2. Add 1 copy: (side-column.php)
  3. Add 1 copy: (masthead.php)
  4. Add 1 copy: (masthead-navbar.php)

So now if you've completed all of the above instructions you will see in your portal's directory 5 template files and 4 folders

4. Customize your default home page portal template files

New Title Image

Edit (masthead.php) to reflect the new "Title" image and links for this portal.
NOTE: Change the "absolute path" and file name to the new Title image for the portal you will put in the images folder under the new portal directory (Example from Sera Monastery Portal: /places/monasteries/sera/images/masthead-title-sera.png).

Also edit the title image's dimensions in the img tag for the width-height, and add alt="name" for accessibility standards.

In some places, the title will be included within the banner image, in which case the src attribute of the image tag for the title (above) should be set as follows:

New Banner Image

This new image is called from a new "local" style sheet you will create so first make the new blank CSS file called whatever your portal's directory name is, (Example: sera.css) Put this file in the CSS folder at the root level of your portal directory and add the following style edited according to your own image's directory path and name.

The part of the style after the url refers to the repeating and positioning of the background image. Always use "no-repeat" as the banner image is the full width of the page. The two "100%" represent the horizontal and vertical alignment respectively. These can also be "right top". As mentioned above, the banner image will sometimes contain the title. In that case, the CSS style for the banner should be positioned to the "left top". An example of a page with a banner whose image includes the title text is the THL environment page (/places/environment/).

New Navbar Tabs and Links

Edit (masthead-navbar.php) to reflect the new names and links for the global tabs on the masthead.

Note: This example is from the THL Global navbar stylesheet so the class names will be different 
for each portal to reflect the individual tab names created for the portal's global navbar. ONLY change the 
class names themselves for your portal; do not change any elements, pseudo classes, commas, brackets, or styles.


.home #masthead-navbar li.home a, 
.projects #masthead-navbar li.projects a, 
.collections #masthead-navbar li.collections a, 
.places #masthead-navbar li.places a, 
.encyclopedias #masthead-navbar li.encyclopedias a, 
.reference #masthead-navbar li.reference a, 
.education #masthead-navbar li.education a, 
.community #masthead-navbar li.community a, 
.tools #masthead-navbar li.tools a { 
  color:#CE570F; 
  background:#fff url(/global/images/button3-L.jpg) no-repeat left top; 
  padding-left:20px; 
}

.home #masthead-navbar li.home a b, 
.projects #masthead-navbar li.projects a b, 
.collections #masthead-navbar li.collections a b, 
.places #masthead-navbar li.places a b, 
.encyclopedias #masthead-navbar li.encyclopedias a b, 
.reference #masthead-navbar li.reference a b, 
.education #masthead-navbar li.education a b, 
.community #masthead-navbar li.community a b, 
.tools #masthead-navbar li.tools a b { 
  color:#CE570F; 
  background:#fff url(/global/images/button3-R.jpg) no-repeat right top; 
  padding-top:4px;  
}

.home #masthead-navbar li.home a:hover, 
.projects #masthead-navbar li.projects a:hover, 
.collections #masthead-navbar li.collections a:hover, 
.places #masthead-navbar li.places a:hover, 
.encyclopedias #masthead-navbar li.encyclopedias a:hover, 
.reference #masthead-navbar li.reference a:hover, 
.education #masthead-navbar li.education a:hover, 
.community #masthead-navbar li.community a:hover, 
.tools #masthead-navbar li.tools a:hover {  
  text-decoration:none; 
  background:#fff url(/global/images/button3-L.jpg) no-repeat left top; 
}

.home #masthead-navbar li.home a:hover b, 
.projects #masthead-navbar li.projects a:hover b, 
.collections #masthead-navbar li.collections a:hover b, 
.places #masthead-navbar li.places a:hover b, 
.encyclopedias #masthead-navbar li.encyclopedias a:hover b, 
.reference #masthead-navbar li.reference a:hover b, 
.education #masthead-navbar li.education a:hover b, 
.community #masthead-navbar li.community a:hover b, 
.tools #masthead-navbar li.tools a:hover b { 
  color:#00c; 
  text-decoration:underline; 
  background:#fff url(/global/images/button3-R.jpg) no-repeat right top; 
}

New Secondary Navigation

Edit (side-column.php) to create the new secondary navigation in the side column. You may also decide to add other php includes in addition to the default, side-column-search.php, to offer other portal-related links.

Creating a Section Homepage that Has Lists of Resources Rather than the Standard Section Homepage

For example, the Essays section homepage for the Sera Monastery project (external link: http://www.thlib.org/places/monasteries/sera/essays/)

Note in particular the following code:

  • <div class="container-wrapper essay-list">
  • &lt;dd class="author"&gt;by &lt;strong&gt;José Cabezón&lt;/strong&gt;&lt;/dd&gt;
  • &lt;dt class="sub-header"&gt;Memorization&lt;/dt&gt;
&lt;? $droot = $_SERVER['DOCUMENT_ROOT'];  ?&gt;

&lt;?
$add_header = '&lt;link rel="stylesheet" typetext/css" href="/places/monasteries/sera/css/sera.css" media="all" /&gt;
&lt;script type="text/javascript" src="/places/monasteries/sera/js/sera.js"&gt; &lt;/script&gt; ';

include_once  "$droot/global/php/header.php" ;
?&gt;

&lt;body class="seraessays"&gt;

&lt;!-- begin masthead php --&gt;
&lt;? include_once "$droot/places/monasteries/sera/masthead.php" ; ?&gt;
&lt;!-- end masthead include --&gt;


&lt;!-- begin content --&gt;
&lt;div id="content"&gt;
&lt;div class="shell-1"&gt;
&lt;h1&gt;Essays and Readings on Sera Monastery&lt;/h1&gt;

&lt;div class="container-wrapper essay-list"&gt;
&lt;div class="container-left-5050"&gt;


&lt;dl&gt;
&lt;dt&gt;Sera Monastery and Its Colleges&lt;/dt&gt;
&lt;dd class="author"&gt;by &lt;strong&gt;José Cabezón&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/intro/"&gt;An Introduction to Sera Monastery&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/colleges/intro/s/b1"&gt;Types of Colleges and Their Mission&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/colleges/intro/s/b2"&gt;The Rise and Evolution of Sera’s Colleges&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/colleges/intro/s/b23"&gt;The Jé College&lt;/a&gt; (&lt;em&gt;grwa tshang byes&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/colleges//intro/s/b24"&gt;The Mé College&lt;/a&gt; (&lt;em&gt;grwa tshang smad&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/colleges//intro/s/b25"&gt;The Tantric College&lt;/a&gt; (&lt;em&gt;sngags pa grwa tshang&lt;/em&gt;)&lt;/dd&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;The Hermitages of Sera&lt;/dt&gt;
&lt;dd class="author"&gt;by &lt;strong&gt;José Cabezón&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/intro/"&gt;An Introduction to the Hermitages of Sera&lt;/a&gt;&lt;/dd&gt;
&lt;!--
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/drakri/s/c1"&gt;Hermitages Glossary&lt;/a&gt;&lt;/dd&gt;
--&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/chupzang/"&gt;Chupzang Nunnery&lt;/a&gt; (&lt;em&gt;chu bzang dgon&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/drakri/"&gt;Drakri Hermitage&lt;/a&gt; (&lt;em&gt;brag ri ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/garu/"&gt;Garu Nunnery&lt;/a&gt; (&lt;em&gt;ga ru dgon pa&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/jokpo/"&gt;Jokpo Hermitage&lt;/a&gt; (&lt;em&gt;’jog po ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/keutsang/"&gt;Keutsang Hermitage&lt;/a&gt; (&lt;em&gt;ke’u tshang ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/keutsangshar/"&gt;Keutsang East Hermitage&lt;/a&gt; (&lt;em&gt;ke’u tshang shar ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/keutsangnup/"&gt;Keutsang West Hermitage&lt;/a&gt; (&lt;em&gt;ke’u tshang nub ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/khardo/"&gt;Khardo Hermitage&lt;/a&gt; (&lt;em&gt;mkhar do ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/negodong/"&gt;Negodong Nunnery&lt;/a&gt; (&lt;em&gt;gnas sgo gdong dgon pa&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/nenang/"&gt;Nenang Nunnery&lt;/a&gt; (&lt;em&gt;gnas nang ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/pabongkha/"&gt;Pabongkha Hermitage&lt;/a&gt; (&lt;em&gt;pha bong kha ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/panglung/"&gt;Panglung Hermitage&lt;/a&gt; (&lt;em&gt;spang lung ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/purbuchok/"&gt;Purbuchok Hermitage&lt;/a&gt; (&lt;em&gt;phur bu lcog ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/rakhadrak/"&gt;Rakhadrak Hermitage&lt;/a&gt; (&lt;em&gt;ra kha brag ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/choding/"&gt;Sera Chöding Hermitage&lt;/a&gt; (&lt;em&gt;se ra chos sdings ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/gonpasar/"&gt;Sera Gönpasar Hermitage&lt;/a&gt; (&lt;em&gt;se ra dgon pa gsar ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/utse/"&gt;Sera Utsé Hermitage&lt;/a&gt; (&lt;em&gt;se ra dbu rtse ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/takten/"&gt;Takten Hermitage&lt;/a&gt; (&lt;em&gt;rtags bstan ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/herm/trashicholing/"&gt;Trashi Chöling Hermitage&lt;/a&gt; (&lt;em&gt;bkra shis chos gling ri khrod&lt;/em&gt;)&lt;/dd&gt;
&lt;/dl&gt;

&lt;/div&gt;



&lt;div class="container-right-5050"&gt;

&lt;br /&gt;
&lt;div class="img-left-shadow" style="margin-bottom:25px;"&gt;
&lt;div&gt;&lt;img src="/places/monasteries/sera/essays/images/intro-A1900.jpg" width="223" height="170" alt="" /&gt;&lt;/div&gt;
&lt;h6&gt;&lt;/h6&gt;
&lt;/div&gt;

&lt;div class="container-1col"&gt;

&lt;dl&gt;
&lt;dt&gt;Tibetan Monastic Education&lt;/dt&gt;
&lt;dd class="author"&gt;by &lt;strong&gt;Georges Dreyfus&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/intro/"&gt;Introduction to Monastic Education&lt;/a&gt;&lt;/dd&gt;
&lt;dt class="sub-header"&gt;Memorization&lt;/dt&gt;
&lt;!--
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/memorization/"&gt;The Practice of Memorization&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/monasteries/"&gt;Tibetan Monasteries: Islands of Peace or Oceans of Noise?&lt;/a&gt;&lt;/dd&gt;
--&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/discipline/"&gt;Memorization and Liturgical Discipline&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/curriculum/"&gt;The Role of Memorization in the Curriculum&lt;/a&gt;&lt;/dd&gt;
&lt;!--
&lt;dt class="sub-header"&gt;Texts and the Curriculum&lt;/dt&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/hierarchy/b1"&gt;The Commentarial Hierarchy&lt;/a&gt;&lt;/dd&gt;
&lt;dt class="sub-header"&gt;Debate&lt;/dt&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/debaterules/"&gt;Procedures and Rules of Debate&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/debatephysicality/"&gt;The Physicality of Tibetan Debates&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/debatesched/"&gt;The Schedule of Debating Institutions&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/debateexams/"&gt;Examinations and the Organization of Debate&lt;/a&gt;&lt;/dd&gt;
&lt;dt class="sub-header"&gt;Final Examinations and the Title of Geshé (&lt;em&gt;dge bshes&lt;/em&gt;)&lt;/dt&gt;
&lt;dd&gt;&lt;a href="#essay=/dreyfus/drepung/monasticed/finalexams/"&gt;Final Examinations and the Title of Geshé&lt;/a&gt; (&lt;em&gt;dge
bshes&lt;/em&gt;)&lt;/dd&gt;
--&gt;
&lt;/dl&gt;

&lt;dl&gt;
&lt;dt&gt;The Space of Sera (&lt;em&gt;se ra’i khor yug&lt;/em&gt;)&lt;/dt&gt;
&lt;dd class="author"&gt;by &lt;strong&gt;José Cabezón&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/spaces/s/b1"&gt;Introduction&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/spaces/s/b2"&gt;Foreign Perspectives&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/spaces/s/b3"&gt;Tibetan Perspectives&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/spaces/s/b4"&gt;Architecture&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/spaces/s/b5"&gt;Guide to the Map&lt;/a&gt;&lt;/dd&gt;


&lt;dt&gt;People at Sera&lt;/dt&gt;
&lt;dd class="author"&gt;by &lt;strong&gt;José Cabezón&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/people/"&gt;Introduction to People at Sera&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/people/monks/"&gt;Monks&lt;/a&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;a href="#essay=/cabezon/sera/lifeofseramonk/"&gt;The Life of a Sera Monk&lt;/a&gt; &lt;em&gt;by Geshé Rabten&lt;/em&gt;&lt;/dd&gt;
&lt;/dl&gt;

&lt;/div&gt;

&lt;/div&gt;
&lt;/div&gt;&lt;!-- end #container-wrapper --&gt;

&lt;/div&gt;
&lt;/div&gt;&lt;!-- end content --&gt;




&lt;!-- begin footer --&gt;
&lt;? include_once "$droot/global/php/footer.php" ; ?&gt;
&lt;!-- end footer --&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;!-- begin footer utility --&gt;
&lt;? include_once "$droot/global/php/footer-utility.php" ; ?&gt;
&lt;!-- end footer utility --&gt;

Provided for unrestricted use by the external link: Tibetan and Himalayan Library