[ phpMyFAQ Documentation ]

(valid for version: 1.3.0 and up)

  1. Introduction
    1. License
    2. Support
    3. Copyright
  2. Installation
    1. Requirements
    2. Preparations
    3. Install-Script
    4. First Steps
    5. Notes
  3. Upgrading
    1. Upgrading phpMyFAQ 1.1.x
    2. Upgrading phpMyFAQ 1.2.x
    3. Modifying templates for phpMyFAQ 1.3.x
    4. Upgrading phpMyFAQ 1.3.x
  4. Administration
    1. User Administration
    2. Record Administration
    3. Category Administration
    4. News Administration
    5. Edit open questions
    6. Rating Statistics
    7. Cookies
    8. View Sessions
    9. View Adminlog
    10. Change passwords
    11. Edit configuration
    12. Backups
    13. Export your FAQ
    14. Logout
  5. Modifying Layout, Templates and Styles
    1. The file template/index.html
    2. The file template/style.css
    3. More Templates
  6. One more thing

1. Introduction

phpMyFAQ is a multilingual, completely database-driven FAQ-system. For the time being a MySQL database (support for other databases is under development) is used to store all data, PHP 4.1.0 (or higher) is needed in order to access this data. phpMyFAQ also offers a Content Management-System, flexible multi-user support, a news-system, user-tracking, language modules, templates, extensive XML-support, PDF-support, a backup-system and an easy to use installation script.

This documentation should help you with installing and administrating phpMyFAQ.

back to top


1.a. License

phpMyFAQ is published unter the Mozilla Public License Version 1.1 (MPL). This license guarantees you the free usage of phpMyFAQ, access to the sourcecode and the right to modify and distribute phpMyFAQ.

The only restrictions apply to the copyright, which remains at all times at Bastian Poettner and Thorsten Rinne. Any modified versions of phpMyFAQ will also fall under the terms of MPL. Any other program, that may only be accessing certain functions of phpMyFAQ is not affected by these restrictions and may be distributed under any type of license.

A commercial usage or commercially distribution of phpMyFAQ, e.g. on CD-ROMs, is allowed, as long as the conditions mentioned above are met.

We decided to use MPL as the licensing model for phpMyFAQ because we feel that it is a good compromise between the protection of the openness and free distribution on the one hand and the interaction with other software regardless of its licensing model. When compared to other licensing models its text is short and easily comprehensible, even for newcomers.

back to top


1.b. Support

If you should run into any problems using phpMyFAQ check out our support forums at www.phpmyfaq.de. There is no support by phone or email, please refrain from calling us.

back to top


1.c. Copyright

© 2001 - 2003 by Bastian Poettner and Thorsten Rinne under the Mozilla Public License.
All rights reserved.

back to top


2.Installation

2.a. Requirements for phpMyFAQ

phpMyFAQ addresses a MySQL databse via PHP4. In order to install it you will need a webserver that meets the following requirements:

  • PHP4 Version 4.1.0 or higher (NOTE: phpMyFAQ 1.3.x will not work under PHP 4.0.x)
  • MySQL Version 3.23.23 or higher
  • this documentation

You can determine which versions your webserver is running by creating a file called info.php with the following content:

    <?php phpinfo(); ?>

Upload this file to your webspace and open it using your browser. You will now be prompted the PHP and MySQL version numbers. The installation-script also checks which versions of PHP and MySQL are installed on your server. Should you not meet the requirements, the installation process will not complete.

In case you only have PHP3 or PHP 4.0.x installed you cannot use phpMyFAQ.

To view the FAQ pages you will need a third-generation browser (e.g. Netscape 3.01). Stylesheet formatting will only become visible if you're using a current browser like Netscape 6 or Internet Explorer 5. In order to be able to print you need to have JavaScript enabled. Printing using Internet Explorer requires at least version 5.

back to top


2.b. Preparations

Please unzip the downloaded archive on your harddisk. An overview of all contained files is listed in the file phpmyfaq.txt.

You can modify the layout of phpMyFAQ using templates. A description of how this is done can be found below. Copy all unzipped files to your webserver in a directory using FTP. A good choice would be the directory faq/.
Important:
Writing permission for your script are needed in this directory to be able to configure the files data.php and config.php during installation. This is the case if you're running PHP as CGI or as mod_php with active safe-mode.

back to top


2.c. Install-Script

Open your browser and type in the following URL:

    http://www.yourdomain.com/faq/install/installer.php

