Download Perl Scripts

FAQ Search 61121-2238FAQ Search - $0 Version 61121-2238
Add to Cart



back
subscribe
download
demo/see it work
RSS Feed
_______________________________________

FAQ-Search by CrookedBush.com Inc.
(c) 2000-2003 Jason Silver

_______________________________________
Thanks for Registering!


This script is early in it's development. Keep
watching for more and more updates.
Report any bugs to jasonsilver@crookedbush.com.

Yours,
Jason Silver

_______________________________________
Overview:
--------

When I set up my FAQ page I tried to find a script which would manage
questions for me, allowing people to search the database, and interact
with the answers. As the existence of this script attests to, I was
not successful in locating something.

FAQ-Search does not do everything I want it to yet, but I hope to add
more of these features over the next few months.

It will soon manage the FAQs to the degree that as people ask new questions,
they are saved in the database as 'pending'. You will be able to reply to
the email from the script, and your response will be posted as the official
answer to the question. The original questioner will also be emailed with
the response.

The script works as a Server Side Include script. It will still work without
SSI, just call it directly instead of using the faq.shtml page.

_______________________________________
Installation Overview:
-----------------------

1. Setting some options at the beginning of the script file (faq_engine.pl)
2. Adding questions and answers to the database file (faq.txt)
2. Using FTP to upload the files
3. Setting permissions on the files

_______________________________________
Here's How!
-----------

1. Using a text editor like textpad, or notepad, open the *.pl scripts
The only thing to do is to change the path to perl so that it's
configured for your server.

It's usually:
#!/usr/local/bin/perl
or
#!/usr/bin/perl
--------
Also, within the script are the following variables:

A path is different from a URL. It is usually something like
/data/web/htdocs/etc/cgi-bin
or
C:/webs/dir/etc/cgi-bin/
$cgipath = ''; # path to this script (from server root)
--------
$emailprog = '/usr/sbin/sendmail'; # your mailer program...
--------
You don't need to escape the @ symbol with a slash, since it's between single quotes.
$admin_email = 'jasonsilver@crookedbush.com';
--------
This is your administrator's password:
$adminpass = "password";
--------
This is the file where the frequently asked questions are saved.
$server_file = "faq.txt";
--------
This is the number of records to display one one page.
$records_to_display = 6;
--------
This is the path to the frequently asked questions file ($server_file). Leave
it blank if you save the faq.txt file in the cgi-bin, (with the script).
$datapath = "";
--------
If you cannot use Server Side Includes, then change this to the URL to the script
from the root. For example, if the url is www.mysever.com/cgi-bin/faq_engine.pl
then the $html_page would be cgi-bin/faq_engine.pl or cgi-bin/faq.shtml
$html_page = "/faq.shtml"; # for using Server Side Includes
--------
This search is performed when the script is first called.
$default_search = "";
--------
If you have multiple categories, then pick one as the default, and place it here.
$default_category = "category";
--------
This causes the default view to hide the replies. Set it to zero to show the replies
as the default.
$hide_replies = 1; # default
--------
Change this to the full URL if you have trouble with the environment variable below:
$url = $ENV{'SERVER_NAME'};
--------
place your admin login and password below:
$login = 'admin';
$password = 'password';
--------
$highlight_color = 'yellow';
--------
This will show the categories in the script to choose from.
$display_categories = 1;
--------
Allow searches to be more specific. To shut this off, set to 0.
$search_each_word = 1;
--------
You shouldn't need to change this, unless you're using the script for another language.
This prevents the script from searching through commonly used words. They are ignored in
a search.
@common_words = ("a","at","be","do","for","how","to","the","so","my","but","is","it","on","this","i");

2. The database file is made up of three columns: the category, the question, and the answer.
Each column's data is separated by a comma, and enclosed in double quotes like this:
"Stupid Questions","Why is the sky blue?","I don't know."
"Stupid Questions","How do I get up in the morning?","Use an alarm clock."

3. Use an FTP program like WS_FTP or CuteFTP (just some examples I'm aware of) and
upload the faq_engine.pl file to your server's cgi-bin.
Upload the icon_faqsearch.jpg to your server in a root folder called images
Upload the text file faq.txt to the directory you specified above in $datapath.

4. Set permissions (CHMOD) on the faq_engine.pl files so it is executable. (755).
The owner should be able read, write, and execute.
The group should be able to read, and execute.
Also, other should be able to read, and execute.

Set permissions (CHMOD) the faq.txt file so it is readable and writeable (777)
The owner should be able read, write, and execute.
The group should be able to read, write, aand execute.
Also, other should be able to read, write, and execute.


Yours,
Jason Silver

_______________________________________
www.CrookedBush.com




 
top next subscribe download demo/see it work xml pad file RSS Syndication OPML List - All Programs



[admin]

FileCABINET Script - Create a File Download section on your site.

In the Spotlight

textonly $0.00
Add to Cart
 
It can be a time consuming task to create and upload those critical "text-only" versions of your web pages to the server. Now there's an easier way-- one little script in your cgi-bin and viola! instant text only pages created in real time.
[more & download links]

What People Say

ESC - Excel Shopping Cart $0
Add to Cart This is very easy to maintain. Especially since my clients aren't web savvy, but know how to use Excel. They can easily change prices for items and upload them. A nice upload form would complete the package, but I can actually manage that myself. Great script!

[more & download links]

Post Page Comment