Installation

Important installation note: the database you define in config.php must still exist. The install script does not create the database for security reasons.
  1. Edit config.php so it fits your needs or call admin/mkconfig.php to generate one (if you're using PHP version >= 4.2.0, you have to set $new_global_handling=true; in mkconfig.php).
    Note: You can have multiple instances of FAQEngine in the same database. Just set tableprefix in config.php to different values for each installation. Do this before calling install.php.
  2. Upload all files (.php, inc. ...) to your webhoster. Please maintain subdirectory structure.
    Important: Use binary mode in ftp to transfer files in /gfx and /admin/gfx !!!!
    1. 1st time installation:
      Now you can call
      http://your.host.com/installdir/admin/install.php
      to create the tables and the 1st admin
    2. Upgrade:
      THIS ARCHIVE ONLY CONTAINS DB UPDATE SCRIPTS FOR V3.70+. TO UPDATE OLDER VERSION PLEASE DONWLOAD UPDATE PACKAGE TO 3.70 FROM WEBSITE !!!
      Please replace all files (.php, .inc ...) on your server !!
      This way you determine which script you need:
      • Take the actually installed versionnumber (e.g. 3.10).
      • Remove the point in the versionnumber (in our example this results in 310).
        Now you have the upgrade version.
      • After this you need to sequentially use all upgrade scripts from this version to the actual version.
        For our example the actual version should be 3.22 (short 322). Use upgrade_310_to_311.php than upgrade_311_to_312.php and so on until you reach upgrade_321_to_322.php
        If one script in the sequence does not exists, for this upgrade step no database changes were necessary. In this case just continue with the next one in the sequence.
  3. After installation remove mkconfig.php, install.php, upgrade_* and fill_* and set filemode for config.php to disable PHP from writing to this file (on most server configurations this will be chmod 644).
  4. Now you can enter the admininterface by calling
    http://your.host.com/installdir/admin/index.php
    and login using the adminuser created during the installprogress.

Calling different user views

URL parameters for scripts

Parametername Description default Value1
langvar language variable defined in config.php.
($langvar)
language Language to use for interface
(Valid language settings are those, for which a language file is available in language subdir.
$default_lang from config.php
progid ID of program to use for display
mode Mode to start Knowledge Base with.
valid values:
  • wizard: starts with the wizard interface
  • search: starts with the keyword search
  • proglist: starts with the program list
mode defined in admin interface

1 default Value used if parameter is not supplied

Include subscription form for newsletter in own pages

Example code for using external form to subscribe to newsletter:
Please replace {desired program} with the ID of the program to use for this newsletter , {desired lang} with the desired language and {langvar} with the language variable ($langvar) defined in config.php.
<!-- --------- Start of subscription code --------- -->
<table width="80%" align="center">
<form method="post" action="/faq/subscription.php">
<input type="hidden" name="{langvar}" value="{desired lang}">
<input type="hidden" name="mode" value="subscribe">
<tr><td align="right" width="30%">Email:</td>
<td><input type="text" name="email" size="40" maxlength="240"></td></tr>
<tr><td align="right" valign="top">Email type:</td><td>
<input type="radio" name="emailtype" value="0" checked> HTML<br>
<input type="radio" name="emailtype" value="1"> plain text</td></tr>
<tr><td align="right" valign="top">send compressed:</td><td>
<input type="radio" name="compress" value="1" checked> yes<br>
<input type="radio" name="compress" value="0"> no</td></tr>
<input type="hidden" name="prog" value="{desired program}">
<td align="center" colspan="2"><input type="submit" value="subscribe">
</td></tr></form></table>
<!-- --------- End of subscription code --------- -->

Example code for using external form to unsubscribe:
<!-- --------- Start of unsubscription code --------- -->
<table width="80%" align="center">
<form method="post" action="/faq/subscription.php">
<input type="hidden" name="{langvar}" value="{desired lang}">
<input type="hidden" name="mode" value="unsubscribe">
<tr><td align="right" width="30%">Email:</td>
<td><input type="text" name="email" size="40" maxlength="240"></td></tr>
<input type="hidden" name="prog" value="{desired program}">
<td align="center" colspan="2"><input type="submit" value="unsubscribe">
</td></tr></form></table>
<!-- --------- End of unsubscription code --------- -->

Admin interface

Text templates

You can use different placeholders for the different text templates. These placeholders on runtime will be replaced by the actual, asociated values.
The following list shows the placeholders available for the various texts and what values will be used to replace.

FAQ upload by textfile

You can upload a textfile containing heading, question and answer of a FAQ, as generated by the offline editor. You can use BBCode in the text for question and answer, just as if you enter them online using the form.

Authentitication of admin users

There are 3 ways to get authentication for admin users.
  1. Using the internal authentication method. This is based on the data in the admin table and uses cookies for session handling.
  2. Using the internal authentication method. Sessionid sent by get and post requests.
  3. Using authentication by webserver via .htaccess

Method #1

You have to set $enable_htaccess and $sessid_url in config.php to false.
In this case please ensure the following settings in config.php are correct: This method uses username and password stored in the database and because of this you can change the password within the admin interface.

Method #2

You have to set $enable_htaccess to false and $sessid_url to true in config.php.
This method uses no cookie for storing the sessionid, but instead sends the sessionid in every get and post request. Because of this, everybody who can look on your screen also can see your sessionid.
We think this is not really secure and recommend to use method 1 or 3. But you decide yourself.
Please ensure $sesscookiename is set to an value not used in an other way by FAQEngine (best would be to let the default name, because this ensures avoiding conflicts with other HTTP-variables FAQEngine uses).

This method uses username and password stored in the database and because of this you can change the password within the admin interface.

Method #3

You have to set $enable_htaccess to true in config.php.
For every user set up in the admin interface, you also have to set up an user in .htpasswd. Username in database and .htpasswd must be the same, so the program can do assignment of external and internal userdefinition (Note: usernames are not case sensitiv in FAQEngine, but may be in .htaccess).
Because of security reasons the admin interface does not update .htpasswd. So if you use this kind of authentication changes of the password in the admin interface will not have any effects. Also if you generate a new user in the admin interface be sure to also add this user to .htpasswd. You still have to provide a password while creating a new user, so no security whole appears if you change from Method 3 to Method 1 or 2.
Remark: Using this method the internal login and failed login tracking is not available. Also the logout function does not work.

Encoding translated language files to HTML entities

Included in the archive is a script to convert language files containing foreign characters to HTML entities. To convert your translated language file to one with HTML entities, follow these steps:
  1. Translate the language file and store your translated version in the appropriate language subdirectory
  2. Call admin/encode_langfile.php
  3. Select the language file to be encoded
  4. Store the downloaded file (replacing _enc with appropriate language marker, e.g. nl) in the appropriate language subdirectory
  5. Now you can start the admin interface/user interface with the new language
Remark: After encoding your language files, you should remove admin/encode_langfile.php from the server

Tested browser

For actual list see our website

Licence

This program is Freeware. You are allowed to use this for free in non commercial and commercial environments. You are not allowed to do any changes without written permission. Except of the following files: If you are using this program on your website, please enter your site as a reference on our homepage.

If you are using this program in a commercial environment, it would be very kind to provide our work with a little donation.

Newest version can be found at http://www.boesch-it.de

(Uses HTML Mime Mail class by Richard Heyes <richard@phpguru.org>)

© 2001, 2002 Bösch IT-Consulting
Last updated: 09/16/2002