Substitute www.yourdomain.com with your actual domain name. When the site is loaded enter the address of your MySQL server (e.g. db.provider.com), your MySQL username and password as well as the database name. The datebase must be availible before running the installation script. You can leave the prefix-field empty. If you are planning on using multiple FAQs in one database you will have to use a tableprefix, though (i.e. sport for a sports-FAQ, weather for a weather-FAQ, etc.). Please note that only letters and an underline: "_" can be used as the prefix. When using multiple FAQs you need to install them independently into different directories (e.g. faq1/, faq2/. faq3/ etc.). In addition you can enter your language, default here is English. Furthermore you should register your name, your email address and - very importantly - your password. You must enter the password twice and it have to be at least six places long. Then click the button "install" to initialize the tables in your database.

back to top


2.d. First Steps

Once you've successfully installed the FAQ you will have to delete the directory /install! You can enter the public area of your FAQ by entering

    http://www.yourdomain.com/faq/index.php

into your browser's address field. Your FAQ will be empty and presented in the the standard layout. To configure phpMyFAQ point your browser to

    http://www.yourdomain.com/faq/admin/index.php

auf. Use the login admin and your selected password for your first login den Admin-Bereich.

back to top


2.e. Notes

Regarding the search-function:

Fulltext-search will only work if there are some entries in the database (5 or more). The term you are looking for should also not be in more than 50% of all your entries, or it will automatically be excluded from search. This is not a bug, but rather a feature of MySQL.

PHP settings:

If you're able to edit the php.ini file, please check that the variable file_upload = On is set; otherwise the file upload will not work for the attachments.

back to top


3. Upgrading

Updating to phpMyFAQ 1.3.0 is possible from the following versions:

  • phpMyFAQ 1.1.x
  • phpMyFAQ 1.2.x

back to top


3.a. Upgrading phpMyFAQ 1.1.x

Updating phpMyFAQ 1.1.x is fairly simple. Via FTP delete all files except:

  • the files data.php and config.php in the directory inc/

Copy the new files to your webspace and open the following URL in your browser:

    http://www.yourdomain.com/faq/install/update.php

Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated. Don't forget to delete the /install directory once the update is done! Use the username admin and password admin for your first login to the admin area. Remember to change the admin password as soon as possible.

back to top


3.b. Upgrading phpMyFAQ 1.2.x

Updating phpMyFAQ 1.2.x is fairly simple. Via FTP delete all files except:

  • the files data.php and config.php in the directory inc/
  • your layout in the template/ directory

Copy the new files to your webspace and open the following URL in your browser:

    http://www.yourdomain.com/faq/install/update.php

Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated. Don't forget to delete the /install directory once the update is done! Use the username admin and password admin for your first login to the admin area. Remember to change the admin password as soon as possible.

In order to use your existing templates with php MyFAQ 1.3.0 you will have to adjust them. Please read the next paragraph to learn more.

back to top


3.c. Modifying templates for phpMyFAQ 1.3.x

Since phpMyFAQ 1.3.0 supports PDF and multilingual FAQs existing templates for version 1.2.x need to be modified to reflect these new features. The following templates have changed:

  • template/artikel.html
  • Please use the new template included with version 1.3.0 and adjust your layout to avoid any problems.

  • template/index.html
  • Change the JavaScript section and replace the old code with the new between <script language="JavaScript" type="text/javascript"> and </script>, otherwise printing won't work.

  • template/style.css
  • You'll need to add CSS values for the <pre> areas, which you can copy from the original style.css file.

  • template/writecomment.html
  • Please use the new template included with version 1.3.0 and adjust your layout to avoid any problems.

back to top


3.d. Upgrading phpMyFAQ 1.3.x

Updating phpMyFAQ 1.3.x is fairly simple. Via FTP copy all new files from the update zip file except:

  • the files data.php and config.php in the directory inc/
  • your layout in the template/ directory

Open the following URL in your browser:

    http://www.yourdomain.com/faq/install/update.php

Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated. Don't forget to delete the /install directory once the update is done!

back to top


4. Administration

The administration of phpMyFAQ is completely browser-based. The admin area can be found under this URL:

    http://www.yourdomain.com/faq/admin/index.php

By entering your username and password you can log into the system. On the startpage you can see the admin menu on the left, some statistics about visits, entries and comments on the right. The menu contains the following sections:

  • User Administration
  • Create Records
  • Approve Records
  • Edit Records
  • Category Administration
  • Add News
  • Edit News
  • Edit open questions
  • Rating Statistics
  • Cookies
  • View Sessions
  • View Adminlog
  • Change Password
  • Edit configuration
  • Backups
  • Logout
  • Startpage

back to top


4.a. User Administration

phpMyFAQ offers a flexible management of privileges (or rights) for different users in the admin area. It is possible to assign different priviledges to real people (represented by the term users). Those priviledges are very detailed and specific, so that you could allow a certain user to edit but not to delete an entry. It is very important to contemplate which user shall get which priviledges. You could edit an entry by completely deleting all content, which would be equivalent to deleting the whole entry. The number of possible users is not limited by phpMyFAQ.

