[  back to support forum  ]
 
Keyword Navigator 1.0 (BETA)
Keyword navigation and proofing system (PHP) by Nate Baldwin

[ download a printable PDF version of this page ]
 
"Keyword Navigator" was designed to be an easy to use navigation system perfect for directing clients to the appropriate proofs, start pages, order forms, etc.

NOTE: This script was NOT designed for:
  • Creating a super-secure, hack-proof password protection system for very sensitive data
  • Running on versions of PHP before PHP4
  • Ridding the world of all evil

If the above are features you are looking for, then this isn't the script for you. You are welcome to Contact Us about creating a custom script.

How does it work?

This script works by using the keyword entered to build the URL for the appropriate proof page to go to. For instance, if you want to take the visitor to the page "proof1.html", their keyword would be "proof1". Also, if you wanted to just take them to the index.html page inside a directory or foldernamed "proof1", their keyword would also be "proof1".
 
If you'd like to see a working example of this script, use these links...
Example 1 - using flat directory with .html extensions
Example 2 - using multiple folders with default index page
 
  
Setting up the Script:

Before getting very far on this, you'll want to make sure you are able to run PHP scripts on your server. If your server offeres PHP, then you're ready to get started. There is actually nothing that you need to change in the script file itself. If you have not already done so, download a copy of the PHP script from here...
Download the file:      Mac OS    |    Windows
To force the files to download, they have been compressed, and will need to be decompressed before using (use Stuffit Expander for Mac, or WinZip or similar for Windows).

To "install" the script, simply upload it to your server. You must put the script in the same directory or folder as your page that has the keyword form. There's no need to install this into a cgi-bin. Your server may require that the script have a different file extension to be recognized as PHP, but .php is the standard. If things are not working at all, that would be the first question I'd ask your service provider.
 
HTML Form:

You will need to build a simple HTML form to use the script, following a few specifications. If something about these instruction doesn't make sense, there are 2 different example folders that were downloaded with the script. Open the index.html page inside either example folder to see a sample form.

First, you'll have to set your form action to point to the location of the KeywordNav.php file that you've installed on your site. (in GoLive, just click on the form tag and type or link the location of the script in the action field). The form method must be set to "post", not "get". Since the PHP script must be in the same folder as your form, the finished form tag should look something like this (though form name may vary)...
 
<form action="KeywordNav.php" method="post" name="FormName">
 
In this simple for, you'll need a single text field named "keyword". This is where the visitor will enter their keyword to be taken to the right page. You will also, of course, need a submit button.
 
There are also a few hidden fields that will need to be added to the form. These will be invisible to your visitors, but will pass some necessary information to the script. If you aren't familiar with hidden fields, a hidden field tag looks something like this...
 
<input type="hidden" name="field_name" value="field value">
 
There are 4 different hidden fields that you will add - some are required, while others are optional features. The details are described below...

directory
This field is REQUIRED. The name of the field must be directory. For the value, enter the path to the main folder that holds all of your pages that the form will redirect the visitors to. In my examples, the directory value is "proofs".

error_page
This field is REQUIRED. The name of the field must be error_page (make sure to use an underscore instead of a space), and the value should be the name of your error page. Why do you need an error page? If someone enters a keyword that is incorrect, or doesn't point to any of your pages, then they will be taken to the error page instead.
 
You should create the error page yourself. Just build a new HTML file. The file in my examples is named "error.html". It can have anything on it you want - a new form to "try again", a message alerting the visitor that the keyword is incorrect, etc.
 
The error page must be in the same folder as your .php script and main HTML form. If not you will get an error.

extension
Whether this field is required or optional depend on how you've set things up. Sure, I'll explain... You'll note the "directory" field we made above - that was where we'll be putting all your pages that we'll be redirecting to. If all your pages will have the same file extension, such as .html, then you could just put all your pages directly into the "directory" folder, and name them appropriately with an .html extension.
  
For instance, if you're using "project1" as a keyword, then you'd name your page "project1.html" and put it in the "directory" folder. Then if you include a hidden field named extension and set the value to .html, the visitor will be taken to project1.html (keyword + extension)
 
If all your pages to redirect to do NOT have the same extension, then you DON'T want to use this feature. That way, you just put an additional folder with the same name as the keyword into your main "directory" folder, and the script will take the visitor to the default page (index.html, index.htm, index.php - whatever) inside that secondary folder.
 
capitalization
This feature is optional, but recommended. Create a hidden field named capitalization and set the value to either "upper" or "lower". This way, it doesn't matter if the visitor enters their keyword in upper case or lower case - the script will convert their entry to whichever you specify. It's important to name your files and folders accordingly so the script fixes the entry to match what the actual files and folders are named.


Well, that should do it. The most confusing thing about this script is probably getting all your files and folders put into the right place. If you are unclear on what any of the instructions mean, you might take a look at the example files included with your download. Those are already set up and positioned as they should be (2 different options).
 
If you've looked at the example files and something still doesn't seem quite right, your best source of help is to post a question on our SUPPORT FORUM. You will probably want to include a link to your sample form page so someone will be able to see how things are set up.
 
Also feel free to post any other question or suggestions on the forum, and we'll do what we can. This script is still labeled as BETA until I get feedback from people to be sure it runs as well on other servers as it does on mine. Thank you for any feedback.


 
[  back to top  ]