Location: PHPKode > projects > CorePHPAlbum > cpa-2.0.2/_documentation/developer-guide.html
<!-- ========================================================
     =                                                      =
     = corePHPAlbum - web-based photo gallery               =
     =                                                      =
     = Developer Guide                                      =
     = file release 2.0.2                                   =
     =                                                      =
     = http://sourceforge.net/projects/corephpalbum         =
     =                                                      =
     ======================================================== -->

<link rel="stylesheet" href="style.css" type="text/css">

<h1><span class="keyword">Developer Guide - v2.0.2</span></h1>

<!-- TOC -->
<a name="toc">
<h1>Table Of Contents</h1>

<ol>
	<li><a href="#ch01">Introduction</a></li>
	<li><a href="#ch02">Version Control</a></li>

	<li><a href="#ch03">Cascading Style Sheets</a></li>
	<li><a href="#ch04">Buttons</a></li>
	<li><a href="#ch05">Index Modes</a></li>
	<li><a href="#ch06">Language files and System values</a></li>
	<li><a href="#ch07">Slide Modes</a></li>
	<li><a href="#ch08">Templates</a></li>
	<li><a href="#ch09">Frames</a></li>

	<li><a href="user-guide.html"><span class="keyword">[ User Guide ]</span></a></li>
	<li><a href="release-note.html"><span class="keyword">[ Release Note ]</span></a></li>
	<li><a href="developer-guide.html"><span class="keyword">[ Developer Guide ] <<< you're here!</span></a></li>
	<li><a href="../admin.php"><span class="keyword">[ Admin Page ]</span></a></li>
	<li><a href="../index.php"><span class="keyword">[ Go back to album page ]</span></a></li>
</ol>


<!-- Chapter 1 -->
<h1><a name="ch01"></a>1. Introduction</h1>
<p>This document is to faciliate users to develop their own add-on: cascading style sheets, buttons, index modes, language files, slide modes and templates.</p>
<p>Being prepared</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 2 -->
<h1><a name="ch02"></a>2. Version Control</h1>
<p>Version number is for corePHPAlbum as a software package. There is also a 'file release reference' for every individual program files: css, html, php and js.</p>
<p>This version scheme is effective since corePHPAlbum version 1.0.0. The file release reference for all the program files in this version have been standardised as 1.0.0.</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 3 -->
<h1><a name="ch03"></a>3. Cascading Style Sheets</h1>
<p>Being prepared</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 4 -->
<h1><a name="ch04"></a>4. Buttons</h1>
<p>Follow the steps below to create you own buttons:</p>

<ol>
	<li>Create folder under <span class="keyword">_res/buttons/</span> with the name of this frame, say mybuttons.</li>
	<li>Create 7 image files in format png. Their names and recommended sizes (width x height) are as follows: first.png (34x32), last.png (34x32), previous.png (32x32), next.png (32x32), index.png (32x32), up.png (32x32) and folder.png (48x48).</li>
</ol>

<p>The <span class="keyword">first.png</span> is used for first page in index page and first photo in slide page; The <span class="keyword">last.png</span> is used for last page in index page and last photo in slide page; The <span class="keyword">previous.png</span> is used for previous page in index page and previous photo in slide page; The <span class="keyword">next.png</span> is used for next page in index page and next photo in slide page; The <span class="keyword">index.png</span> is used for go back to index page from slide page; The <span class="keyword">up.png</span> is used for go one level up in index page; The <span class="keyword">folder.png</span> is used when folder thumbnail not found.</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 5 -->
<h1><a name="ch05"></a>5. Index Modes</h1>
<p>Being prepared</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 6 -->
<h1><a name="ch06"></a>6. Language files and System values</h1>
<p>Follow the steps below to create you own language file:</p>

<ol>
	<li>With copy command, create your language file with any one of the existing language files, say myJapanese.</li>
	<li>Open the file with your favour editor and edit in UNICODE mode.
	<li>The format of the contents are as follows, and you should only change the value.</li>
		<p class="p1">$lang['<span class="keyword">key</span>'] = '<span class="keyword">value</span>';</p></li>
</ol>

<p>If you need to use any single quote character <span class="keyword">'</span> in the value, replace all with <span class="keyword">\'</span>, or there will be error.</p>

<p>Adding <span class="keyword">System values</span>: Make changes to file "_res\sources\systemvalues.php".</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 7 -->
<h1><a name="ch07"></a>7. Slide Modes</h1>
<p>Being prepared</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 8 -->
<h1><a name="ch08"></a>8. Templates</h1>
<p>Being prepared</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<!-- Chapter 9 -->
<h1><a name="ch09"></a>9. Frames</h1>
<p>Follow the steps below to create you own frame:</p>

<ol>
	<li>Create folder under <span class="keyword">_res/frames/</span> with the name of this frame, say myframe.</li>
	<li>Create 9 image files in format png and named: topleft.png, topright.png, bottomright.png, bottomleft.png, top.png, right.png, bottom.png, left.png and _sample.jpg. First four image define the corners, and the others are repeated along the sides.</li>
</ol>

<p>The <span class="keyword">topleft.png</span> and <span class="keyword">bottomright.png</span> are used to set the boundaries of the final thumbnail image as shown in the graph below.</p>
<img class="imgdoc" src="diagram-01.png" alt="diagram-01" border="0"/>

<p>The <span class="keyword">topright.png</span> and <span class="keyword">bottomleft.png</span> are fitted into their own corners. They will be cropped if too big as shown in the diagram below.</p>
<img class="imgdoc" src="diagram-02.png" alt="diagram-02" border="0"/>

<p>Then, the <span class="keyword">top.png</span>, <span class="keyword">right.png</span>, <span class="keyword">bottom.png</span> and <span class="keyword">left.png</span> are reapeated along their own side as shown in the diagram below.</p>
<img class="imgdoc" src="diagram-03.png" alt="diagram-03" border="0"/>

<p>And finally, you should create a sample thumbnail named <span class="keyword">_sample.jpg</span> - suggested size around 170x130. There is a tool <span class="keyword">_res/tools/makesample.php</span> to help creating it while you have to aware that there may not be sufficient privilege to create it on your production web server. It's recommended to create it locally before upload.</p>

<p><a href="#toc"><span class="keyword">[ Go back to Table of Content ]</span></a></p>


<h1><span class="keyword">END</span></h1>
Return current item: CorePHPAlbum