In the main screen of the user administration you'll see an overview of all active user profiles, whereas a combination of "1" and "0" represents the priviledges of a user. A "1" symbolizes that a user has this priviledge, a "0" shows that a user cannot perform a certain action. The order is essentially the same as the listing of the "Rights" when creating or editing a user.

Keep in mind that new users have no priviledges at all, you will have to assign them by editing the user's profile. The admin user cannot be deleted, nor can the name be changed.

back to top


4.b. Record Administration

  • create records

    You can create entries directly in the admin area. Created entries are NOT published by default. The meaning of the fields is as follows:

    • Theme
      This is the question or headline of your entry.
    • Content
      The content is an answer to the question or a solution for a problem. It is possible to use some of the standard HTML tags to format your text. Some of them are:
      • <b>...</b> - bold type
      • <i>...</i> - italic type
      • <u>...</u> - underlined
      • <a href="http://www.url.com">...</a> - link to http://www.url.com

      Other HTML tags are filtered for scurity reasons. You can also use BB-Code to format your entries.

      If you activate BB-Codes for your FAQ you cannot use HTML tags anymore, but only BB-Code. The BB-Codes are as follows:

      • [b]...[/b] - bold type
      • [i]...[/i] - italic type
      • [u]...[/u] - underlined
      • [ul]...[/ul] - creates a list. Single points can be put like this: [li]bulletpoint 1[/li] within a [ul] environment
      • [center]...[/center] - centring
      • [code]...[/code] - pre-formatted text for code-examples, etc.
      • [php]...[/php] - pre-formatted text for php-code examples (includes syntax-highlighting)
      • [img]...[/img] - includes an image that requires an URL like http://www.url.com/picture.jpg
      • [url]www.phpmyfaq.de[/url] - Link to http://www.phpmyfaq.de, opens in a new window
      • [url=http://www.phpmyfaq.de]named link[/url] - named link to phpMyFAQ, opens in a new window
      • all hyperlinks are automatically changed into links.

      If BB-Codes are activated a help page becomes visible in the public area of the FAQ. BB-Codes must be entered lower-case only!

    • File
      It is possible to attach a file to your entry. Those attachments reside in a special path and can be referred to in the entry. If there is no reference the attachment will remain invisible.
    • Language

    • You can select the language of your entry. By default the language of the browser will be chosen. You can create entries in multiple languages like this: Write an article in English (or any other language) and save it. Now choose edit records and edit your English entry. Change the theme, content and keywords and change language to, let's say Brazilian portuguese. Save the entry. Now you can, when you click edit records, see both entries in your list, having the same id, yet different languages.
    • Keywords
      Keywords are relevant for searching through the database. In case you didn't include a specific word in the entry itself, but it is closely related to the content you may wish to include it as a keyword, so the entry will come up as a search result. It is also possible to use non-related keywords so that a wrongly entered search will also lead to the right results.
    • Author
      It is possible to specify an author for your entries. Right now this field isn't displayed, it only serves internal purposes.
    • Category
      The place in the FAQ hierarchy where this entry will be published depends on these settings.
    • Active?
      If an entry is "active" it is visible in the public area and will be included in searches. Is it "deactivated" it will be invisible. Suggested entries are deactivated by default to prevent any abuse.
    • Date
      Date of the last change.
    • Changed?
      This field is reserved for comments that can reflect what changes have been applied to a certain entry. This helps multiple admins to keep track of what happened to the entry over time. Any information entered here will remain invisible in the public area.
    • Changelog
      The changelog lists all previous changes, including user and date of change.
  • approve records
    All entries in the database that are not active (and therefore not publicly visible) are listed here. Content suggested by visitors will also be placed here. To approve those entries click on the entry to edit it. Change it to "active" so it becomes visible. You can also delete entries here (this includes a security check if you are certain).
  • edit records
    All available entries are listed here. By clicking on them the same interface that lets you create records will open up, this time with all the relevant data of the specific entry.

back to top


4.c. Category Administration

phpMyFAQ lets you create different sections and subsections for your FAQ. You can also re-arrange your categories in a different order. Unfortunately this feature isn't finished yet.

back to top


4.d. News Administration

phpMyFAQ offers you the ability to post news on the starting page of your FAQ. In the administration area you can create new items, edit existing news or delete them.

back to top


4.e. Edit open questions

phpMyFAQ lets visitors contribute to the FAQ by asking questions. Every visitor is able to view these open questions in the public area, and may give an answer. If you wish to get rid of open questions you can do so using this section. Alternatively you can take over a question and answer it yourself and hereby add it to the FAQ.

back to top


4.f. Rating statistics

Below every entry visitors have the chance to rate the overall quality of an article by giving ratings from 1 to 5 (whereas 1 is the worst, 5 the best rating). In the statistics the average rating and number of votes becomes visible for every rated entry. To give you a quick overview entries with an average rating of 2 or worse are displayed in red, an average above 4 results in a green number.

back to top


4.g. Cookies

phpMyFAQ can save the login information to the admin area as a cookie on your computer. Although this feature may be very comfortable it is a potential security hole. Only use cookies if you are the only person using the computer.

back to top


4.h. View Sessions

This functions lets you keep track of your visitors. Every visitor is assigned an id when coming to your starting page, that identifies him during his whole visit. Using the information gathered here you could reconstruct the way visitors use your FAQ and make neccessary adjustments to your categories, content or keywords. There is also a search function that you can use to look for a certain IP, the number of minimum actions or the date of a visit.

back to top


4.i. View Adminlog

The adminlog allows you to track any actions taken by users in the admin area of phpMyFAQ. If you feel you have an intruder in the system you can find out for sure by checking the admin log.

back to top


4.j. Change passwords

This section lets you change your password. It is possible to deny this function for a certain user, which is very reasonable for group accounts. In order to change the password you need to have "Change Password" enabled for this user.

back to top


4.k. Edit configuration

Here you can edit the general settings of phpMyFAQ. However, colours or layout cannot be modified here. Please note that you cannot use HTML Code in your entries if you enabled BB-Codes!

Should you want to enter multiple email addresses in the configuration separate them by a comma (",").

back to top


4.l. Backups

Using the backup function it is possible to create a copy of the database to a single file. This makes it possible to restore the FAQ after a possible "crash" or to move the FAQ from one server to another. It is recommended to make regular backups of your FAQ.

  • backup data
    A backup of all data will include all entries, users, comments, etc.
  • backup LOGs
    The sessions of visits and the adminlog will be saved (i.e. all LOG files). This information is not necessary for running phpMyFAQ, they serve only statistical purposes.
  • make XML file
    You could write all entries to an XML-file. The resulting file can be found in the directoryxml/phpmyfaq.xml. A tool to import these XML-files is under development.

back to top


4.m. Export your FAQ

Maybe you want to show the news, the Top 10 or the latest records on your website. For this reason you can export these parts to RSS feeds. RSS is a Web content syndication format. Its name is an acronym for Really Simple Syndication. RSS is dialect of XML.

You'll find a PHP scrip on our download page, that reads the RSS feeds and you can include it on your website. You have to build the RSS files at the point Export your FAQ in the admin area. You'll find the files in the directory xml/. The following files will be created:

  • xml/news.xml for the News
  • xml/topten.xml for the Top 10
  • xml/latest.xml for the neusten Artikel

nach oben


4.n. Logout

Clicking on Logout will end the current session. It is recommended to logout before closing the browser to prevent exploits.

back to top


5. Modifying Layout, Templates and Styles

Since version 1.2.0 code and layout are almost completely seperated. The layout is based on several templates, that you can modify to suit your own needs. The most important files for phpMyFAQ's layout can be found in the directory template/.

Note: You cannot change the layout of the admin area using templates. Should you feel the need to change the appearance of the admin area you will have to edit the file admin.php. Please be aware that any changes to the file admin.php will be lost once you update phpMyFAQ.

back to top


5.a. The file template/index.html

The default layout of phpMyFAQ is saved in the index.html file. This is a normal HTML-file including some variables in curly brackets, serving as placeholders for content.

Example:

    <td width="200" class="little" align="center">{userOnline}</td>

The template-parser of the FAQ converts the placeholder {userOnline} to the actual number of visitors online.

You can change the template as you wish, but you may want to keep the original template in case something goes wrong. Theoretically you can use any editor for changing the templates, test using Dreamweaver were successful. Modifying the files with Microsoft Frontpage, Adobe GoLive or NetObjects Fusion may mess up the template, since they alter the source-code.

back to top


5.b. The file template/style.css

All formattings such as fonts, colors and the like can be modified in the CSS-file style.css. More info can be found at the official W3C website.

back to top


5.c. More Templates

If requested, we can make more templates available. Visit our forums if you're interested.

back to top


6. One more thing

Thank you for using phpMyFAQ! :-)

Authors of the FAQ-Documentation: Thorsten Rinne, Bastian Poettner
Translation by: Stephan Hochhaus
Last Change: 06/26/2003

Thanks to:
Stephan Hochhaus for the English documentation,
Matthias Sommerfeld for help with the English translation,
Volodymyr Ganopolskyy for the Russian translation,
Erwin Leenheer for the dutch translation and Bugfixing,
Lex for the french translation,
Krzysztof Kudlacik for the polish translation,
Rui Barreiros for the portugues translation,
and everyone who is using our software for their sites!

© 2001-2003 Thorsten Rinne und Bastian Poettner

back to top