Giter Club home page Giter Club logo

phpmyfaq's Introduction

phpMyFAQ 4.0-alpha

Packagist PHP Version Support GitHub GitHub commit activity Documentation Status

What is phpMyFAQ?

phpMyFAQ is a multilingual, completely database-driven FAQ-system. It supports various databases to store all data; PHP 8.2+ is needed to access this data. phpMyFAQ also offers a multi-language Content Management System with a WYSIWYG editor and a media manager, real time search support with Elasticsearch, flexible multi-user support with user and group 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, PDF-support, a backup and restore system, a dynamic sitemap, related FAQs, tagging, enhanced SEO features, built-in spam protection systems, Microsoft Entra ID, Microsoft Active Directory and OpenLDAP support, and an easy-to-use installation and update script.

Requirements

phpMyFAQ is only supported on PHP 8.2 and up, you need a database as well. Supported databases are MySQL, MariaDB, Percona Server, PostgreSQL, Microsoft SQL Server and SQLite3. If you want to use Elasticsearch as the main search engine, you need Elasticsearch 6.x or later. Check our detailed requirements on phpmyfaq.de for more information.

Installation

phpMyFAQ installation package for end-users

The best way to install phpMyFAQ is to download it on phpmyfaq.de, unzip the package and open http://www.example.org/phpmyfaq/setup/index.php in your preferred browser.

phpMyFAQ installation with Docker

Dockerfile

The Dockerfile provided in this repo only builds an environment to run any release for development purpose. It does not contain any code as the phpmyfaq folder is meant to be mounted as the /var/www/html folder in the container.

docker-compose.yml

For development purposes, you can start a full stack to run your current PhpMyFAQ source code from your local repo.

$ docker-compose up

The command above starts nine containers for multi database development as following.

Specific images started once to prepare the project:

  • composer: update composer dependencies
  • pnpm: update pnpm dependencies

Running using named volumes:

  • mariadb: image with MariaDB database with xtrabackup support
  • phpmyadmin: a PHP tool to have a look at your MariaDB database.
  • postgres: image with PostgreSQL database
  • pgadmin: a PHP tool to have a look at your PostgreSQL database.
  • sqlserver: image with Microsoft SQL Server for Linux
  • elasticsearch: Open Source Software image (it means it does not have XPack installed)

Running apache web server with PHP 8.3 support:

  • phpmyfaq: mounts the phpmyfaq folder in place of /var/www/html.

Then services will be available at the following addresses:

Running tests

To run the test using Docker, you have to install the Composer development dependencies

$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
$ php composeer.phar test

Quote from Elasticsearch documentation

The vm.max_map_count kernel setting needs to be set to at least 262144 for production use. Depending on your platform:

Linux

The vm.max*map_count setting should be set permanently in */etc/sysctl.conf_:

$ grep vm.max_map_count /etc/sysctl.conf
vm.max_map_count=262144

To apply the setting on a live system type: sysctl -w vm.max_map_count=262144

macOS with Docker for Mac

The vm.max_map_count setting must be set within the xhyve virtual machine:

$ screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

Log in with root and no password. Then configure the sysctl setting as you would for Linux:

$ sysctl -w vm.max_map_count=262144
Windows and macOS with Docker Toolbox

The vm.max_map_count setting must be set via docker-machine:

$ docker-machine ssh
$ sudo sysctl -w vm.max_map_count=262144

phpMyFAQ local installation from Github

To run phpMyFAQ locally, you need at least a running web server with PHP support and a database.

$ git clone git://github.com/thorsten/phpMyFAQ.git
$ cd phpMyFAQ
$ git checkout main
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
$ curl -fsSL https://get.pnpm.io/install.sh | sh -
$ pnpm install
$ pnpm build

Then just open http://www.example.org/phpmyfaq/setup/index.php in your browser.

Testing

PHP

To run our unit tests via PHPUnit v11.x, just execute this command on your CLI

$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
$ ./vendor/bin/phpunit

Please note that phpMyFAQ needs to be installed via Composer.

Javascript

To run our Javascript tests via Jest, just execute this command on your CLI

$ curl -fsSL https://get.pnpm.io/install.sh | sh -
$ pnpm install
$ pnpm test

End-to-end tests

Note: Not implemented yet.

To run our end-to-end tests via Playwright, you can use several commands:

$ pnpm exec playwright test

Runs the end-to-end tests.

$ pnpm exec playwright test --ui

Starts the interactive UI mode.

$ pnpm exec playwright test --project=chromium

Runs the tests only on Desktop Chrome.

$ pnpm exec playwright test example

