The following is a detailed account of how to set up a basic PortWeb-served Catalogue on a Macintosh server running WebStar, using Extensis' templates. This article was kindly submitted by Michael Britt (firstname.lastname@example.org) of Alternistock. Test in code samples in blue indicates that you will need to change this to reflect the names used in your own project (server, catalogue and template names, etc.).
The PortWeb plug-in handles communication from your server software (WebStar) to your Database (Portfolio). Installation and set up of WebStar couldn't be more straightforward. With Mac ease of use you double click on the installation icon and go. If you already have an internet connection then you launch WebStar and it finds the IP address and starts serving. If you don't have a connection available you can use an internal testing IP address described in the manual (page 48). The default set up for WebStar will get you started just fine. Over time you will learn to optimise the settings by trial and error and/or by reading the WebStar mailing list. To install the PortWeb plug-in you drop it into the WebStar plug-ins folder and restart WebStar. When WebStar restarts it will add the phrase "PortWeb, It's Alive" to the plug-ins window to let you know it has been added successfully.
The first thing you do in PortWeb is to create an "alias" for your served catalogue in the Administration Module (pages 244-249). In a browser type in http://yourserver/.PortWeb?adminshow. Replace "yourserver" with the IP address or domain name of your web server (or the internal testing IP address for WebStar-192.168.0.2). In the alias box, give your served catalogue a short name. In the Path box, specify the exact path to the catalogue you wish PortWeb to serve. Example: MacHarddrive:WebStar:YourWebfolder:catalog. A hint on finding the correct path; go the folder that your catalogue is in and command click/hold on the name of that folder in the top of the window. Write down the next level up and repeat until you get to your main hard drive. You are now ready to modify the templates for your catalogue.
Paste the following code (found on the Basic_Mac.html page that is in the Basic folder in the PortWeb Templates folder) into your html search page:
<form action=".PortWeb?quickfind" method="post">
<p>Enter a keyword:
<input type="text" name="quickfind" value=""></p>
<input type="hidden" name="catalog" value="Sample">
<input type="hidden" name="template" value = "Simple">
<input type="submit" value="Search">
Be sure to change the catalogue from Sample to the name of the Portfolio catalogue you would like to serve - note this 'name' is the PortWeb alias you use in PortWeb's adminshow page and not the actual filename. Also change the template value to 'CC16'.
Open CC16 in a text editor and delete the <img src="/Images/portbanner.jpg"> as this is the Extensis logo. Then replace the catalogue (Classic) in the following script with your catalogue name:
<!-- // document.write statement below is all one line of code
document.write('<a href=".PortWeb?quickfind=' + escape('%Filename%') + '&template=Preview&catalog=Classic" target="_blank">');
You also might want to change the photographer information at the bottom of the page - unless you are H Armstrong Roberts! Save your changes and import the template into your Portfolio Catalogue:
Open ComplexCollect in your text editor and make sure that you replace your catalogue alias for sample:
<a href=".PortWeb?quickfind=%Filename%&template=Preview&catalog=Sample" target="_blank">
Save it as ComplexCollect and repeat the importing process.
Open ComplexCollectShow in your text editor and change the catalogue alias to your own. Save it as ComplexCollectShow and repeat the importing process from above.
Open Preview in your text editor and either delete the <img src="/Images/portbanner.jpg"> as this is the Extensis logo or insert the name of your own logo file. Under the title you need to add the "makeNewPath.js" link:
This links back to the JS folder you put in the root folder. Make sure the path is correct or the larger "Preview" image will not load. You substitute the name of you root folder if it is not WebStar in the following line:
<!-- // line below is all one line of code<
document.write("<img src=\"" + makeNewPath(document.pathForm.thePath, "WebStar","") + "\">");
Again, if you are not H Roberts change the contact info at the bottom of the page. Save as Preview and repeat the importing process.
You now have a working searchable database for the web. You can customise the look and feel by editing the templates. If you choose to do so in a WYSIWYG editor like Dreamweaver or GoLive, your PortWeb macros will corrupt (see the manual pages 288-9). The best way to make visual changes is to work on a copy of your template (CC16, ComplexCollect, ComplexCollectShow or Preview) and then cut and paste the code for your aesthetic changes directly from your HTML editor into the original template. Better yet, if you know HTML, you can work in BBEdit or any other text editor.
You will also benefit from reading these further tips on using templates.
Question: Setting up a basic site using WebStar (Mac OS) [FAQ00212.htm]
Last Update:- 01 June 2006
Site and articles © Mark Anderson 2001-2007 - Visit my home page