svManager

The easy way to manage your SimpleViewer galleries.

Current version: 1.2.0

Welcome to svManager. This guide will show you how to install the program, how to use it and what to do if you have problems.

Index

  1. Setup
    1. Installation requirements
    2. Installation
    3. Upgrading from an earlier version
    4. Getting started
  2. Screen Descriptions
    1. Galleries screen
    2. Customize screen
    3. Add images screen
    4. Images screen
    5. Import screen
    6. Galleries Index
  3. Advanced Topics
  4. Backup
  5. Using svManager with SimpleViewer-Pro
  6. Using svManager with WordPress
  7. Troubleshooting

Installation requirements

Server requirements

Most servers running PHP will meet these requirements. To check your server capabilities, install and run the svManager Server Compatibility Test which is available free from Airtight Interactive.

  1. A web server (Unix or Windows), running PHP version 4.3.0 or later
  2. Minimum 3 MByte spare disk space on your server plus space for your gallery images.
  3. PHP safe mode must be disabled
  4. PHP must have access to the GD graphics library, version 2.0 or later
  5. PHP must have access to the XML parser functions
  6. PHP scripts running on your server must have sufficient permissions to read, and write files.
  7. It may also be necessary to change file or folder permissions on your server. See the troubleshooting section below for more information on permissions.
  8. You will need an ftp program or some other way of uploading files to your server.

Browser requirements

Most modern web browsers will meet these requirements

  1. Internet Explorer for Windows version 6 or later, or a W3C compliant browser such as Firefox or Safari
  2. Javascript must be enabled
  3. The browser must be able to run Java applets

Installation

The short version

  1. Upload the 'svmanager' folder contained in the svManager zip file to your webserver using FTP.
  2. Navigate to the uploaded folder in your webbrowser. Click the 'Admin Sign In' link.
  3. Login using username: 'admin', password: 'admin'.
  4. Start managing your SimpleViewer galleries.

Or in a little more detail…

Everything you need to run svManager is contained within one folder named ‘svmanager’. You can change the name of this folder if you wish.

Upload the folder to your web site. You can choose any location on the server that is accessible to a web browser. If in doubt, upload the folder to the highest level directory accessible from the web: the ‘web root’.

Once svManager is installed and you have created some galleries, then it's not quite so simple to rename or move the svmanager folder. See the advanced section for how to do it.

Examples in this manual will assume that your site address is www.mysite.com and that you have uploaded the galleries folder to the web root directory of your site. You will then be able to access your gallery index from your web browser as:

http://www.mysite.com/svmanager/

or you can go straight to svManager with:

http://www.mysite.com/svmanager/svmanager.php

After you have created your first gallery, it will have the address:

http://www.mysite.com/svmanager/g1

You will be able to change the gallery address after you create it.

Setting up your browser

If you are having problems using svManager in your browser:

  1. Check JavaScript is enabled. Javascript is usually enabled by default. If you have disabled JavaScript then you will need to go to your browser settings and turn it back on.
  2. Your browser will probably already have a plug-in to run Java but it might not be up-to-date so you are recommended to install the latest version of the Java Runtime Environment (JRE) available free from www.java.com.

Upgrading

To upgrade from an earlier version of svManager:

  1. Important – backup the whole of the svmanager folder by copying it to a safe location.
  2. Upload the new version of svManager, making sure that all the new files overwrite the old ones. Note that the file svmanager/data/gallerydata.txt is not included in the new svManager distribution – that’s because we don't want to overwrite that one.
  3. The user name and password will be reset to admin/admin. Log-on and change the user name and password to your own preference.
  4. The new features from the upgrade may not be applied automatically to your existing galleries. Try going to one of the edit screens for an existing gallery and pressing the 'Update' button. In come cases, you may need to rebuild your existing galleries if you wish to use the new features from the upgrade.

Getting Started

Point your browser to http://www.mysite.com/svmanager and follow the 'Admin sign-in' link. Alternatively, you can go directly to the sign-in screen with http://www.mysite.com/svmanager/svmanager.php. The user name is ‘admin’ and the pasword is also ‘admin’. After logging-in, you will be taken to the galleries screen and there will be a reminder to change your password.

Changing the Default Password

Before doing anything else, you should change your password. Go to the ‘Admin’ screen and enter your current password and a new user name and password. User names can be any length (or even just a blank). Passwords must be at least 5 characters long. A mix of upper and lower case characters and numbers makes for a good secure password. It is more secure to choose a different password to any others that you already use on your server, for instance your ftp password.

