Graphics Management
Top  Previous  Next

In earlier versions of SSI Web, we assumed that graphics would be copied into the cgi-bin directory on the server. However, many ISPs prohibited graphics from residing in the same directory as the Perl scripts. When users created customized paths to graphics appropriate for their server setups, they then found that the preview mode and Local Web server could not display the graphics due to incorrect paths with respect to the local installation on their hard drives.

To resolve these issues, this version of SSI Web assumes a server installation that contains a separate graphics directory. We use the function [%GraphicsPath( )%] to specify the path to that graphics directory. When the survey is run on a server, the text "[%GraphicsPath( )%]" is replaced by the paths specified under File | Study Settings | Advanced... There are two paths related to graphics:

If the graphic is located on the login page, then the function [%GraphicsPath( )%] is replaced with the text supplied in the Relative Path From login.htm to Graphics field.  

If the graphic is located anywhere other than the login page, then the function [%GraphicsPath( )%] is replaced with the text supplied in the Relative Path From CGI Scripts to Graphics field.  

If you use the [%GraphicsPath( )%] function, Local Web Server always looks to the graphics subdirectory off of your study directory regardless of what you have specified under File | Study Settings | Advanced... But, when running on the server, SSI Web uses the paths to graphics specified under File | Study Settings | Advanced...

One benefit to using the [%GraphicsPath( )%] function is that if you need to change the path definitions for graphics, you only need to change them in one place (under File | Study Settings | Advanced...).

If you want to, you can choose not to use the system variable when defining the paths to graphics. You can provide an <IMG> tag with a relative or absolute path of your choice (where the path is the path from the Perl scripts to the directory containing the graphic, or the login.htm file to the graphic). However, customizing the paths will most likely mean that the graphics will not be able to be found when testing with Preview or the Local Server.