Runs the tests in a specific file.

$ pnpm exec playwright test --debug

Runs the tests in debug mode.

$ pnpm exec playwright codegen

Auto generate tests with Codegen.

Versioning

For transparency and insight into our release cycle, and for striving to maintain backward compatibility, phpMyFAQ will be maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and patch)
  • New additions without breaking backward compatibility bumps the minor (and resets the patch)
  • Bug fixes and misc changes bumps the patch

For more information on SemVer, please visit http://semver.org/.

Issue tracker

Found a bug, or do you have a feature request? Please open a new issue. Before opening any issue, please search for existing issues.

Contributing

Please check out our page about contributing on phpmyfaq.de.

Documentation

You can read the complete documentation on here.

REST API v3.0 documentation

The REST API documentation is available as OpenAPI 3.0 specification here.

License

Mozilla Public License 2.0, see LICENSE for more information.

Copyright © 2001–2024 Thorsten Rinne and the phpMyFAQ Team

phpmyfaq's People

Contributors

adipsys avatar aherking avatar chris--a avatar dependabot-preview[bot] avatar dependabot[bot] avatar derrabus avatar dsp avatar eldobam avatar etcho avatar gejobj avatar greenkeeper[bot] avatar iamaliyousefi avatar kralizeck avatar maghin avatar maxxer avatar mkrauser avatar modelrailroader avatar nighknight avatar owndomainhome avatar peter-kehl avatar sasamario avatar schmitzn avatar scottcwilson avatar scrutinizer-auto-fixer avatar thorsten avatar thorsten-rinne-mw avatar to-kn avatar weltling avatar werkstrom avatar winks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpmyfaq's Issues

2.6.15 - PDF export and permissions

I've noticed that if you try to export an article with permissions as a pdf, you get an empty record in the getRecord() function.

This problem can be solved by adding the adding the authentification parts in pdf.php.

These parts can be found it in index.php :

  • Authenticate current user
  • Get current user rights
  • Get current user and group id - default: -1¨

and replacing the following lines in php.pdf :

//$category = new PMF_Category();

$category = new PMF_Category($current_user, $current_groups);

//$faq = new PMF_Faq();

$faq = new PMF_Faq($current_user, $current_groups);

Add UUID to every FAQ entry

Using UUIDs, the administrator has two rewrite options:

* the current approach (with the question’s text – prone to changes and possibly long);
* the record UUID (“permanent”).

The UUID has also the advantage of being shorter (but not as user friendly as the first option), and may obfuscate the internal query/DB implementation to the external user.

URLs with “v.4” UUIDs don’t need to be URL-encoded (percent-encoding).

Another advantage: the record's UUID value may be used in the RSS optional element (this avoids feed validators complaints).

Examples

* Without rewrite statements
  http://faq.example.com/index.php?action=artikel&cat=1&id=23&artlang=en

* With the current rewrite method
  http://faq.example.com/content/1/23/en/the-question_s-text-that-is-prone-to-changes_and-possibly-long_very-long-or-with-diacritic-characters.html

* Using UUIDs on the rewrite
  http://faq.example.com/a7a67b6c-f7c8-4dc4-9da5-235a64d48e5a 

For non-specialists
[1] RFC 4122. More recent documentation about this subject is available.
[2] A UUID “v.1” contains the creation date/time but has security problems – it includes the host MAC address.

2.7 Alpha 2 Facebook Like button Error

When you go to a FAQ and click on the Facebook like button it will say you like this but gives an error in red letters and this is with the facebook support enabled or disabled same results.

On changing password there is no notification

A user have changed the password in 2.7 alpha. The password has changed, but there wasn't the noftication, that the password has changed. In 2.06 there was an addtional line "password changed successfully".

Unable to edit Categories

Admin Interface - Content - Categories.

On click the "rename" icon it seems, that an FAQ gets opened. The screen gets messed, and it is not possible to rename it.

2.7 Beta 3 Add callback for Attachments without refreshing

when trying to attach an image to an FAQ for example if u click on attach file it doesnt show what file name is attached or not so user wouldnt be able to tell if it acually attached the file unless they went to front end to view it to see if it attached file or not..... but if you click at the top of the editor on the little image that says insert/edit image then it will display at the bottom what attachments are attached.

for example if i have an image name example.jpg then beside where it says attavh file is should display that example.jpg is attached

2.7 Alpha 2 Instant Response"just type" is not working

If you click on instant response on the front end, at the top and try to type in the search feild nothing is coming up ... it should come up with something but for some reason its not and the instant response is enabled in the backend.