More than one user

SvManager is basically a single-user program. If you intend to give other people access to it (for instance, your client) then you should read the section on multi-user operation in the advanced section of the manual.

Galleries screen

+Add New Gallery

Creates a new gallery named ‘New Gallery’ and takes you to the edit/customize screen where you can change the name, and appearance of your gallery.

Edit

Takes you to the edit/customize screen for an existing gallery.

View

Takes you to your gallery. The gallery will open in a new window or a new tab, depending on your browser settings. In most browsers, the gallery window will automatically come to the front of other windows but in Firefox you will need to click on the new window or tab to bring it forward.

Rebuild

This is a recovery feature in case any of your files has been accidentally deleted or corrupted. If your gallery is in good shape then it will have no effect. It may sometimes be necessary to rebuild your galleries after an upgrade to svManager in order to take advantage of new features. It is also useful if you have added or deleted any images via ftp rather than using the svManager uploader.

Rebuild does the following:

  1. Scans the gallery images folder
  2. Updates the gallery data to correspond with the images that are actually present
  3. Creates new thumbnail images
  4. Tries to retain any existing image captions.
  5. Copies the latest version of SimpleViewer from the master copy

Unlist

Unlist is a less-drastic alternative to ‘delete’. svManager will remove the gallery from the list and forget about it. It will not delete the gallery from your server. You can re-import the gallery later if you wish.

Unlist will also attempt to change the file permissions to make editing easier on some servers. Advanced users who wish to edit the gallery.xml file manually are advised to unlist the gallery first, carry-out the edits, test in SimpleViewer and then re-import into svManager.

Delete

Deletes the gallery, removes the gallery folder and all its contents. You will be asked to confirm this. Be careful – there is no undelete! You should always maintain a backup of all your galleries.

Order of gallery listing

By default, the galleries are listed in the order 'oldest first'. You can reverse this by clicking the heading of the 'Gallery title' column. The setting will be remembered until you change it.

 

Customize screen

Gallery title

This is the title that shows when viewing your gallery. Titles can contain any text character. The following html tags are allowed:

<a> <b> <i> <u> <font> <br />

Example: A <b>really great</b> gallery by <br />Me

Note for experienced SimpleViewer users: there is no need for any special syntax here. svManager will convert the html tags to a form acceptable by SimpleViewer.

Path from web root

This is the address of your gallery relative to the web root. If your server is http://www.mysite.com and the path from the web root is /svmanager/g1/ then the full web address is http://www.mysite.com/svmanager/g1/

The path can be changed to give your gallery a new name or even move it to another folder on the server.

You are advised to backup your gallery before moving it.

Changing the gallery name

The last part of the path from the web root is the gallery name. More precisely, it is the name of the folder or directory containing your gallery. The galleries are initially named g1, g2 etc. You can change the gallery name as long as you observe two rules:

  1. The new gallery folder must either not exist or the folder may exist and be empty.
  2. The new gallery name must contain only alphabetical characters, numbers, underscore ‘_’ and hyphen ’-’.

Example: you can change http://www.mysite.com/svmanager/g1/ to http://www.mysite.com/svmanager/sporting-shots/

Changing the gallery name has no effect on the gallery title that shows when you view your gallery in SimpleViewer.

Moving the gallery on the server

It is also possible to move the whole gallery on the server, simply by changing the ‘Path from the web root’ entry in the edit/customize screen. This is a powerful procedure and should be used with caution. Backup your gallery before moving it.

Example:

You can change /svmanager/sporting-shots to /othergalleries/sporting-shots

In order for this to work:

  1. The new gallery folder (/othergalleries/sporting-shots) either must not exist or may exist and be empty.
  2. Any folders above the gallery folder on the new path (‘othergalleries’ in the example above) must already exist. It doesn’t matter if they are empty or not.
  3. All image and thumbnail files must be inside the gallery folder to be moved and must be named ‘images’ and ‘thumbs’ respectively. svManager always creates its galleries like this, so problems are only likely to arise with imported galleries.

Advanced users should note that if you have any galleries with image or thumbnail files outside the gallery folder then svManager will not be able to move the external files. In this case, you are advised to unlist the gallery from svManager, move it by ftp, edit the gallery.xml file if necessary and re-import it into svManager.

Colors

