phpMyFAQ is a multilingual, completely database-driven FAQ system. It supports various databases to store all data, PHP 7.4+ 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, real time search support with Elasticsearch, flexible multi-user support with user, group and section based permissions on categories and records, a wiki-like revision feature, a news system, user-tracking, 40+ supported languages, enhanced automatic content negotiation, HTML5/CSS3 based responsive templates with support for own text and HTML snippets, PDF-support, a backup-system, a dynamic sitemap, related FAQs, tagging, built-in spam protection systems, OpenLDAP and Microsoft Active Directory support, and an easy-to-use installation script. You can run phpMyFAQ on almost every web hosting provider or in the cloud in a Docker container.
This documentation should help you with installing, administrating and using phpMyFAQ.
phpMyFAQ is published under the Mozilla Public License Version 2.0 (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. You can also use our Twitter account @phpMyFAQ to ask us short question if they fit into 280 characters. There is no free support 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-2022 by Thorsten Rinne and phpMyFAQ Team under the Mozilla Public License 2.0. All rights reserved.
phpMyFAQ addresses a database system via PHP. In order to install it locally you will need a web server that meets the following requirements:
You can only run phpMyFAQ successfully with 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 web server's 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're running PHP before 7.3 you cannot use phpMyFAQ.
phpMyFAQ uses a modern HTML5/CSS3 powered markup. The supported browsers are the latest Mozilla Firefox (Windows/macOS/Linux), the latest Safari (macOS/iOS), the latest Chrome (Windows/macOS/Linux), the latest Opera (Windows/macOS/Linux) and Microsoft Edge (Windows/macOS/Linux).
We recommend to use always the latest version of Firefox, Chrome, Safari, Opera or Microsoft Edge.
You can install phpMyFAQ via one of the provided packages as .zip or .tar.gz or using Git. If you choose our package, download it and unzip the archive on your hard disk.
If you want to use Git, please run the following commands on your shell:
$ git clone git@github.com:thorsten/phpMyFAQ.git 3.1
$ cd phpMyFAQ
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
$ curl -o- -L https://yarnpkg.com/install.sh | bash
$ yarn install
$ yarn build
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 write the file config/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 775 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 775 for the following files and directories even after the successful installation:
All other directories shouldn't be world-writable for your own security.
Note: If you're running SELinux, you may need further configuration or you should disable it at all.
The database user needs the permissions for CREATE, DROP, ALTER, INDEX, INSERT, UPDATE, DELETE and SELECT on all tables in the database.
You first need a database, let's try with a MariaDB container:
$ docker run -ti -n phpmyfaq-db mariadb
Then start the phpMyFAQ web application:
$ docker run -ti --link phpmyfaq-db:db -p 8080:80 phpmyfaq/phpmyfaq
Open your browser and type in the following URL:
http://www.example.com/faq/setup/index.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), the database port, your database username and password as well as the database name. The database have to be created with UTF-8 character 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. Then you can to insert your LDAP information as well.
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 characters 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 does not change regularly, they can be edited in the file config/constants.php. You can change the
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
Google Chrome / Microsoft Edge / Opera
Settings -> Details -> Language settings
Safari
Safari uses the macOS system preferences to determine your preferred language:
`System preferences -> International -> Language`
Recommended configuration:
memory_limit = 128M
file_upload = on
Apache Web server
If you want to enable the search engine optimization you have to activate the mod_rewrite support in the admin backend in the configuration page. You also have to edit the path information for the "RewriteBase". If you installed phpMyFAQ on root directory "/" you should set in RewriteBase /
Please check, if AllowOverride All
is set correctly in your httpd.conf file so that the .htaccess rules work.
nginx Web server
If you want to enable the search engine optimization you have to copy the rewrite rules in the file nginx.conf to your nginx.conf. Then you have to activate the URL rewrite support in the admin backend in the configuration page.
IIS Web server
If you want to enable the search engine optimization you have to activate the URL rewrite support in the admin backend 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 can change the LDAP configuration in the admin configuration panel.
If you want to add LDAP support later, you can use the file config/ldap.php.original as template and if you rename it to config/ldap.php you can use the LDAP features as well after you enabled it in the administration backend.
Main features of the PDF export:
phpMyFAQ features a static solution ID which never changes. This ID is visible 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 1042 in the input field of the full-text search box, and you'll be automatically redirected to the FAQ record with the ID 1042. 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 performs these three checks on public forms:
The IPv4 and IPv6 Network addresses can be added or removed in the configuration panel in the administration backend. If you want to add banned words to phpMyFAQ, then you have to edit the file src/blockedwords.txt. Please add only one word per line.
phpMyFAQ supports encrypted attachments. The encryption uses the AES algorithm implemented in mcrypt extension (if available) 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 availability is checked automatically at the run time.
Please be aware:
phpMyFAQ supports Twitter via OAuth. If you enable Twitter support in the social network configuration and add phpMyFAQ as a Twitter application on twitter.com, all new FAQ additions in the administration backend will also post the question of the FAQ, the URL of the FAQ and all tags as hashtags to Twitter, e.g. the tag "phpMyFAQ" will be converted to "#phpmyfaq".
MySQL / Percona Server / MariaDB
interactive_timeout = 120
wait_timeout = 120
max_allowed_packet = 64M
The bundled highlight.js syntax highlighting component will find and highlight code inside of <pre><code> tags; it tries to detect the language automatically. If automatic detection doesn't work for you, you can specify the language in the class attribute:
<pre><code class="html">...</code></pre>
The list of supported language classes is available in the class reference. Classes can also be prefixed with either language- or lang-.
To disable highlighting altogether use the "nohighlight" class:
<pre><code class="nohighlight">...</code></pre>
To improve the search performance and quality of search results it's possible to use Elasticsearch 5.x. You need a running Elasticsearch 5.x installation accessible by phpMyFAQ via HTTP/REST. You can add the IP(s)/Domain(s) and port(s) of your Elasticsearch cluster during installation or later by renaming the Elasticsearch file located in the folder config/. If you choose to add this during installation, the file will be automatically written and the index will be built.
First, please download the latest package of phpMyFAQ. Upgrading to phpMyFAQ 3.1.x is possible from the following versions:
If you're running an older version of phpMyFAQ we recommend a new and fresh installation. If you need support for updating an old FAQ from the 1.x, 2.0.x, 2.5.x, 2.6.x, 2.7.x or 2.8.x series, please send us an [e-mail][68].
3.1. Upgrading from phpMyFAQ 2.9.x
Upgrading from 2.9.x is a major upgrade. Please make a full backup before you run the upgrade! First you have to delete all files except:
Download the latest phpMyFAQ package and copy the contents into your existing FAQ directory, the open the following URL in your browser:
http://www.example.com/faq/setup/update.php
Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated.
You have to move your template files to the directory assets/template/. The default layout is be stored in the folder assets/template/default/.
3.2. Upgrading from phpMyFAQ 3.0.x
Upgrading from 3.0.x is a major upgrade. Please make a full backup before you run the upgrade! First you have to delete all files except:
Download the latest phpMyFAQ package and copy the contents into your existing FAQ directory, the open the following URL in your browser:
http://www.example.com/faq/setup/update.php
Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated.
You have to move your template files to the directory assets/template/. The default layout is be stored in the folder assets/template/default/.
Updating an existing phpMyFAQ 3.1.x installation is fairly simple. First you have to delete all files except:
Download the latest phpMyFAQ package and copy the contents into your existing FAQ directory, the open the following URL in your browser:
http://www.example.com/faq/setup/update.php
Choose your installed phpMyFAQ version and click the button of the update script, your version will automatically be updated.
3.5. Modifying templates for phpMyFAQ 3.1.x
We recommend you'll take a look at the main Bootstrap documentation. Please don't forget that the style sheets are written with SCSS. You have to compile the SCSS files into CSS using a SCSS compiler with Node.js.
If you need help with theming phpMyFAQ please don't hesitate to ask in our forum. We will also release new themes from time to time on our homepage and release them as open source on our Github page.
Note: The character set for all languages and templates is UTF-8. If you notice problems with e.g. German umlauts you have to convert your templates to UTF-8 encoding. Please use UNIX file endings \n instead of Windows file endings with \r\n.
The public phpMyFAQ frontend has a simple, HTML5/CCS3 based default layout based on Bootstrap v4. The header has the main links for the all categories, instant response, add FAQs, add questions, open questions, sitemap and contact. On the left side you only see the main categories. You can also change the current language at the bottom of the FAQ, use the global search in the center of the FAQ or use the login box in the upper right 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 default layout will be switching according to the text direction.
Note: phpMyFAQ uses a WYSIWYG online 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 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.
The Instant Response is directly built into the main search bar in the top of the FAQ with direct access to the whole FAQ database and the page will return results while you're typing into the input form. For performance reasons only the first 10 results will be suggested.
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.
If an user is logged in, the name and e-mail address are filled automatically.
On the Add 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.
If an user is logged in, the name and e-mail address are filled automatically.
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 FAQ 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.
If an user is logged in, the name and e-mail address are filled automatically.
Note: Please do not forget to add also a translated category, otherwise you won't be able to activate the translated entry.
On every FAQ page there are a direct links to various social networks to share the current FAQ page. The supported social networks are:
You can disable the support for social networks completely in the administration backend.
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.
4.11. Public user registration
On the upper right border 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.
If enabled by the administrator a phpMyFAQ installation can be completely secured. This means all content is only available after a successful login. To avoid crawled content on search engines you should change the meta tags in index.html file from INDEX, FOLLOW to NOINDEX, NOFOLLOW.
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 frontend and after the successful login you'll see a link to administration backend, 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 administration menu on the top, some statistics about visits, entries, news 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 phpmyfaq.de. We do not log anything in this process! A second button is our online verification service. Then clicking on the button phpMyFAQ calculates a SHA-1 hash for all files and checks it against a web service provided on phpmyfaq.de. With this service it's possible to see if someone changed files.
You can switch the current language in the administration backend 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.
A user without any permission in the admin section can still gets read access to categories and records. You can set the permissions on categories and records in the category and record administration frontend.
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. To enable the group permissions, please set the permission level from basic to medium in the main configuration.
Sections in phpMyFAQ are a little bit special. You can define sections for large FAQ installation to separate content not only between different groups but even for section. A section could be a part of a big corporate company.
phpMyFAQ lets you create different categories and nested sub-categories for your FAQs. 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 frontend to view all translated categories. For accessibility reasons you should add a small description for every category. You can add an image for every category, which will be shown even on the start page, if you flag this category with this configuration. 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 FAQs 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. The Editor can be disabled in the configuration if you want.
Language
You can select the language of your FAQ. 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 FAQs and edit your English FAQ record. Change the question, answer and keywords and change language to, let's say Brazilian Portuguese. Save the FAQ record. Now you can, when you click edit records, see both FAQs in your list, having the same id, yet different languages.
Attachments
You can add attachments like PDFs or any other binary data using the Add attachment button. If you click on the button, a popup opens and you can upload an attachment. Please keep in mind that the PHP configuration about upload size will be checked.
Keywords
Keywords are relevant for searching through the database. In case you didn't include a specific word in the FAQ itself, but it is closely related to the content you may wish to include it as a keyword, so the FAQ 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 FAQ here. An Ajax-based auto-completion method helps you while typing your tags.
Author
It is possible to specify an author for your FAQ.
It is possible to specify the author's email for your FAQ, but the email address won't be shown in the frontend.
Solution ID
Every FAQ generates automatically a so-called solution ID. All records can be accessed directly by putting this ID into the search box.
Active?
If a FAQ is "active" it is visible in the public area and will be included in searches. Is it "deactivated" it will be invisible. Suggested FAQs are deactivated by default to prevent any abuse.
Sticky?
If a FAQ 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 FAQ you can disable the feature here.
Revision
Like a wiki, phpMyFAQ 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 frontend. You can also bring back old revisions into the frontend 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. Please note that the permissions of the chosen category override the permissions of the FAQ itself.
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 until the whole FAQ is 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 frontend 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.
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 tags in the frontend.
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.
5.9. Attachment Administration
In the attachment administration you can see an overview of all all attachments with their filename, file size, language and MIME type. You can delete them, too.
Below every entry visitors have the chance to rate the overall quality of a FAQ 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.
Reports On the reports page you can select various data columns to generate a report about content and usage of your FAQ installation. You can export the report then a CSV file.
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.
To back up the whole data located on your web server you can run our simple backup script located in the folder /scripts.
In order to host several distinct installations (with different configs, different templates and most importantly, different database credentials), but only want to update once, you need to follow these steps:
For every separate installation there needs to be a subdirectory of multisite/ named exactly like the hostname of the separate installation. For example, if you want to use faq.example.org and beta.faq.example.org, it needs to look like this:
.
|-- [...]
|-- config
| |-- constants.php
| `-- database.php
`-- multisite
|-- multisite.php
`-- beta.faq.example.org
|-- constants.php
`-- database.php
If you need to add metadata to your template, you can do this in the template metadata administration. You can define a page type, e.g. "foobar", a content type (Text or HTML) and the content, e.g. <marquee>Foobar</marquee>
. After saving the metadata entry, you can use it in your template:
``
In phpMyFAQ code and layout are separated. The layout is based on several template files, that you can modify to suit your own needs. The most important files for phpMyFAQ's default layout can be found in the directory assets/themes/default/. All original templates are valid HTML5.
Note: You can change the layout of the admin area using the CSS file admin/css/style.css.
The default layout of phpMyFAQ is saved in the assets/themes/default/templates/index.html file. This is a normal HTML5 file including some variables in double curly brackets like Twig or Handlebars, serving as placeholders for content.
Example:
<span class="useronline"></span>
The template-parser of the FAQ converts the placeholder ** 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.
This section needs more documentation.
You need another template design or more HTML5/CSS3 features? Then write us an email, and we can talk about it.
phpMyFAQ users have even more customization opportunities. The key feature is the user selectable template sets, 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 ** containing the name of the actual layout available in each template file.
This part of documentation is for developers who want to contribute to phpMyFAQ.
phpMyFAQ is developed using PHP, JavaScript and SCSS. You find further information on our homepage.
phpMyFAQ offers interfaces to access phpMyFAQ installations with other clients like the iPhone App. phpMyFAQ includes a REST API and offers APIs for various services like fetching the phpMyFAQ version or doing a search against the phpMyFAQ installation.
Open endpoints require no Authentication.
GET /api/v2.1/version
GET /api/v2.1/language
GET /api/v2.1/news
GET /api/v2.1/categories
GET /api/v2.1/tags
GET /api/v2.1/open-questions
GET /api/v2.1/search?q=<search string>
GET /api/v2.1/searches/popular
GET /api/v2.1/attachments
GET /api/v2.1/comments
GET /api/v2.1/faqs
GET /api/v2.1/faqs/:categoryId
GET /api/v2.1/faqs/tags/:tagId
GET /api/v2.1/faq/:faqId
GET /api/v2.1/faq/:faqId?filter=pdf
GET /api/v2.1/faqs/latest
GET /api/v2.1/faqs/popular
GET /api/v2.1/faqs/sticky
POST /api/v2.1/login
Closed endpoints require a valid API client token to be included in the header of the request. An API client token can be acquired from the admin configuration.
GET /api/v2.1/faq
POST /api/v2.1/register
If you want to see possibe errors or the log of the SQL queries, you can enable the hidden DEBUG mode. To do so, please set the following code in src/Bootstrap.php:
const DEBUG = true;
Thank you for using phpMyFAQ! :-)
Author: Thorsten Rinne Co-Authors: Stephan Hochhaus, Markus Gläser
Date: 2022-02-12
© 2001-2022 phpMyFAQ Team
This documentation is licensed under a Creative Commons License.