Installation Customize the Thank You Message
|
The fastest, easiest & cheapest way to submit your site! 1. Decompressing and transferring the files: submit.zip contains 4 files:
NOTE: if you use FTP to transfer the files, be sure to use ASCII mode and not Binary mode, as Binary will add a bunch of ^M characters to the script and it will not work! 2. Make sure the file permissions are correct on submit.cgi. The file submit.cgi needs to be readable and executable by everyone. You can type "chmod 705 submit.cgi" at the telnet prompt to do this, or set the permissions using your FTP program. The files submit.dat and submit.tha need only be readable. You probably don't need to do anything to these files, and SimpleSubmit will tell you if the DAT file is not readable. If you do need to change them, You can type "chmod 604 submit.dat" and "chmod 604 submit.dat" at the telnet prompt, or set the permissions using your FTP program. 3. The top line of submit.cgi may need to be altered: #! /usr/bin/perl This is used to tell the script where perl is located on your server. If you don't know, you can type "which perl" at the telnet prompt, or contact your system administrator. 4. Edit the configuration variables: There are a total of five configuration variables in submit.cgi, but you will likely only have to edit one of them: @referers. @referers is an array of domains that can use this script. This is a security feature so that other webmasters cannot 'freeload' off of your script. Add your own domain name here, or the domain name of your web host. You can add as many domains as you like, separated by comas. If you would rather allow anyone to use your script and not implement the security, then you can simply comment out this line by putting a # in front of it. $script_url is the URL to the script on your server. This line only needs to be modified if you changed the name of the script or are getting 404 errors. If you are, try using the full URL: http://www.domain.com/cgi-bin/submit.cgi $dat_location is the server path to the DAT file. As long as the DAT file is in the same directory as the script and you did not rename it, you shouldn't have to edit this line. SimpleSubmit will tell you if it cannot find the dat file, in which case you may need to use the full path (ex. /usr/www/accountname/cgi-bin/submit.dat). $sendmail is the location of sendmail on your server. You only need to set this variable if you want to send a Thank You message to your visitors when they use the script. To find out the location of sendmail on your server, type "which sendmail" at the telnet prompt or ask your system administrator. $thank_you is the location of the Thank You message. As long as the Thank You file is in the same directory as the script and you did not rename it, you shouldn't have to edit this line. If you continue to get the default thank-you message even though you have created a custom one, then you may need to use the full path (ex. /usr/www/accountname/cgi-bin/submit.tha). 5. Edit the HTML form: This is the last step! You may need to edit the action line in the form to point to submit.cgi on your server. If you put submit.cgi in /cgi-bin/ then you may not have to edit this line. View the source code of this document and copy the form that you wish to use on your site. Please feel free to be creative when designing the page! You do not have to use the SimpleSubmit! design, but a link to the script page would be appreciated: http://www.verysimple.com/scripts/ If you have questions or problems, please visit: http://www.verysimple.com/scripts/ The following are some example forms that you can use on your website. You may want to modify the design of these forms to match your own site. The script options: Confirmation Page, Email Thank You, and the Choice of Engines are all customizable. You can decide to give your visitor complete control - or make some of the options automatic (by making the form variables hidden). The advantage to making the variables hidden, is that your visitor has less choices, therefore it is easier to use. Also, you may always want an email message sent to attract more return visits to your site. The HTML code for each of these forms is commented and explains what all of the variables do. View the source code of this page and copy -n- paste it onto your own web page. Remeber, you don't have to use these forms exactly as they are, you can alter the hidden variables to create a form that works exactly the way you want. SimpleSubmit! Sample Form 1 This sample form contains all the fields needed to allow your visitors complete control. Please modify the design of this page to match your own site and be creative!
SimpleSubmit! Sample Form 2 This sample form contains the fields needed so that there will always be a confirmation page and an email Thank You message will always be sent.
SimpleSubmit! Sample Form 3 This sample form contains the fields needed so that there will never be a confirmation page, the visitor does not have the option of seeing the confirmation page. An email Thank You message will never be sent either. Also, in this example, there are no choices for which engines to select. This means that the default engines will be used every time. (The default engines can be modified in the DAT file)
SimpleSubmit! Sample Form 4 This sample form contains the fields needed so that there will always but an email Thank You message will never be sent. Also, in this example, there are no choices for which engines to select. This means that the default engines will be used every time. (The default engines can be modified in the DAT file)
There are three frames that may show up in addition to the search engine frames. They are the bannerframe, oddframe and the errorframe. The URL of these frames is set in the DAT file. If you prefer, you can change these frames to a web page that you design by simply modifying the URL. bannerframe appears every time someone uses your submit script. By default, this points to a script on VerySimple server which reads input from the script and creates a "back" button based on the referring url. oddframe is a frame that appears when there are an odd number of frames. By default, it is an ad for scripts on VerySimple. errorframe is a frame that appears when the engine selected in the form is not defined in the DAT file. This happens if you make a spelling error on the form, or you upgrade your form to include additional engines, but forget to update the DAT file. It is not really recommended to change this URL, instead just fix your form! Customize the Thank You Message Customizing the Thank You message that is sent to you visitors is very simple. The file submit.tha is simply a text file that can be edited using any text editor. The only thing to be aware of is that the first three lines of the file must remain consistent, otherwise the email message may not have the correct From: and Subject: field. The format of the file should be like so:
You can be a part of the development of this script! Search engines can be added and/or modified by editing the DAT file that is included with the script. This requires very little understanding of Perl, but you will have to edit a couple of lines of the DAT file. It is not necessary to do this to get the full benefit of SimpleSubmit, but it does allow you to customize the script for use with Free-For-All links pages, awards pages and Search Engines that require more than just URL and Email. As search engines change, updated DAT files will be distributed from http://www.verysimple.com/scripts/. If you discover a new search engine, or find that an old one has changed, please feel free to make the changes to the DAT file and send them to VerySimple. We will likely include them in a future DAT file. Note for Perl programmers: the DAT file is loaded into the script as a library file. You'll see that the DAT file is actually one subroutine which is called from the main program. The way the DAT file works is that it assigns a URL to an associative array. Each array "value" has a unique name -or- "key". If you look a the 'engines' variable options on Sample Form 1, you'll notice that these match the array keys in the DAT file. To add a new engine, you simply add another unique array key, edit the URL, and then add a new checkbox to your form. Looking at each array, you should be able to see where the variables go. You will, of course, have to inspect the original submission page to see what the variables are called and so forth. If you look at the DAT file, the very last engine that is listed as an example, the line begins: $url{'vs-demo'} = This is an example of a Free-for-All links page that requires a title field, URL and a section field. To add support for this page, we just need to add a new checkbox, and add the new fields to our form. Also, most FFA pages require that the method is "post" instead of "get" So, you need to add one line of code to the DAT file as well indicating that this should be submitted via post. See the file submit.dat that came with the script for an example. This form below allows you to submit to a VerySimple Free-For-All links Demo Page. SimpleSubmit will support as many variables as you'd like. The official SimpleSubmit page only has URL and Email to keep it fast and simple, but the actual script is not limited in this way:
SimpleSubmit! © 1998, Jason M. Hinkle |