phpMyFAQ is a multilingual, completely database-driven FAQ-system. It supports various databases to store all data, PHP 5.2.0 (or higher) is needed in order to access this data. phpMyFAQ also offers a multi-language Content Management-System with a WYSIWYG editor and an Image Manager, flexible multi-user support with user and group based permissions on categories and records, a wiki-like revision feature, a news system, user-tracking, language modules, enhanced automatic content negotiation, templates, extensive XML-support, PDF-support, a backup-system, a dynamic site map, related articles, tagging, RSS feeds, built-in spam protection systems, LDAP support, and an easy to use installation script.
This documentation should help you with installing and administrating phpMyFAQ.
phpMyFAQ is published under the Mozilla Public License Version 1.1 (MPL). This license guarantees you the free usage of phpMyFAQ, access to the source code and the right to modify and distribute phpMyFAQ.
The only restrictions apply to the copyright, which remains at all times at Thorsten Rinne and the phpMyFAQ Team. 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.
This documentation is licensed under a Creative Commons License.
If you should run into any problems using phpMyFAQ check out our support forums at forum.phpmyfaq.de. There is no support for free by phone or email, please refrain from calling or mailing us.
The phpMyFAQ team offers the following paid services:
If you're interested, just take a look at our support page.
© 2001-2011 by Thorsten Rinne and phpMyFAQ Team under the Mozilla Public License. All rights reserved.
2.a. Requirements for phpMyFAQ
phpMyFAQ addresses a database system via PHP. In order to install it you will need a web server that meets the following requirements:
You can only run phpMyFAQ successfully, when the PHP directive safe_mode is set to off, further constraints affect the directives open_basedir and disable_functions, which can be set in the central php.ini or the httpd.conf respectively.
In case PHP runs as module of the Apache, you will have to be able to do a chown on the files before installation. The files and directories must be owned by the Apache user.
You can determine which versions your web server 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. The installation-script checks which version of PHP is installed on your server. Should you not meet the requirements, you cannot start the installation process.
In case you have PHP below 5.2.0 installed you cannot use phpMyFAQ 2.5.
phpMyFAQ uses a WYSIWYG on-line editor. It uses a non-standard feature based on JavaScript implemented in Mozilla Firefox 0.7+ (any platform), Mozilla 1.3+ (any platform), Opera 9.0+ (any platform), Safari 3.0+ (Mac OS X and Windows), and Internet Explorer 6.0+ for Windows, therefore the editor will only work in one of these browsers. You have to enable JavaScript for the Ajax based functions as well.
If you're using lighttpd you have to set the following configuration:
cgi.fix_pathinfo 1
Please unzip the downloaded archive on your hard disk.
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 web server in a directory using FTP. A good choice would be the directory faq/.
Important:
Writing permission for your script is needed in this directory to be able to configure the file database.php during installation. This is the case if you're running PHP as CGI or as mod_php with disabled safe-mode. The installation script will stop when your web server isn't configured as needed.
It might help to set chmod 777 to the whole phpMyFAQ directory to avoid problems during the installation. If you're running a very restrictive mod_php installation you should keep the chmod 777 for the following files and directories even after the successful installation:
All other directories shouldn't be world-writable for your own security.
The database user needs the permissions for CREATE, DROP, ALTER, INDEX, INSERT, UPDATE, DELETE and SELECT on all tables in the database.
Open your browser and type in the following URL:
http://www.example.com/faq/install/setup.php
Substitute www.example.com with your actual domain name. When the site is loaded enter the address of your database server (e.g. db.provider.com), your database username and password as well as the database name. The database have to be created with UTF-8 chraracter set 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 table prefix, 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.
If your PHP was compiled with the LDAP extension you can add your LDAP information, too. You have to insert your LDAP information, too.
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.
You can enter the public area of your FAQ by entering
http://www.example.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.example.com/faq/admin/index.php
Use the username admin and your selected password for your first login into the admin section.
Some variables that doesn't change regularly, they can be edited in the file config/constants.php. You can change the
2.e. Notes regarding the search-function
The boolean full-text search will only work with MySQL and 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.
2.f. Automatic content negotiation
To set the default language in your browser you have to set a variable that gets passed to the web server. How this is done depends on the browser you are using.
Mozilla Firefox
Tools -> Options -> Content -> Languages
Mozilla Seamonkey and later versions
Edit -> Preferences -> Navigator -> Languages
Safari
Safari uses the MacOS X system preferences to determine your preferred language:
System preferences -> International -> Language
Opera
Most versions:
File -> Preferences -> Languages
Linux/*BSD versions 5.x and 6.x:
File -> Preferences -> Document -> Languages
Internet Explorer
Tools or View or Extras -> Internet Options -> (General) Languages
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. You should disable the safe_mode because it will cause trouble when you're trying to upload files or if you want to use the user tracking.
2.h. Enabling mod_rewrite support
Apache Web server
If you want to enable the search engine optimization you have to rename the file _.htaccess to .htaccess in the root directory where your FAQ is located. Then you have to activate the mod_rewrite support in the admin back-end in the configuration page. You also have to edit the path information for the "RewriteBase".
IIS Web server
If you want to enable the search engine optimization you have to rename the file _httpd.ini to httpd.ini in the root directory where your FAQ is located. Then you have to activate the mod_rewrite support in the admin back-end in the configuration page.
lighttpd Web server
If you want to enable the search engine optimization you have to copy the rewrite rules in the file _lighttpd.conf to your lighttpd.conf. Then you have to activate the mod_rewrite support in the admin back-end in the configuration page.
If you're entered the correct LDAP information during the installation you have to enable the LDAP support in the configuration in the admin backend. Now your user can authenticate themselves in phpMyFAQ against your LDAP server or even an Microsoft Active Directory.
If you need special options for your LDAP or ADS configuration you have to edit the LDAP constants in the file config/constants_ldap.php.
Main features of the PDF export:
2.k. Firefox and IE7 search plugins
phpMyFAQ 2.5.x provides search plugins for Mozilla Firefox 2 and later and Microsoft Internet Explorer 7 and later based on the OpenSearch specification. Every user in the front-end can install it. With an installed search plugin you can search through the phpMyFAQ installation with the search box in upper right corner of Mozilla Firefox or Microsoft Internet Explorer.
phpMyFAQ implements a static solution ID which never changes. This ID is displayed next to the question on a FAQ record page. You may think why do you need such an ID? If you have a record ID 1042 it is now possible to enter only the ID 1024 in the input field of the full-text search box and you'll be automatically redirected to the FAQ record with the ID 1024. By default the numbers start at ID 1000 but you can change this value in the file inc/constants.php. You can also change the value of the incrementation of the static IDs.
phpMyFAQ 2.5 performs these three checks on public forms:
The IP/Network addresses can be added or removed in the configuration panel in the administration back-end. If you want to add banned words to phpMyFAQ, then you have to edit the file inc/blockedwords.txt. Please add only one word per line.
Starting with version 2.6 phpMyFAQ supports encrypted attachments. The encrypton is done using the AES algorythm implemented in mcrypt extension (if avaliable) or with native PHP Rijndael implementation. The key size vary depending on implementation used and can be max 256 bits long. Use of mcrypt extension is strongly recommended because of performance reasons, its avaliability is checked automatically at the run time.
See the migration section if you're migrating from earlier versions.
Pleale be aware:
Upgrading to phpMyFAQ 2.6.x is possible from the following versions:
If you're running an older version of phpMyFAQ we recommend a new and fresh install.
3.a. Upgrading from phpMyFAQ 2.0.x
Upgrading from 2.0.x to 2.6.x is a major upgrade. Please make a full backup before you run the upgrade! Nevertheless the update from phpMyFAQ 2.0.x to the current release is fairly simple. First you have to delete all files except:
Open the following URL in your browser:
http://www.example.com/faq/install/update.php
Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated. You have to update some of your template files due to the new, enhanced template engine.
The update script will move your template files to a folder backup/ in the directory template/. The default layout will be stored in the folder template/default/.
Note: We changed the character set for all languages and templates to UTF-8. If you notice problems with e.g. German umlauts you have to convert your templates.
3.b. Upgrading from phpMyFAQ 2.5.x
Upgrading from 2.5.x to 2.6.x is a minor upgrade. Please make a full backup before you run the upgrade! First you have to delete all files except:
Open the following URL in your browser:
http://www.example.com/faq/install/update.php
Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated. You have to update some of your template files due to the new, enhanced template engine.
The update script will move your template files to a folder backup/ in the directory template/. The default layout will be stored in the folder template/default/.
Note: We changed the character set for all languages and templates to UTF-8. If you notice problems with e.g. German umlauts you have to convert your templates.
Updating phpMyFAQ 2.6.x is fairly simple. Via FTP copy all new files from the phpMyFAQ package except:
Open the following URL in your browser:
http://www.example.com/faq/install/update.php
Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated.
You can find the changed files between the 2.6.x versions in the file docs/CHANGEDFILES.
3.d. Modifying templates for phpMyFAQ 2.6.x
The 2.0.x and 2.5.x templates are mostly compatible with phpMyFAQ 2.6, if your layout is completely based on CSS, you only have to change the .tpl files listed in docs/CHANGEDFILES. If you need help to integrate phpMyFAQ into your website feel free to contact us.
Note: We changed the character set for all languages and templates to UTF-8. If you notice problems with e.g. German umlauts you have to convert your templates.
The phpMyFAQ front-end has a quite simple default layout. The header has the main links for the advanced search, add content, ask questions, open questions, help and contact. On the left side you see the main categories, the instant response page and the site map. You can also change the current language of the FAQ, use the search form or the login box if you have a valid user account. On the right side you see a list of the most popular FAQ records, the latest records, and the sticky FAQ records. On the pages with the FAQ records you'll see the other records of the current category and the tag cloud if you're using tagging.
As written above there's a select box for changing the current language. If you're visiting a phpMyFAQ powered FAQ, the current language will be the one you're browser is using or the language which was selected by the administrator of the FAQ. If you change the language you'll see the categories and records of your chosen language. If there are no entries in this language you'll see no entries. If you're switching to languages with right to left text direction (for example Arabic, Hebrew or Farsi) the whole layout will be switching according to the text direction.
Note: phpMyFAQ uses a WYSIWYG on-line editor that has support for multiple languages. However, phpMyFAQ comes only with English language pack installed so changing the current language will not change the language of WYSIWYG editor. If you would like to have WYSIWYG editor in another language, just download the latest language pack, extract it and upload the extracted files to admin/editor directory under your phpMyFAQ's installation directory on your web server.
On the start page you can subscribe to three RSS feeds with the news of the FAQ, the most popular FAQs, all records per requested category and the latest records available in the FAQ. On the page with the open user questions you can subscribe to the RSS feed with these questions. All feeds are valid and compatible to the RSS 2.0 specification.
On the page with the advanced search you have more possibilities to find an entry. You can search over all language if you want to. It's also possible to search only in one selected category. Additionally the link for the OpenSearch plugin is below the main search box. At the bottom of the search box you'll see a list of the most popular search terms.
The Instant Response is an Ajax-powered page with direct access to the whole FAQ database and the page will return the search results while you're typing into the input form. For performance reasons only the first 10 results will be displayed on the page.
On the Add FAQ page it's possible for all users to add a new FAQ record. The users have to add a FAQ question, select a category, add an answer, and they have to insert their name and e-mail address. If the spam protection is enabled they have to enter the correct captcha code, too. New FAQ entries won't be displayed and have to be activated by an administrator.
On the ask question page it's possible for all users to add a new question without an answer. If the question is submitted, phpMyFAQ checks the words for the question and will do a full text search on the database with the existing FAQs. If we found some matches the user will get some recommendations depending on the question he submitted.
The users have to add a question, select a category, and they have to insert their name and e-mail address. If the spam protection is enabled they have to enter the correct captcha code, too. By default new questions won't be displayed and have to be activated by an administrator.
This page displays all open questions and it's possible for all users to add an answer for this question. The user will be directed to the add content page If the spam protection is enabled they have to enter the correct captcha code, too.
On every FAQ record page there's a select box for languages and a button to translate an existing FAQ record to another language. The translating user will be directed to a special add content page with the original entry and a stripped down WYSIWYG editor component. If the spam protection is enabled they have to enter the correct captcha code, too.
Please do not forget to add also a translated category, otherwise you won't be able to activate the translated entry.
4.i. "Digg it!" and "Share on Facebook"
On every FAQ record page there are a direct links to digg.com and Facebook there you can submit and share the FAQ entry with the world.
For better usability there are some helpful links below every FAQ record. If the administrator added tags to the records they will be displayed next to five (or more) related articles. The related articles are based on the content of the current FAQ entry. On the right side you'll see links to all entries of the current category and the complete tag cloud of the whole FAQ.
On the left column of the default layout the users of the FAQ also have the possibility to register themselves. The user generated accounts are unactivated by default and the administrator has to activate them.
The administration of phpMyFAQ is completely browser-based. The admin area can be found under this URL:
http://www.example.com/faq/admin/index.php
You can also login in the public front-end and after the successful login you'll see a link to administration back-end, too.
If you have lost your password you can reset it. A new random password will be generated and sent to you via e-mail. Please change it after your successful login with the generated password.
After entering your username and password you can log into the system. On the start page you can see the admin menu on the top, some statistics about visits, entries and comments in the middle of the page. At the bottom of the main admin page you'll see a button for version information. If you click on that button your version of phpMyFAQ will check the latest version number from our website www.phpmyfaq.de. We do not log anything in this process! You can switch the current language in the administration back-end and you have an info box about the session timeout.
phpMyFAQ offers a flexible management of privileges (or rights) for different users in the admin area. To search for a certain user just start typing the username in the input form and you'll get a list of hits for usernames. It is possible to assign different privileges to real people (represented by the term users). Those privileges 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 privileges. 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.
Keep in mind that new users have no privileges 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.
A user without any permission in the admin section can still get read access to categories and records. You can set the permissions on categories and records in the category and record administration front-ends.
phpMyFAQ also offers a flexible management of privileges (or rights) for different groups in the admin area. You can set permissions for groups in the same way like for users described in the topic above.
Please note that the permissions for a group are higher rated than the permissions on a user.
phpMyFAQ lets you create different categories and nested sub-categories for your FAQ. You can also re-arrange your categories in a different order. It is possible to use various languages per category, too; there's also a front-end about all translated categories. For accessibility reasons you should add a small description for every category. If you add a new category, you can set the permissions for users and groups, and you can bind an administrator to that category. This is quite nice if you want to share the work in your FAQ between various admin users.
You can create entries directly in the admin area. Created entries are NOT published by default. All available entries are listed on the page "edit FAQs". 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. The meaning of the fields is as follows:
Category
The place in the FAQ hierarchy where this entry will be published depends on these settings. You can choose one or more categories where to store the entry. If you want to add a FAQ record to more than one category you have to select the categories with your mouse and press the CTRL key.
Question
This is the question or headline of your entry. Answer The content is an answer to the question or a solution for a problem. The content can be edited with the included WYSIWYG (What You See Is What You *Get) editor when JavaScript is enabled. You can place images where you want with the integrated image manager.
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.
Tags
You can add some tags about the current entry here. An Ajax-based auto-completion method helps you while typing your tags.
Author
It is possible to specify an author for your entry.
It is possible to specify the author's e-mail for your entry, but the e-mail address won't be shown in the front-end.
Language
You can select the language of your entry. By default the selected language saved in the configuration 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.
Solution ID
Every entry generates automatically a so-called solution ID. All records can be accessed directly by putting this ID into the search box.
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.
Sticky?
If an entry is "sticky" it is a very important FAQ record and will be shown always on all pages on the right column. You should mark records as sticky if they are very important for your whole FAQ. Sticky records also appear at the top positions of the lists of FAQ entries.
Comments?
If you do not want to allow public comments for this entry you can disable the feature here.
Revision
Like a wiki, phpMyFAQ 2 supports revisions of every entry. New revisions won't be created automatically but you can create a new one if you click on "yes". The old revision will be stored in the database and the new current revision will be displayed in the public front-end. You can also bring back old revisions into the front-end if you select an old revision and save them as a new one.
Date
You have three options for the FAQ creation date. You can choose to refresh the date of the FAQ entry for every update, or you can keep the date, or you can set an individual date for the FAQ entry.
Permissions
If you add or edit a new entry, you can set the permissions for users and groups.
Record expiration time window
If you need to you can set a time frame from one date to a second date when the FAQ entry should be valid and visible. Before and after this time frame the entry isn't visible and cannot be accessed.
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.
You can edit and delete all records as well. Please note that old revisions won't be deleted.
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.
In this straight front-end you can see all comments that have been posted in the FAQs and the news. You cannot edit comments but you can delete them with one easy click.
phpMyFAQ offers 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.
A glossary is a list of terms in a particular domain of knowledge with the definitions for those terms. You can add, edit and delete glossary items here. The items will be automatically displayed in <abbr> tags in the front-end.
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.
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 necessary adjustments to your categories, content or keywords.
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.
Search statistics
On the search statistics page you'll get a report about which keywords and how often your users are searching. This information is split into keywords, the number of searches for this term, the language and the overall percentage.
You can export your contents of your whole FAQ or just some selected categories into four formats:
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.
Main FAQ configuration
Here you can edit the general, the record and spam protection settings of phpMyFAQ. Should you want to enter multiple email addresses in the configuration separate them by a comma (",").
URL Verifier configuration
The URL Verifier works in the back while you save a new FAQ. It checks your added FAQ for links and tests the accessibility of all links in your document. In the URL Verifier configuration you can add, edit and delete special URLs. You can add a ignore list of URLs and a list of URLs which always return a warning message.
Stop Words configuration
We need stop words for the smart answering feature. If an user is adding a new question to your FAQ the words will be checked against all FAQs in your database but without the stop words. Stop words are words with a very low relevance like the English word "the".
Interface translation
With this interface it is possible to edit all available translations of phpMyFAQ. You only can edit translations when the language file is writable. The interface checks that for you. If you like you can also send your improved translation to the phpMyFAQ Team. You cannot change the English translation because this is the main language file.
In phpMyFAQ code and layout are separated. 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/default/. All original templates are valid XHTML 1.0 Transitional and we don't use tables for layout reasons.
Note: You can change the layout of the admin area using the CSS file admin/style/admin.css.
6.a. The file template/default/index.tpl
The default layout of phpMyFAQ is saved in the index.tpl file. This is a normal HTML-file including some variables in curly brackets, serving as placeholders for content.
Example:
<span class="useronline">{userOnline}</span>
The template-parser of the FAQ converts the placeholder {userOnline} to the actual number of visitors on-line.
You can change the template as you wish, but you may want to keep the original template in case something goes wrong.
6.b. The file template/default/style.css
All formatting such as fonts and the like can be modified in the CSS-file style.css for left-to-right languages and in style.rtl.css for left-to-right languages.
You need an other template design or more XHTML/CSS features? Then write us an email and we can talk about it.
With phpMyFAQ 2.6.x users have even more customization opportunities. The key feature is the user selectable template sets. From version 2.6.x there is a templates/default directory where the default layouts get shipped.
Follow these steps to create a custom template set:
Note: There is a magic variable {tplSetName} containing the name of the actual layout available in each template file.
Beginning with version 2.6 phpMyFAQ will offer more and more interfaces to access phpMyFAQ installations with other clients like the iPhone.
The rest/json API is included since phpMyFAQ 2.6.0 and offers an API for various services like fetching the phpMyFAQ version and the phpMyFAQ API version. Currently we implemented an interface for the search, the possibility to fetch all categories, all FAQ entries for a selected category and a FAQ entry.
You can call the resources with the following URIs:
getVersion()
This method returns the phpMyFAQ version number as string.
The result will be a string value like this:
{"version":"2.6.0"}
getApiVersion()
Returns the version of the API as an integer value. The version number is incremental and will be incremented every time the API changes.
{"apiVersion":1}
search()
You have two variables, lang for the language and q for the search term. You'll get an JSON object as result with the follwing structure:
[
{
"id":"1",
"lang":"en",
"category_id":"15",
"question":"Why are you using phpMyFAQ?",
"answer":"Because it's cool!",
"link":"http://faq.phpmyfaq.de/index.php?action=artikel&cat=15&id=1&artlang=en"
},
{
"id":"13",
"lang":"en",
"category_id":"5",
"question":"Why do you like phpMyFAQ?",
"answer":"Because it's cool!",
"link":"http://faq.phpmyfaq.de/index.php?action=artikel&cat=5&id=13&artlang=en"
}
]
getCategories()
The result will be a JSON object like the following:
[
{
"id":"1",
"lang":"en",
"parent_id":"0",
"name":"phpMyFAQ 2.5",
"description":"Everything about phpMyFAQ 2.5",
"user_id":"1",
"level":0
},
{
"id":"2",
"lang":"en",
"parent_id":"0",
"name":"phpMyFAQ 2.6",
"description":"Everything about phpMyFAQ 2.6",
"user_id":"1",
"level":0
}
]
getFaqs()
You have two variables, lang for the language and categoryId for the category id. You'll get an JSON object as result with the follwing structure:
[
{
"record_id":"1",
"record_lang":"en",
"category_id":"1",
"record_title":"Is there life after death?",
"record_preview":"Maybe!",
"record_link":"\/phpmyfaq\/phpmyfaq\/index.php?action=artikel&cat=1&id=1&artlang=en",
"record_date":"20091010175452",
"visits":"3"
},
{
"record_id":"2",
"record_lang":"en",
"category_id":"1",
"record_title":"How can I survive without phpMyFAQ?",
"record_preview":"It\'s easy!",
"record_link":"\/phpmyfaq\/phpmyfaq\/index.php?action=artikel&cat=1&id=2&artlang=en",
"record_date":"20091014181500",
"visits":"10"
}
]
getFaq()
You have two variables, lang for the language and recordId for the record id. You'll get an JSON object as result with the follwing structure:
{
"id":"1",
"lang":"en",
"solution_id":"1000",
"revision_id":"0",
"active":"yes",
"sticky":"0",
"keywords":"",
"title":"Is there life after death?",
"content":"Maybe!",
"author":"Thorsten Rinne",
"email":"thorsten@phpmyfaq.de",
"comment":"y",
"date":"2009-10-10 17:54",
"dateStart":"00000000000000",
"dateEnd":"99991231235959",
"linkState":"",
"linkCheckDate":"0"
}
Thank you for using phpMyFAQ! :-)
Author: Thorsten Rinne
Co-Authors: Stephan Hochhaus, Markus Gläser
Last update: 2010-01-03
© 2001-2011 phpMyFAQ Team
This documentation is licensed under a Creative Commons License.