The colors of the gallery text, gallery background and the frame around the images can be changed using the color picker. The color-picker pops-up when you click or tab into a color entry field in the form and it disappears again when you move to one of the non-color entry fields or click the close-box. If you prefer, you can enter a 6-character hexadecimal color number. You should not prefix the number with # or 0x and the prefix will be removed if you do. If the number you type-in is less than six characters or is not a valid hexadecimal color code then your entry will appear in red.

Example: enter 00FF00 for a bright green color.

Gallery Alignment

Alignment of the image and thumbnails within SimpleViewer.

Frame Width

Width of image frame in pixels.

Stage padding

The distance around the gallery edge in pixels. To have the image flush with the edge of the SimpleViewer stage, set this to 0.

Nav padding

The distance between image and thumbnails in pixels.

Max Image Width

The width of your largest image in pixels. Used to determine the best layout for your gallery. Also used by the image resize feature.

Max image height

Height of your largest image in pixels. Used to determine the best layout for your gallery. Also used by the image resize feature.

Navigate position

The position of thumbnails relative to the main image. Can be “top”, “bottom”, ”left” or “right”.

Thumbnail rows

Number of thumbnail rows. Setting this to zero will disable thumbnails completely.

Thumbnail columns

Number of thumbnail columns. Setting this to zero will disable thumbnails completely.

Add caption links

Automatically adds a link to each image caption in SimpleViewer. The link will open the image in a new window (or a new tab depending on the browser settings).

Right-click download

Whether to display an ‘Open In new Window...’ dialog when right-clicking on the main image in SimpleViewer (ctrl-click on Macintosh).

Background Images

svManager does not support background images. Advanced users can edit the gallery.xml file themselves to include a background image. See the advanced section of the manual for how to do this.

Add images screen

The ‘add images’ screen allows you to upload jpeg (.jpg), png or gif images to your gallery and create thumbnail images automatically. When you visit the screen for the first time, you will be asked to confirm that you want to use the embedded Java Applet. The applet has a Thawte security certificate and you can allow it to run in your browser. There may be a delay while the applet loads and the security is checked. Most browsers will show the java coffee cup image while this is happening but Firefox may just show a blank grey screen – sometimes for quite a long time. Wait a few moments and the uploader applet should appear.

Drag your image files to the box on the left of the screen. You can also drag a whole folder of images at once – the images in your folder and in any sub-folders will be added to the list of files to be uploaded.

The ‘add’ button provides an alternative to drag-and-drop for adding images to the upload list; you can use a file dialogue to find images on your local hard disk.

The ‘remove’ button removes selected images from your upload list.

The maximum upload limit is set by your server. See the advanced section of the manual for more information.

When you have finished adding files to your upload list, press ‘upload’ and wait for the upload to complete. A progress bar is shown and when the upload is finished the screen will reload and show an empty upload list. On slow servers you may have to wait a few moments for the page to reload.

Thumbnails will be created by svManager and stored inside your gallery folder.

It is possible that a compressed jpeg image will be small enough to upload but too large for your server memory allocation once it is expanded to its full size. In this case, svManager will give you a message to say that the thumbnail for this image cannot be created. The images screen and the gallery itself will show a cross image instead of the thumbnail but everything else should be ok. See the advanced section of the manual for more information.

Resizing images before upload

SvManager version 1.1.0 introduced an option to resize jpeg images before uploading. Image resizing can be turned on or off with the link underneath the file box on the upload page. The setting is remembered for the duration of the browser session and then reset to ‘off’.

Jpeg images are resized to fit the maxImageWidth and maxImageHeight settings on the customize screen. The frame width is taken into account. Small jpeg images and all png and gif files are uploaded without resizing.

The image resizing takes place in the java applet. The Apple Macintosh implementation of the java virtual machine is often significantly slower than the Windows version, so Mac users will need to wait longer for the resizing to complete.

Images screen

Image sizes

The image sizes are given as (width x height) in pixels under the file name.

Editing individual captions

Captions can be added or changed one at a time by entering text in the box to the right of the thumbnail image. There is no need to select the checkbox. The checkbox is used in conjunction with the ‘Set’ button to set several captions at once (see next section).

Captions can contain any text character plus the following html tags:

<b> <i> <font> <br />

Example: One of my <i>better</i> shots

The following tags can also be used in captions if the Auto caption links option is not selected in the Customize screen:

<u> <a>