2.7 Beta 2 Fix right side colum gets smaller when news added"Layout Issue"

i went to create a small 2 lines in the news area and the right hand sidebar gets smaller and smaller the left side bar is a fixed width so it never changes size, i dont think this is really a bug issue, just a small issue that should be fixed it should be able to stay the same size it gets so small that is unable to display under the latest FAQ on right sidebar the Date or on the most popular it wont show how many views.....

i understand you might not want the right bar to always stay the same time because it has to be able to get larger for longer FAQs im not sure how this can be fixed, because it throws the page off and looks kind of weird when it gets so small...

2.7 Alpha 2 Twitter Support in backend not showing following count

For some reason it is now showing how many people i am following in the backend for twitter, it shows how many followers i have and status countand the status..... so i am not sure if this is just happening on my test system of if you have the same problem or not....

Newly added FAQ not shown when "Activate a new records=true"

I changed the configuration settings so newly added FAQ's are automatically activated. "Activate a new records=true"

user now can add new faq's and are activated active=true(I checked in the "administration" as well in the DB)

on the front end I see that the total of faq's succesfully increases (so far so good)

when I navigate to the category it's says total number of FAQ's = 2 (still correct)

when i open the category I only see 1 faq! The new faq is not shown..

is there something I'm missing? or do you need to fix it?

using: phpmyfaq 2.6.13 with a fresh install

trunk - failure adding category

trunk checked out this morning

attempt to add category results in truncated page, turning on debug, I see

phpMyFAQ strict warning [2048]: Only variables should be passed by reference in /Users/poirier/Sites/phpMyFAQ/phpmyfaq/inc/PMF_Category/Node.php on line 206
Add new category Fatal error: Call to undefined method PMF_User::getCsrfTokenFromSession() in /Users/poirier/Sites/phpMyFAQ/phpmyfaq/admin/category.add.php on line 46

System Information
phpMyFAQ Version phpMyFAQ 3.0.0-dev
Server Software Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3
PHP Version PHP 5.3.3
Register Globals off
Safe Mode off
Open Basedir off
Database Server Sqlite
Database Client Version SQLite 2.8.17
Database Server Version SQLite 2.8.17
Webserver Interface APACHE2HANDLER
PHP Extensions Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, session, iconv, json, ldap, mbstring, standard, mysqlnd, SPL, odbc, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysql, shmop, SimpleXML, snmp, soap, sockets, SQLite, exif, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, apache2handler

Layout 2.7 News page format suggestion

1.) Paragraph spacing is different for HTML paragraphs:

and
.

2.) with more than 2 news Pagraph spacing before News subject is too small

3.) I would prefer a smaller header of each news (font size like "Most viewed")

2.7 Alpha 2 Change link in contact

Change link in Template/contact.tpl to reflect the appropriate link at the bottom where it says © 2001 - 2011 by phpMyFAQ Team its pointing to just phpmyfaq.de when it should point to http://www.phpmyfaq.de/team.php because when people think of team they think its going to display the acual team.

also link pMyFAQ logo by Lieven Op De Beeck needs to be removed or changed since its pointing to a non functional website its pointing to http://www.lieven.be/

2.7 Alpha 2 No Admin worklog

I thought that the work log in left side control panel of admin would display a list of recent history of what the admin is doing but there is no clickable link for admin work log or nothing displaying underneath admin work log, as i see right now it has no functionality to it....

2.7 Alpha 2 Instant Response not hidden

By Default instant response under configuration is not enabled so i thought that the instant response at top bar that is next to all categorys would be hidden when not enabled then if you enable it. i thought it would unhide instant response

Because if you have instant response disabled in the backend, theres really no reason to have it showing in the front end and people will be trying to type and it not doing anything... it would just confuse people.

2.7 Alpha 2 publish open question issue in backend

In the backend after an open question has been submitted from the front end... it goes to the backend for approval then when you click on open questions in the back end it gives you the option to publish by default its set to No, it can be kind of confuesing but you have to click on the No to make it say yes then you click on the yes to finally publish

maybe a good fix for somthing like that is to add to the back end under the open question then publish have it say Yes / No so all we have to do is click once on yes to make it publish....

Error in phpMyFAQ 2.7.0-alpha Setup

Hi,

I have the newest XAMPP installation (1.7.4) with MySQL 5.5.8.
During the installation of phpMyFaq I get the following message:

DB error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) NULL, display_name VARCHAR(50) NULL, email VARCHAR(100) NULL )' at line 3
CREATE TABLE faquserdata ( user_id INT(11) NOT NULL, last_modified TIMESTAMP(14) NULL, display_name VARCHAR(50) NULL, email VARCHAR(100) NULL )

