This repository contains the source code for the Textpattern support forum.
Requires an installation of our customized clone of FluxBB.
Older versions of the above and other browsers may work, but these are the ones we verify.
Building this repository requires:
Environment must consist of:
The project uses Grunt to run tasks and Sass for CSS pre-processing. This creates a few dependencies in addition to your normal PHP required by FluxBB. First make sure you have base dependencies installed: Node.js and Grunt. You can install Node using the installer, Composer using the installer, and Grunt with npm:
$ npm install -g grunt-cli
Consult the Grunt documentation for more instructions if necessary.
The public/
directory is intended to be set as the server's document root. You can do this by adding a new virtual host to your httpd.conf
. Along the lines of:
<VirtualHost *:80>
VirtualHost "/absolute/path/to/textpattern-forum/public"
ServerName forum.textpattern.test
</VirtualHost>
On a local development server, after this you can use your hosts file to point the development domain to correct location (e.g. back to home), run a local DNS server that resolves .test TLDs, or use a xip.io domain.
After you have the base dependencies taken care of, you can install the project's dependencies. Navigate to the project's directory, and run the dependency managers:
$ cd textpattern-forum
$ npm install
$ composer install
npm installs Node modules for Grunt and composer installs PHP libraries.
Once you have Grunt installed, you can then install our customized clone of FluxBB - place it in the public/
directory. Complete FluxBB's installation by following the normal Installation steps, and use this as your config.php template.
Periodically we update our customized clone of FluxBB. To update your FluxBB installation, simply install files from that repository again.
You may need to adjust the write permissions on the public/cache/
directory after updating.
This repository hosts sources and needs to be built before it can be used. After you have installed all dependencies, you will be able to run tasks using Grunt, including building:
$ grunt @task@
Where the @task@
is either build
or watch
.
build
task builds the project.watch
task will launch a task that watches for file changes; the project is then automatically built if a source file is modified.We offer a public API that can be used to retrieve data from the forums and topics. The public end point can be found from https://forum.textpattern.com/api
. Data can be retrieved as JSON, and options can be passed optional HTTP query parameters. This API is read-only, and all requests must be done using HTTP GET method. You can also ping resource existence with HEAD, but any other methods are rejected.
HTTP status codes can be used to detect the type of response. The server responds with:
Authentication happens using basic HTTP method and regular forum user account.
$ curl -u "username" https://forum.textpattern.com/api/
If you request a private or removed resource without being logged in, you will be treated with 401 response:
$ curl -I https://forum.textpattern.com/api/posts/401
Responds with:
HTTP/1.0 401 Unauthorized
Date: Tue, 15 Oct 2013 09:16:42 GMT
Server: Apache
WWW-Authenticate: Basic realm="Textpattern CMS Support Forum External Syndication"
Connection: close
Content-Type: application/json; charset=UTF-8
GET https://forum.textpattern.com/api/topics/:forum
Returns topics from the specified forum.
last_post
or posted
.$ curl https://forum.textpattern.com/api/topics/2
Response headers:
HTTP/1.1 200 OK
Date: Sun, 13 Oct 2013 11:24:49 GMT
Server: Apache
Content-Type: application/json; charset=UTF-8
Response body:
{
"url": ["https:\/\/forum.textpattern.com\/index.php"],
"topic": [
{
"title": "Better way to upload media",
"link": "https:\/\/forum.textpattern.com\/viewtopic.php?id=40096&action=new",
"content": "<p>+ lots<\/p>",
"author": {
"name": "tye",
"uri": "https:\/\/forum.textpattern.com\/profile.php?id=5751"
},
"posted": "26 September 2013 21:51",
"postedutc": "2013-09-24T16:18:48Z",
"id": "40096"
}
]
}
GET https://forum.textpattern.com/api/posts/:topic
Returns replies from a specific public topic.
$ curl https://forum.textpattern.com/api/posts/40092
Response headers:
HTTP/1.1 200 OK
Date: Sun, 13 Oct 2013 12:24:49 GMT
Server: Apache
Content-Type: application/json; charset=UTF-8
Response body:
{
"url": ["https:\/\/forum.textpattern.com\/viewtopic.php?id=40092"],
"post": [
{
"title": "Re: Tag tree best practise: to nest or not to nest",
"link": "https:\/\/forum.textpattern.com\/viewtopic.php?pid=275473#p275473",
"content": "<p>Stef, this is really useful – I’m on the right track. Thank you very much.<\/p>",
"author": {
"name": "gaekwad",
"uri": "https:\/\/forum.textpattern.com\/profile.php?id=7456"
},
"posted": "26 September 2013 21:51",
"postedutc": "2013-09-24T16:18:48Z",
"id": "275473"
}
]
}
Want to help out with the development of Textpattern CMS? Please refer to the Contributing documentation for full details.
Licensed under MIT license.