Note for experienced SimpleViewer users: there is no need for any special syntax here. svManager will convert the html tags to a form acceptable by SimpleViewer.

There are two special codes that can be entered into captions:

{count} is translated into a sequential number when you press the update button

{file} is translated into the image file name.

These two codes are most useful in combination with the ‘Set’ button explained in the next section. They must be entered exactly as shown between two brace characters in lower case without spaces.

The gallery captions will be saved when you press the update button.

Setting a number of captions at once

The ‘Set’ button copies everything in the bottom text box to all selected captions, overwriting anything that is already there. So, for instance:

Deleting images

Select the checkboxes immediately to the right of the images that you want to delete and click the update button

Sort Screen

The sort screen was introduced in svManager version 1.2.0. The default is for a drag and drop sort – just drag the thumbnails around and press the update button to save the sort order.

If you choose one of the other sort order options from the drop-down list then this will override the drag and drop sort.

Your sort order will be remembered until you change it again.

Import screen

The import facility is provided for people who already have SimpleViewer galleries installed on their web site and would like to manage them using svManager. Import adds an existing gallery to the svManager gallery list but does not move the gallery itself, so any existing hypertext links will continue to work. However see the note on added files below if you want to control the background color or web page title of your gallery from svManager.

How to import a gallery

It is good practice to make a backup copy of your gallery before importing it to svManager. In any case, svManager will backup your gallery.xml file during the import process – see section on added files below.

svManager can only import galleries compatible with SimpleViewer version 1.8 and later. If you have older galleries then you will need to upgrade them first or simple create them again using svManager.

Enter the path of the gallery that you want to import and press the input button. The path should be relative to the web root.

Example: if you want to import the gallery at http://www.mysite.com/oldgallery/landscapes/ then the path is /oldgallery/landscapes/

The svManager program must have read and write permissions for the gallery folder to be imported and its contents.

If you are using the automatic index page then a link to the new index.php file for your imported gallery will be added automatically.

There is a sample gallery inside the svManager folder located at svmanager/samplegallery/ You can use this to test-out the import facility.

New files added by import

The import program backs-up your existing gallery.xml file to a new file named gallerysvmbak.xml in the same folder. If gallerysvmback.xml already exists it will be overwritten.

The import program adds two more files to your gallery folder: preferences.txt and index.php. If these files already exist they will not be overwritten.

Preferences.txt is used to store…you guessed it…your preferences for the gallery, such as thumbnail sort order.

Index.php is an optional replacement for your existing index file – typically index.htm or index.html. The reason for index.php is to enable you to change the background color and web page title of your gallery in svManager.

If you are happy with your background color and web page title as they are, then you can continue to use your existing index.htm or index.html file. Any changes you make to background color in svManager’s edit/customize screen will be remembered but will have no effect on your gallery.

If you have your own web site navigation links and you want to be able to change the background color of the gallery or the contents of the html title tag from svManager, then you will have to change your hypertext navigation links to go to the new index.php file rather than the old index.htm or index.html. Note that if a hypertext link points to the folder containing an index file, rather than the index file itself, then most servers will give priority to index.html or index.htm before index.php.

Galleries Index

The file index.php in the main svmanager folder automatically generates an index for your galleries. Since version 1.2.0, a thumbnail is shown for each gallery. The thumbnail is created from the first image in your current sort-order – to change the thumbnail, change the sort order in the sort screen. If your gallery does not have any images then a thumbnail showing an 'X' will be shown. If you have recently upgraded to svManager version 1.2.0 then you may need to go to one of the edit screens for each gallery and press the 'Update' button.

The automatic index is provided for your convenience – you can remove it if you have no use for it without affecting the operation of svManager. Keep a back-up in case you change your mind.

You can change the appearance of this page by editing the source code (see the entry in Advanced Topics)

Advanced Topics

svManager is designed to be easy to use for people with limited technical knowledge. If you are in this category then you probably don't need to read this section. Advanced users who are familiar with file paths, html, css and possibly php should read on…

Multiple Users

Whenever more than one person is updating a web site or any kind of computer code there is scope for confusion and in rare case on some servers it is possible for files to become corrupted. A few simple precautions will keep you out of trouble. Consider for example the scenario where you create an svManager installation for your client:

  1. You or your client (or both) should take regular backup copies of the whole svmanager folder and its contents.
  2. Implement a handover system so that only one person is empowered to use svManager at any one time. A simple 'over to you' email will work in most cases.
  3. Consider keeping two copies of the svmanager installation on the server. One is a development copy for you and the other is the live copy for your client and the web site visitors. You can keep the search engines out of your development copy with a robots.txt file.

