Developer Guide - v2.0.2

Table Of Contents

  1. Introduction
  2. Version Control
  3. Cascading Style Sheets
  4. Buttons
  5. Index Modes
  6. Language files and System values
  7. Slide Modes
  8. Templates
  9. Frames
  10. [ User Guide ]
  11. [ Release Note ]
  12. [ Developer Guide ] <<< you're here!
  13. [ Admin Page ]
  14. [ Go back to album page ]

1. Introduction

This document is to faciliate users to develop their own add-on: cascading style sheets, buttons, index modes, language files, slide modes and templates.

Being prepared

[ Go back to Table of Content ]

2. Version Control

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.

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.

[ Go back to Table of Content ]

3. Cascading Style Sheets

Being prepared

[ Go back to Table of Content ]

4. Buttons

Follow the steps below to create you own buttons:

  1. Create folder under _res/buttons/ with the name of this frame, say mybuttons.
  2. 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).

The first.png is used for first page in index page and first photo in slide page; The last.png is used for last page in index page and last photo in slide page; The previous.png is used for previous page in index page and previous photo in slide page; The next.png is used for next page in index page and next photo in slide page; The index.png is used for go back to index page from slide page; The up.png is used for go one level up in index page; The folder.png is used when folder thumbnail not found.

[ Go back to Table of Content ]

5. Index Modes

Being prepared

[ Go back to Table of Content ]

6. Language files and System values

Follow the steps below to create you own language file:

  1. With copy command, create your language file with any one of the existing language files, say myJapanese.
  2. Open the file with your favour editor and edit in UNICODE mode.
  3. The format of the contents are as follows, and you should only change the value.
  4. $lang['key'] = 'value';

If you need to use any single quote character ' in the value, replace all with \', or there will be error.

Adding System values: Make changes to file "_res\sources\systemvalues.php".

[ Go back to Table of Content ]

7. Slide Modes

Being prepared

[ Go back to Table of Content ]

8. Templates

Being prepared

[ Go back to Table of Content ]

9. Frames

Follow the steps below to create you own frame:

  1. Create folder under _res/frames/ with the name of this frame, say myframe.
  2. 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.

The topleft.png and bottomright.png are used to set the boundaries of the final thumbnail image as shown in the graph below.

diagram-01

The topright.png and bottomleft.png are fitted into their own corners. They will be cropped if too big as shown in the diagram below.

diagram-02

Then, the top.png, right.png, bottom.png and left.png are reapeated along their own side as shown in the diagram below.

diagram-03

And finally, you should create a sample thumbnail named _sample.jpg - suggested size around 170x130. There is a tool _res/tools/makesample.php 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.

[ Go back to Table of Content ]

END