Changeset 29248

Show
Ignore:
Timestamp:
03.09.2014 20:57:18 (5 years ago)
Author:
ak19
Message:

Updating the final customisation tutorials for the upcoming GS3 release. Now the free template is only available for download as a 7zip file, so users who don't have 7zip are instructed to use the online service at wobzip.org to get it converted to a zip. The instructions also missed out mentioning the two modified javascript files at svn that need to be used to get the main page's collection image slider to work again for the new interface.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • documentation/trunk/tutorials/xml-source/tutorial_en.xml

    r29247 r29248  
    55835583<Text id="dl-17">When we restarted the server throughout this tutorial, Greenstone launched a browser window to <i>http://localhost:8383/greenstone3/library</i>, and we had to navigate to our new library's URL. When you are working in a particular library, you may want to go directly to its URL when the server starts. To do this, in the <b>Greenstone Server</b> window, go to <Path>File &rarr; Settings...</Path> and select your library (for example, <b>rand</b>) from the Servlet dropdown menu. Now, when you click <b>Restart Library</b>, a window will open to <i> http://localhost:8383/greenstone3/rand</i>. </Text> 
    55845584</NumberedItem> 
     5585<Text id="dl-17a">Quit the Greenstone 3 server.</Text> 
     5586<NumberedItem> 
     5587</NumberedItem> 
    55855588<NumberedItem> 
    55865589<Text id="dl-18">In the GLI, you can change the current library under <Path>File &rarr; Preferences &rarr; Connection</Path>. First, select the <b>Site</b> you want to work with (for example, <i>mysite</i>). The <b>Servlet</b> dropdown menu will then include all of the libraries that use <i>mysite</i>. Select one. Be sure to also change the <b>Collect Directory</b> to the  <i>mysite/collect</i> folder. Click <b>OK</b> for the changes to take effect. Now, you will be adding and editing collections in the <b>mysite</b> site, and, when you click the Preview button, the selected library will be launched.</Text> 
     
    56925695</NumberedItem> 
    56935696<NumberedItem> 
    5694 <Text id="ni1-13">Visit <i>http://www.os-templates.com/free-website-templates/news-magazine</i> and click the <b>Download Here</b> button. In the popup window, select <b>Save File</b> and click <b>OK</b>. On Windows, this will save the file <b>news-magazine.zip</b> in your <b>Downloads</b> folder. <i>This template is free to use and modify, but the Copyright and link information <b>must remain intact</b> in files and in the footer of every page. The template <b>cannot be distributed</b> (modified or otherwise) without express permission from OS-Templates. (The full license is provided in the <b>license.txt</b> file included with the template).</i></Text> 
     5697<Text id="ni1-13">Visit <i>http://www.os-templates.com/free-website-templates/news-magazine</i> and click the <b>Download Here</b> button. In the popup window, select <b>Save File</b> and click <b>OK</b>. This will download the file news-magazine.7z, which has a <i>7zip</i> extension. If you have 7zip installed, then you can extract the file in place. If not, you can either download the free utility, 7zip, from the web, or alternatively use an online service to convert it to a zip file that Windows can extract.</Text>  
     5698<Text id="ni1-13a">To do the latter, visit <AutoText text="wobzip.org" />. Click the <AutoText text="Browse from computer" /> button, and in the file browser dialog that appears, navigate to where you downloaded the <i>news-magazine.7z</i> file, select the file and confirm to close the file browser dialog. Next, click the <AutoText text="Uncompress" /> button at <i>wobzip.org</i> and wait until the site's extracted the 7z file and takes you to its download page. On the page that then loads, click the <AutoText text="Download as zip" /> button. (After downloading has finished, you can press the <AutoText text="Delete Upload" /> button.) </Text> 
     5699<Text id="ni1-13b">On Windows, this will save the file <b>news-magazine.zip</b> in your <b>Downloads</b> folder. <i>This template is free to use and modify, but the Copyright and link information <b>must remain intact</b> in files and in the footer of every page. The template <b>cannot be distributed</b> (modified or otherwise) without express permission from OS-Templates. (The full license is provided in the <b>license.txt</b> file included with the template).</i></Text> 
    56955700</NumberedItem> 
    56965701<NumberedItem> 
     
    57075712</NumberedItem> 
    57085713<NumberedItem> 
    5709 <Text id="ni1-18">Now, from the <Path>sample_files &rarr; interfaces &rarr; aybara</Path> folder, copy the <b>styles</b>, <b>images</b>, and <b>transform</b> folders, as well as the <b>index-GS3.html</b> file into <Path>Greenstone3 &rarr; web &rarr; interfaces &rarr; perrin</Path> (If a popup window asks whether you want to merge the images and styles folders, select "Yes".) We have now gathered all of the Javascript, CSS, and images our new interface will use.</Text> 
     5714<Text id="ni1-18a">Now, from the <Path>sample_files &rarr; interfaces &rarr; aybara</Path> folder, copy the <b>styles</b>, <b>images</b>, and <b>transform</b> folders, as well as the <b>index-GS3.html</b> file into <Path>Greenstone3 &rarr; web &rarr; interfaces &rarr; perrin</Path> (If a popup window asks whether you want to merge the images and styles folders, select "Yes".)</Text>  
     5715<Text id="ni1-18b">Next, copy the two javascript files, <i>jquery.galleryview-2.1.1.js</i> and <i>jquery.galleryview.2.1.1.min.js</i>, in <Path>sample_files &rarr; interfaces &rarr; aybara</Path> to <Path>Greenstone3 &rarr; web &rarr; interfaces &rarr; perrin</Path>, replacing the existing files by this name. These two javascript files are modified versions to cope with an update to jquery. The modified files are necessary for the next tutorial's image slider to show up and work.</Text> 
     5716<Text id="ni1-18c">We have now gathered all of the Javascript, CSS, and images our new interface will use.</Text> 
    57105717<Text id="ni1-19">Double click on <Path>perrin &rarr; index-GS3.html</Path> to open it in a browser window. This file isn't used by the new interface, but provides a preview of how the interface will look. </Text> 
    57115718<Text id="ni1-20">In the next tutorial, we will begin changing how our interface looks, starting with the home page.</Text> 
     
    58745881<Text id="ni2-14a">These templates are more complicated, but a basic explanation follows (don't worry if you don't understand it). You can skip ahead to Step 9 if you'd like.</Text> 
    58755882</Comment> 
    5876 <Text id="ni2-14">First look at the collDescription template. It creates a header that links to the collection's about page (<Format>&lt;h2&gt;&lt;a href="{$library_name}/collection/{$collectionFolder}/page/about"&gt;&lt;xsl:value-of select="$collectionName"/&gt;&lt;/a&gt;&lt;/h2&gt;</Format>). Then, if there is an About page image for the collection, this is displayed. Finally, if the collection has a description (<Format>&lt;xsl:when test="$collDesc"&gt;</Format>), it will display this description. Otherwise, it will display the a generic sentence stating the collection's name and how many documents it contains.</Text> 
     5883<Text id="ni2-14">First look at the collDescription template. It creates a header that links to the collection's about page (<Format>&lt;h2&gt;&lt;a href="{$library_name}/collection/{$collectionFolder}/page/about"&gt;&lt;xsl:value-of select="$collectionName"/&gt;&lt;/a&gt;&lt;/h2&gt;</Format>). Then, if there is an About page image for the collection, this is displayed. Finally, if the collection has a description (<Format>&lt;xsl:when test="$collDesc"&gt;</Format>), it will display this description. Otherwise, it will display a generic sentence stating the collection's name and how many documents it contains.</Text> 
    58775884<Text id="ni2-15">Now, let's look at the collectionsList template. Basically, for every collection in the library (<Format>&lt;xsl:for-each select="./collectionList/collection"&gt;</Format>), it is calling the collDescription template, i.e. doing everything explained in the previous paragraph. However, the CSS we will be using requires that our div's alternate between class "fl_left" and class "fl_right" or the page won't display correctly. So, if the collection is an odd number in the list (<Format>&lt;xsl:when test="position() mod 2 = 1"&gt;</Format>), the collection description will be in a  <Format>&lt;div class="fl_left"&gt;</Format>, otherwise (i.e. when it is an even number in the list) the collection description will be in a  <Format>&lt;div class="fl_right"&gt;</Format>. Once we link our CSS, this will make our descriptions fall into two nice columns.</Text> 
    58785885</NumberedItem> 
     
    61366143</NumberedItem> 
    61376144<NumberedItem> 
    6138 <Text id="ni3-18">Save <b>main.xsl</b> and refresh the browser. The home page should have no links in the navigation bar at all. Enter a few different collection and see what the navigation bar looks like in each of those.</Text> 
     6145<Text id="ni3-18">Save <b>main.xsl</b> and refresh the browser. The home page should have no links in the navigation bar at all. Enter a few different collections and see what the navigation bar looks like in each of those.</Text> 
    61396146</NumberedItem> 
    61406147<Heading>