Removing the underlines from caption links

If you are using the option to generate automatic caption links but you don't want the captions to be underlined in SimpleViewer then edit the file svmanager/includes constants.php and locate the line:

define('UNDERLINE_CAPTION_LINKS', true);

Change this to:

define('UNDERLINE_CAPTION_LINKS', false);

Using your own custom thumbnails

SvManager always creates the largest square crop from each image to create the thumbnail. You may wish to create your own thumbnails so you can define the crop. Create the thumbnails in an image editing application such as Adobe PhotoShop and upload them to the thumbs folder inside your gallery folder. Each thumbnail must have the same file name as the corresponding image.

By default, new thumbnails will be created when you use the gallery 'rebuild' option. Since svManager version 1.2.0, this can be changed. If you do not wish your custom thumbnails to be overwritten on rebuild then edit the file svmanager/includes/constants.php and locate the line:

define('OVERWRITE_THUMBNAILS', true);

Change this to:

define('OVERWRITE_THUMBNAILS', false);

Hiding parts of svManager from the user

Developers who are setting-up galleries for their clients may wish to hide some of the features of svManager. Since version 1.2.0, a custom style sheet has been provided for this purpose. Edit the file svmanager/custom.css. By default, this style sheet does nothing since all the content is commented-out. To hide part of svManager, remove the comments /* and */. For instance, to hide the delete link on the galleries page locate the line:

#actiondelete {
/* display: none; */
}

and change to:

#actiondelete {
display: none;
}

The delete link will still exist in the html code but will not show on-screen. Replace the comments and the link will reappear.

Editing the automatic galleries index page

The file svmanager/index.php provides an automatic index to your galleries. Links to new and imported galleries will be added automatically. The visual design is deliberately simple so you can edit it to your own requirements.

Take a look at the source code of svmanager/index.php in a text editor (not from a browser) and you will see a basic html and css layout with several short section of php code, identifiable by their php start and end tags <?php...?>. The default setting is for the php to generate an html table with two columns. You can change the number of columns by editing the following line:

$columns = 2;

If you set the number of columns to zero then instead of a table, the program will generate a series of divs – useful for css layouts.

You can change any of the html or css outside the blocks of php code. The generated html is provided with css ids and classes so you have a lot of control over appearance. Look at the page with the 'view source' option from your browser and you will see the generated html with its ids and classes.

You could also copy and paste the php code into your own page – you will need to give it a .php file suffix.

Moving the automatic galleries index page

If you move the automatic galleries index file outside the svmanager folder, you must edit the following line in the index.php file:

$pathToManager = '';

Set the $pathToManager variable as the relative path from your gallery index file to svmanager. For instance, if your gallery index url is http://www.mysite.com/index.php and the url for svManager is http://www.mysite.com/galleries/svmanager, then change the code as follows:

$pathToManager = 'galleries/svmanager';

You will also need to tell svManager where to find your index file. Edit the file svmanager/includes/constants.php and locate the line:

define('INDEX_URL', 'index.php');

Change this to the url for your index file. For instance:

define('INDEX_URL', 'http://www.mysite.com/index.php');

You can also use relative or absolute links here, for instance '../../index.php' or '/index.php'.

Editing the xml file

With svManager there is usually no need to edit the gallery.xml file manually. However, if you have a special requirement that cannot be handled by svManager then Instructions for editing the xml file can be found on the Airtight web site.

The recommended procedure for galleries that are being managed by svManager is as follows:

  1. Make a backup copy of your original gallery.xml file or backup the whole gallery
  2. Use the unlist option on the svManager galleries screen to remove your gallery from the svManager database.
  3. Edit your gallery.xml file and test the appearance of the gallery in SimpleViewer.
  4. Make a backup copy of your edited gallery.xml file.
  5. Import your gallery back into svManager.

Relative and Absolute Paths

The paths to the images and thumbnails folders are stored in the gallery.xml file. By default, when svManager creates a new gallery, the gallery.xml file will contain paths that are relative to the svmanager folder. This is usually the best and simplest option.

If you need to create galleries with absolute paths then you can change a setting in the svmanager/includes/constants.php file. Locate the line:

define('PATH_SCHEME', '');

