SUNScholar/XMLUI Theme/M1/Page Content

From Libopedia
Jump to: navigation, search
Back to Mirage 1 Modification

Upload your repositories logo to the following images folder.

/home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/images

Overwrite or create a file called logo.png and make sure that the CSS stylesheets refer to your custom logo header image file.

Customise the front page introduction

Type the following.

nano /home/dspace/source/dspace/config/news-xmlui.xml

Use the following tags for content markup:



NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for $string$
CTL+\ = Search for and replace $string$
ALT+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)


XML Tags Examples

Customise the page footer

Type the following.

nano /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/core/page-structure.xsl

Search for "footer" around line 557 approx by typing CTL+W and modify accordingly.


See modified example below.

<xsl:template name="buildFooter">
<div id="ds-footer-wrapper">
<div id="ds-footer">
<div id="ds-footer-left">
<a href="http://www.dspace.org">DSpace 1.8.2</a> | <a href="http://ubuntu.sun.ac.za">Ubuntu 10.04</a> | Copyright © <a href="http://www.sun.ac.za" target="_blank">Stellenbosch University</a></div>


NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for $string$
CTL+\ = Search for and replace $string$
ALT+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)


Enable public view of item counts

Edit the DSpace config file as follows:

nano /home/dspace/source/dspace/config/dspace.cfg

Change the following to true:

webui.strengths.show = true
webui.strengths.cache = true

Use unique icons for digital format types in item view

Go to the folder containing the item view xsl file.

 cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/aspect/artifactbrowser

Edit the following file.

nano item-view.xsl

Find the following section;

                        <xsl:otherwise>
                            <img alt="Icon" src="{concat($theme-path, '/images/mime.png')}" style="height: {$thumbnail.maxheight}px;"/>
                        </xsl:otherwise>

Copy and paste the following EXACTLY above the section mentioned above.
Make sure to correctly indent items.

			<xsl:when test="current()/@MIMETYPE = 'application/css'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/app-css.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'application/docx'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/app-docx.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'application/html'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/app-html.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'application/pdf'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/app-pdf.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'application/pptx'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/app-pptx.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'application/text'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/app-text.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'application/xml'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/app-xml.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'audio/mp3'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/audio-mp3.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'audio/x-wav'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/audio-wav.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>           
			<xsl:when test="current()/@MIMETYPE = 'audio/x-ms-wma'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/audio-wma.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'file/rar'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/file-rar.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'file/sql'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/file-sql.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'file/tar'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/file-tar.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'file/tgz'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/file-tgz.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'file/zip'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/file-zip.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'image/bmp'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/image-bmp.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'image/gif'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/image-gif.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'image/jpeg'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/image-jpeg.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'image/png'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/image-png.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'image/tiff'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/image-tiff.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/avi'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-avi.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/flv'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-flv.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/mov'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-mov.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/mp4v-es'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-mp4.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/mpeg'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-mpeg.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/swf'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-swf.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/webm'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-webm.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>
			<xsl:when test="current()/@MIMETYPE = 'video/wmv'">
				<img alt="Icon" src="{concat($theme-path,'/images/icons/video-wmv.png')}" style="height:{$thumbnail.maxheight}px;"/>
			</xsl:when>		                  

NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for $string$
CTL+\ = Search for and replace $string$
ALT+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)


Icon design by: http://www.iconarchive.com/artist/treetog.html

Download the icons compressed tarball (tar.gz) from the following web folder to your themes images folder as follows.

cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/images
wget http://web.lib.sun.ac.za/style/icons/icons.tar.gz
tar -xzvf icons.tar.gz
rm icons.tar.gz
cd icons
chmod 0777 *

You can browse the individual icons by going to:

http://web.lib.sun.ac.za/style/icons

Finally add the following common formats to DSpace.

Sunscholar-formats.png

Tips