Searching with google says that the "(14)" behind "TIMESTAMP" must no longer be set.

Could you please look into it and fix it.

Best Regards
Alex

2.7.0-alpha export to xhtml displays html source

When I export to xhtml, the resulting xhtml file escapes the HTML formatting of the FAQ entries, so when I display the page, I see HTML markup instead of formatted text.

Excerpt from the exported .xhtml file:

Browser displays HTML source instead of rendering page

<p>Symptom: client&#39;s browser displays HTML source instead of rendering the page as expected.</p> <p>Cause: HTTP response has wrong content-type</p>

Author: [email protected]

Last update: 2011-03-17 12:25

2.7 Alpha 2 Not able to post comment on FAQ

Not able to post comment on FAQ if you have under main configuration if Mail address as mandatory field is enabled but if Mail address as mandatory field is not enabled your able to post a comment on an FAQ just fine.

Add attachments lead the user to the dashboard.

Add attachments lead the user to the dashboard.
A user wants to edit an existing FAQ and add an attachment. The upload dialog cames up, and it is working.
But the main window goes from the edit window and toto the dashboard. My colleague stopped working:(

FAQs not showing up

2.7.0-alpha2, PHP 5.2.3, SQLite 2.8.17

Updated from 2.7.0-alpha by downloading the alpha2 zip file, and copying over the files specified in the 2.6 doc, and going to install/update.php and going through the panels, then deleting the files as instructed.

I've added a half-dozen FAQs, they show up in the admin, and "active" is checked. When I edit one of them, Visible is set to Yes. Group permissions show "Access for all groups", User permissions show "Access for all users". Expiration times are empty. No attachments, no keywords, a few tags on most of them.

But when I go to the phpmyfaq home page, it reports "There are 0 FAQs online".

2.7 Alpha 2 By Default FAQ visible it set to no-Check possibility of changing to yes

This really is not an issue,,,, when you go to add an FAQ by default its selected no to make visible, when personally i think it should be set to yes because people create more FAQ that they want visible rather then making them not visible, its just bothersom to have to select yes each time, for example i have over 100 FAQ in my primary system and i would have to select yes make visible for all 100..

Outsiders trying to answer Open Questions

People trying to edit open questions receive following error message even when they have entered valid information in ALL fields!

  Proposal for a new FAQ

 Required fields are your name, your email address, category, headline, your Record and, when requested, the Captcha code!

What is wrong? I've checked all configuration three times, experimented, searched FAQ on phpMyFAQ site - no answer? (Sorry to have to ask here, I'm simply out of ideas!)

Otherwise a TREMENDOUS program and if I succeed in getting my user base to use it, will definitely donate!

Yoel Ben-Avraham
http://net-presence.info/faq/

Javascript Void 2.7 Alpha2

When trying to Delete FAQ in 2.7 will get javascript void message at bottom of browser, am not able to delete FAQ unless click on the FAQ to edit then scroll to bottom to delete FAQ.

2.7 alpha2, articles not appearing

I am testing 2.7 alpha2. I am running under PHP 5.3.3-1ubuntu9.3 and MySQL 5.1.49-1ubuntu8.1

I can create new articles, set them to be visible, and review\edit them in the admin interface.

From the user interface, the articles never appear. When I click on the category name, the name category name is displayed as a link, instead of showing links to articles in the category.

I am not sure if it is something I have configured wrong, but I believe it is a bug. I have version 2.6.14 running on this same web server without any issues.

2.7 Alpha 2 posibility of adding link for google api key

its not very clear on how to obtain a google api translation key..... under configuation setting in backend... ive searched google on how to obtain but couldnt find much..... so it would be nice if you could possibly add this

"Dont have api click here" with the link that will direct them to the appropriate place to get one.

Login hakt manchmal mit FF

Hi Thorsten,

hier mein erster Post
1.) Login hakt manchmal mit FF, wenn die URL des normalen Portals eingegeben wird, dann öffnet sich nicht die box um user+pw einzugeben. Nach einem click auf Refresh tut es dann.

2.) Das {msgSearch} unter der Sucheingabe gehört da auch nicht hin, oder?

Layout 2.7 FAQ content has a fixed width

We are evaluate using the 2.7 layout. The middle column has on any screen resolution the same size (and it is too small). This makes the content not readable.

2.7 Alpha2 FAQ text Area Grey

When you go to edit or Add a FAQ the Text Area is grey.....at first its white then the background of text area goes grey instead of staying white.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.