and change this to the url or web root path to your svmanager folder, for instance:

define('PATH_SCHEME', 'http://www.mysite.com/svmanager/');
(note the upper-case letters and the trailing slash)

or

define(PATH_SCHEME', '/svmanager/');
(note the upper-case letters and leading and trailing slash)

When you import, unlist or move a gallery, svManager will not change the paths in the gallery.xml file. Any relative paths will stay relative and any absolute paths that you have entered yourself will stay absolute. This applies to svmanager versions 1.0.6 and later.

Moving galleries

All galleries created by svManager place the image and thumbnail files inside the gallery folder and name them images and thumbs respectively. This will not necessarily be the case for galleries that you have created yourself and imported into svManager.

Do not use svManager to move galleries with external image or thumbnail files. Instead, you are advised to use the ‘Unlist’ option on the galleries screen to remove the gallery from svManager, move it by ftp, edit the gallery.xml file if necessary and re-import it into svManager.

Moving or renaming the svmanager folder

Do not simply rename or move the whole svmanager installation on your server. This is how to do it safely:

  1. Back-up your svmanager folder to a safe location.
  2. Use the option on the galleries screen to unlist all your existing galleries
  3. Rename or move the svmanager folder using ftp or similar
  4. Import your galleries back into svmanager.

Setting the defaults for new galleries

If you are creating a lot of similar galleries then you may want to change the default settings that appear on the customize page when you have added a new gallery.

In version of svManager before 1.1.0, most settings were stored inside svmanager/svmaster/gallery.xml. You can edit this file according to the instructions on the Airtight web site.

In svManager version 1.1.0 and later, defaults can be set in the svmanager/includes/constants.php file.

First, check on the admin screen that you are running svManager version 1.1.0 or later.

Next, look inside the svmanager/svmaster folder for two files named preferences.txt and gallery.xml. These files are not needed in version 1.1.0 and later. One or both may be there as a leftover from an earlier installation. Rename them to preferences.bak and gallery.bak or delete them. Do not delete any files of the same name in other folders.

Edit the file svmanager/includes/constants.php. For instance, to change the default background color, locate the following line and change it to the color you require:

define('BACKGROUND_COLOR', '0x181818');
'0x181818' can be changed to any valid hexadecimal color code.

Changing the permissions set by 'Unlist'

This feature was introduced in svManager version 1.0.6.

See the troubleshooting section for some background information on permissions.

On some servers, the files and folders created by svManager cannot be edited by the ftp user. When you choose the 'Unlist' option on the galleries page then, if the server allows it, svManager will change the file and folder permissions to facilitate editing. The default is to attempt to change the folder permissions to 0775 and the file permissions to 0664.

This level of permission may still be inadequate on a few servers. You can change a setting in the svmanager/includes/constants.php file so 'Unlist' attempts to change the permissions to the highest level 0777.

Locate the lines:

define('DIR_MODE', 0775);
define('FILE_MODE', 0664);

and change these to:

define('DIR_MODE', 0777);
define('FILE_MODE', 0777);

Note that there are no quotes around the 0777 and the leading zero is required.

The 'Import' option does not make any changes to permissions. After editing your gallery files and optionally re-importing the gallery into svManager then you may wish to use ftp to change the permissions back to what they were before unlisting.

Changing the permission on new galleries

This feature was introduced in svManager version 1.2.0

When svManager creates a new gallery, the folder permissions are set by the server. This is usually the best option but you can change the permissions on new gallery folders as follows:

Edit the file svmanager/includes/constants.php and locate the following lines:

define('NEW_GALLERY_CHMOD', false);

define('NEW_GALLERY_DIR_MODE', 0755);

Change the first line to:

define('NEW_GALLERY_CHMOD', true);

Change the second line to give the permissions you require, for instance:

define('NEW_GALLERY_DIR_MODE', 0777);

Note that there are no quotes around the 0777 and the leading zero is required.

Back-up

You should back-up your galleries regularly. To backup, copy the whole svmanager folder to a safe location.

Using svManager with SimpleViewer-Pro

To upgrade your svManager galleries to SimpleViewer-Pro, do the following:

  1. Purchase SimpleViewer-Pro.
  2. Download and unzip the SimpleViewer-Pro files to your computer.
  3. Upload the '/web/viewer.swf' file from the Pro download to the 'svmanager/svmaster' folder on your web server.

From now on, any new galleries will be created using the Pro viewer. To upgrade existing galleries, click 'Rebuild' on the Galleries screen.

Using svManager with WordPress

Twan van Landschoot has written a tutorial on how he achieved seamless integration of svManager and a WordPress theme. Some familiarity with WordPress is assumed.

Troubleshooting

First-aid

If you have just installed svManager and something is not working then try the following first:

  1. Check that all the files and folders have unzipped properly. In particular, check that svmanager/svmaster/images and svmanager/svmaster/thumbs have unzipped ok. These are just empty folders and some zip utilities seem to have problems with empty folders.
  2. Make sure all the files and folders have uploaded properly. Compare what is on your server with the contents of the zip file that you downloaded from the Airtight web site.
  3. Check the file and folder permissions (see the permissions section).

Permissions

The most common problems are caused by having the wrong permissions on files or folders. If you are not familiar with this topic you could read-up on the basics at Wikepedia.

Permissions on most Unix servers can be changed by ftp. The suggested permissions for svManager are given below, first in octal notation and then in the alternative symbolic notation. Note that setting permissions on a folder does not necessarily change the permissions on the folder contents – you may have to go over all the files, changing them one by one.

Set all folders to 0755 (rwxr-xr-x)

Set all files to 0644 (rw-r--r--)

These permissions are sufficient for most web servers. Specifically, they should work on servers where the ftp user that uploads your files has the same name as the web user that runs svManager.

If you are still getting error messages, try the following:

Set all folders to 0775 (rwxr-xr-x)

Set all files to 0664 (rw-rw-r--)

The 0775/0664 permissions should work if the ftp and web users are different but in the same group. If you are still having problems then it's probably because you have two different users and they are not even in the same group.

You could change all file and folder permissions to:

0777 (rwxrwxrwx)

The 0777 setting will probably work but it is less secure. The alternative is to contact your web server administrator or helpdesk and explain that you want to install a php application that needs to share files that you upload by ftp. Specifically, svManager needs read, write and execute access to the svmanager directory and its sub-directories. It also needs read and write access to the files in the svmanager directory and its subdirectories.

Windows servers vary in their means of setting permissions so it’s not possible to give comprehensive instructions. You may need to consult your service provider or system administrator. Basically, you are trying to achieve the following:

  1. The svmanager folder must have the correct permissions to allow PHP scripts inside it to run
  2. Your PHP scripts must be able to read and write files in the svmanager folder and its sub-folders.
  3. Your PHP scripts must be able to create new folders inside the svmanager folder and copy files to them.
  4. If you wish to use the gallery move facility on the edit/customize screen to move galleries outside the default galleries folder then you will also need read and write permissions for your new folder.

Debug Mode

svManager normally traps any php error messages and produces its own messages. It is possible to bypass the error-trapping and see the full error messages from the php system which may contain more detailed information to help you trace the problem.

To set debug mode, first locate the file svmanager/includes/constants.php. Open this file in a text editor and find the line that reads:

define(‘DEBUG’, false);

change this to:

define(‘DEBUG’, true);

Note that DEBUG must be in upper-case letters.

Do not change anything else in this file – it might be a good idea to keep a backup! Upload the file to your server to replace the existing one.

When you have finished debugging, you should reset the contents of this file back to the original values – debug mode can give too much information away to any would-be hacker – and anyway, it just looks messy!

Error messages such as Error: cannot find xxx file' or ‘Warning: cannot write to xxx file’.

This type of message is usually caused by incorrect permissions.

Error message: gallerydata.txt is corrupted

Backup your whole svmanager folder to a safe location. Delete the file svmanager/data/gallerydata.txt. Your galleries will not show in the gallery listing but will still be there. Use the import screen to re-import your galleries one-by-one.

Problems with the file uploader

The uploader in the ‘add images’ screen is a java applet. Most problems will be resolved by installing the latest version of the java runtime environment (JRE), available available free from www.java.com

On a Macintosh computer, you just need to ensure that your operating system software is up to date and this should update the java virtual machine automatically.

The Java Tester web site will tell you what version of Java is running on your browser and also has a lot of useful background information.

'Applet failed to load' message on the uploader page

If you get this message immediately after installing svManager then re-upload the following two files with your ftp program in binary transfer mode:

svmanager/uploader/myuploader-source-signed-v19.jar
svmanager/uploader/labels.jar

Most ftp programs offer a choice of three transfer modes: binary, text and auto. You must ensure that these two .jar files are uploaded in binary transfer mode. Images should also be uploaded in binary mode. All the other files should be uploaded in text mode. Ftp programs should do this automatically but sometimes they get it wrong.

Not enough memory to create thumbnails for large images

The server memory allocated to php is set independently of svManager in the php.ini file. Some servers will have more generous memory allocations than others.

Before trying to create a thumbnail, svManager checks if your server has adequate memory. If not then it will not create the thumbnail and will give you a warning. If you have access to the php.ini file then you can increase the value of the memory_limit directive. Otherwise, you could ask your server administrator or service provider to increase the memory limit.

The default memory limits for the latest versions of php5 are higher than for php4. svManager is fully-compatible with php5 so if you have the choice, then go for php5.

If you cannot increase the server memory allocation then your only options are to create your own thumbnails in a program such as PhotoShop and upload them by ftp or simply to use smaller images!

File size limit on the upload screen

The file size limit on the upload screen is calculated from the values of two configuration directives in the php.ini file on your server: post_max_size and upload_max_filesize. The memory limit is the lesser of these two values.

If you have access to the php.ini file then you can increase the values of these two directives. If you are changing them substantially then you may also want to increase the value of max_execution_time and max_input_time to prevent your script from timing-out before it runs out of memory. Time-out errors will show as a server error during the upload process and the upload will be cancelled.

Forgotten password

If you forget your password or you are having any other problems logging-on, then upload the file svmanager/data/auth.txt from the original distribution provided by Airtight Interactive. Put it in the same location on the server so it overwrites your auth.txt file. This will reset both user name and password to ‘admin’.

Once you have successfully logged-in to svManager, then you should go to the Admin screen and change your password right-away.

"Please confirm which user you are changing the password for"

This message or a similar one does not come from svManager, it comes from Firefox Password Manager. Firefox attempts to remember your web site passwords so that it can fill them in automatically when you are logging-in. Sometimes Firefox gets confused and pops-up a message like this one. It can happen with any web site, not just svManager and it does not affect your ability to log-into the site.

You can delete stored passwords in the Firefox preferences under Security>Show Passwords. If you delete all of Firefox's stored passwords for a web site then it will ask you again if you want to store the user name and password next time you log-into the site.

Of you could just turn-off Password Manager in the Firefox Preferences.

Other browsers may show similar behaviour.

Problems importing a gallery into svManager

SvManager can only import galleries containing SimpleViewer 1.8 or later. If you have galleries from an earlier version then you can find upgrade instructions on the Airtight Interactive web site but it is usually easier to create new galleries in svManager.

Other import problems are most likely caused by incorrect folder and file permissions for the gallery you are trying to import. svManager must be able to read the gallery folder and its contents and also write to the gallery folder.

Restoring the gallery.xml file after import

During the import process svManager will make a copy of your gallery.xml file and store it in the gallery folder as gallerysvmbak.xml. You can restore your xml file by first deleting or renaming gallery.xml and then renaming gallerysvmbak.xml to gallery.xml. Backing up your xml file only happens automatically during import so if you have made a lot of changes then it will rapidly get out of date.

Error messages about sessions

A few servers are not set-up to support sessions. They will give an error message similar to the following as soon as you try to log-in to svManager:

Warning: session_start() [function.session-start]: open(/var/php_sessions/sess_cd4351b20419e4b1e7d8c39d21c6ba7d, O_RDWR) failed: No such file or directory (2) (auth.php, line 44)

The details of the message will vary but look for 'session_start'.

Contact your server admin or help desk and tell them you have installed a php application that is trying to start a session and quote your error message. They should be able to fix it or give you instructions to fix it yourself.

Upgrading existing galleries to svManager version 1.1.0 and later

In new galleries created with svManager v1.1.0 and later, the gallery web page title (the html title tag) is the same as the gallery title set in the customize page. Previous versions set the web page title for all galleries to ‘SimpleViewer’. If you have created galleries using an older version of svManager and you want to replace the old ‘SimpleViewer’ title with the gallery title then you will need to do the following:

  1. Unlist the gallery on the galleries screen
  2. Use ftp to rename the index.php file inside the gallery folder to (say) indexbak.php
  3. Re-import the gallery into svManager. SvManager will detect that the index.php file is missing and will replace it with a new one.
  4. If you have previously edited your index.php files to change their appearance then you should copy over your edits from indexbak.php to the new index.php.