2 Inside MeAndMyGall (Advanced usage)

The web pages MeAndMyGall creates are assembled from the templates in the directory where the program is located. If you know some CSS and/or HTML you might want to edit those files. Of course as you already expected, do so at your own peril :-)

In the following chapters I first give a description of how the template system works followed by the available templates and the codes contained within.

The autorun utility can also be used outside MeAndMyGall. You can create a CD-Rom that can actually start any program associated with some file. The last chapter discusses use of the autorun utility.

2.1 Templates

This chapter discusses how you can modify MeAndMyGall templates. This way you can have more control over how your site will look. However this comes at the price that you have to know HTML and CSS.

2.1.1 Template System

The different pages that make up your final web site are mostly created from templates in the program's home directory. These templates are plain HTML with some codes inserted. When your web pages are created those codes are replaced by something meaningfull depending on images, text and styles you selected or entered.

Codes can be recognized by the dollar sign at both sides like "$CSSMAINBS$" which is a code contained in the style sheet file and reflects the selection a user made for the main border style.

2.1.2 Available templates

There are four template files.

webgallery.html
This is the file used for the preview html page. Both if scripting is off or scripting is on in the users browser.
webgallerynoscript.html
This is the page for the zoomed view for browsers that have scripting turned of.
webgallery.css
This file contains the style sheet for your site.
webgallery.js
This file contains javascript code for browsers that have scripting turned on.

2.1.3 Template Codes

This is a comprehensive list of all codes used in the template files.

$DATE$
The date contained in the header of your webpage
$TITLE$
The title of your webpage
$PICSHTML$
This will be replaced by code for the icons. This is not something you can change
$CURRENTPIC$
This will be replace by code to show the picture. This is not something you can change
$ALTINFO$
The information shown for each picture. This will be replace by information you type in the "AddInfo" dialog
$HTMLINFO$
The information shown for each picture. This will be replace by information you type in the "AddInfo" dialog
$NSPREVIOUS$
Replaced by a link to the previous page.
$NSNEXT$
Replace by a link to the next page.
$JSTT$
Creates a tooltip array using the information from the "AddInfo" dialog.
$JSPICSAR$
Array of picture names. This is used for browsers that support scripting to keep track of the current, next and previous picture.
$JSHEIGHT$
Replaced by the height calculated from the entered height for images.
$JSWIDTH$
Replaced by the width calculated from the entered width for images.
$CSSMAINBS$
Main border style.
$CSSMAINBW$
Main border width.
$CSSMAINCOLORBG$
Background color of the main html page.
$CSSMAINCOLORBORDER$
Border color of the main html page.
$CSSMAINCOLORFG$
Text color of the main html page.
$CSSINFOBS$
Border style of the text area of the zoomed view window
$CSSINFOBW$
Border width of the text area of the zoomed view window
$CSSINFOCOLORBORDER$
Border color of the text area of the zoomed view window
$CSSINFOCOLORBG$
Background color of the text area of the zoomed view window
$CSSINFOCOLORFG$
Text color of the text area of the zoomed view window
$CSSFRAMECOLORBG$
Background color of the zoomed view.
$CSSFRAMECOLORFG$
Text color of the zoomed view.
$CSSICONBS$
Border style of the icon area on the main html page.
$CSSICONBW$
Border width of the icon area on the main html page.
$CSSICONCOLORBG$
Background color of the icon area on the main html page.
$CSSICONCOLORBORDER$
Border color of the icon area on the main html page.
$CSSICONCOLORFG$
Text color of the icon area on the main html page (not really used in MeAndMyGall itself.
$CSSFRAMEBS$
Border style of the frame of the zoomed view.
$CSSFRAMEBW$
Border width of the frame of the zoomed view.
$CSSFRAMECOLORBORDER$
Border color of the frame of the zoomed view.
$CSSFRAMECOLORFG$
Text color of the frame of the zoomed view.
$CSSLARGEVIEWBS$
Border style of the image of the zoomed view.
$CSSLARGEVIEWBW$
Border width of the image of the zoomed view.
$CSSLARGEVIEWCOLORBG$
Background color of the image of the zoomed view.
$CSSLARGEVIEWCOLORBORDER$
Border color of the image of the zoomed view.
$CSSLARGEVIEWCOLORFG$
Text color of the image of the zoomed view (not used in MeAndMyGall itself).


2.2 Using the autorun function outside MeAndMyGall

With MeAndMyGall comes a handy autorun utility that you may find useful outside MeAndMyGall. This chapter contains instructions about setting up such a CD-Rom.

2.2.1 Creating an autorun CD-Rom

If you browse to the directory where MeAndMyGall is installed or you look into "Local Dir" directory. You will find two files starting with 'autorun'. These files are:

  • autorun.exe
  • autorun.inf

When windows is notified that a CD-Rom is inserted it will read the autorun.inf file. This file contains one section named "Autorun". The section consists of a line that tells ms-windows what icon it should show for the CD-Rom (for instance when you open explorer). The other line tells windows what it should do.

 
[Autorun] 
open=autorun.exe \index.html 
icon=MeAndMyGall.ico 
                

As you can see the standard "autorun.inf" tells windows to show the MeAndMyGall.ico and execute the "autorun.exe" utility with as paramater the start page of your gallery. Actually the only thing "autorun.exe" does is telling windows to "open" the second parameter.

To create a CD-Rom of your own you can replace the icon with your own icon. If you rename your icon don't forget to rename it in the autorun.inf file as well.

Secondly you can open any file that is associated by some program in windows. For instance if you have Excel installed you can automatically open a file "finance.xls" by creating an icon name "finance.ico" (any name will do actually) and creating the following autorun.inf file:

 
[Autorun] 
open=autorun.exe \finance.xls 
icon=finance.ico 
                

The root of your custom made CD-Rom should then contain the following files:

  • autorun.exe
  • autorun.inf
  • finance.ico
  • finance.xls
Copyright © 2004 by Ron AF Greve http://informationsuperhighway.eu+31878753207