Compare commits

..

177 Commits

Author SHA1 Message Date
Daniël Klabbers
4bbaae25f6
Merge pull request #92 from gomzyakov/patch-1
Fix Flarum logo in README.md
2024-06-29 21:28:45 +02:00
Alexander Gomzyakov
ecb5b6b9ab
Update README.md 2024-06-29 17:25:43 +05:00
Alexander Gomzyakov
5d98f8965b
Fix Flarum logo in README.md 2024-06-29 14:09:53 +05:00
Sami Mazouz
30bc7b40ce
chore: mark resource protection rule blocks 2024-01-02 16:03:33 +01:00
Sami Mazouz
fb04e78b1f
chore: Release v1.8.0 2023-05-20 19:23:43 +01:00
Sami Mazouz
177e6e16d0
chore: Release v1.7.0 2023-03-10 14:55:40 +01:00
Sami Mazouz
b0316baf72
chore: v1.6 changes 2022-11-15 13:23:40 +01:00
Daniël Klabbers
0be676095d v1.5 changes 2022-09-13 11:46:32 +02:00
Soobin Rho
887f9e288c
docs: update copyright year (#85)
Update copyright year from 2021 to 2022.
2022-07-25 09:05:22 +01:00
Soobin Rho
9ad5d2cb18
docs: link logo at the top with the official website (#84)
When I was reading README.md,
I clicked the logo and I expected to go to
the official website https://flarum.org/
but it didn't. So, the image is being linked
to the official website in this commit.

Signed-off-by: Soobin Rho <soobinrho@gmail.com>
2022-07-23 10:14:48 +01:00
Daniël Klabbers
151257ee7a chore: update changelog and dependencies 2022-07-13 18:44:29 +02:00
Edward Betts
bceb9cae11
chore: Correct spelling mistakes (#81) 2022-06-09 11:55:06 +01:00
Daniël Klabbers
64ca250e44 v1.3 release 2022-05-16 10:59:34 +02:00
Daniel Klabbers
4ce0568122 Release v1.2 2022-01-20 12:59:45 +01:00
David Wheatley
1b23531e8c
docs: remove TravisCI badge 2021-12-17 20:19:25 +01:00
victorelec14
20a2be9946
fix: update docs url in composer.json (#78) 2021-12-15 15:16:49 +00:00
Kalecgos1
a18c94aedc
Add text/javascript to gzip_types in .nginx.conf (#77)
Add text/javascript to gzip_types in .nginx.conf files to allow gzipping of *.js files.
2021-10-23 20:42:04 -04:00
Xiangbo Mao
bfc0693fc0
fix broken doc links in README.md (#76)
Co-authored-by: Xiang-Bo Mao <xmao@tableau.com>
2021-10-03 03:21:29 -04:00
Daniël Klabbers
dd31375264
Merge pull request #75 from flarum/jordanjay29-patch-1
Remove redundant installation info lines
2021-06-28 10:33:26 +02:00
jordanjay29
ffed65ca63
Remove redundant installation info lines
Why do we even have this ~~lever~~ line? 

Looks like a bit of oversight when we consolidated docs and updated for stable. Probably made sense at the time, now we have installation docs that we keep up to date. Remove this line to prevent confusion because it's out of date.
2021-06-27 23:59:25 -05:00
Daniël Klabbers
9c2f747f92
change security to the policy page 2021-06-10 23:10:24 +02:00
Daniel Klabbers
d5b2515f54 changelog for v1.0.0 2021-05-27 10:54:35 +02:00
Daniël Klabbers
ea8723b4f2
update constraints for stable (#74)
* update constraints for stable

* Update composer.json
2021-05-25 14:50:52 +02:00
David Wheatley
ceb7c7fcf3
Update copyright year 2021-05-15 00:43:06 +01:00
Alexander Skvortsov
46c648991c
Fix PHP reqs, mention mariadb 2021-03-16 02:37:49 -04:00
Daniel Klabbers
cd4b673d98 Release v0.1.0-beta.16 2021-03-15 16:19:04 +01:00
OrangeTurtle197
cc0046bcc1
Update README.md (#72)
fix screenshot in readme
2021-03-05 10:51:26 -05:00
Daniël Klabbers
5950779a1a
Update composer.json (#71)
update authors
2021-02-23 10:32:12 +01:00
Alexander Skvortsov
07379ba4a5
Add nicknames to new installs (#70) 2020-12-20 22:53:11 +01:00
Daniël Klabbers
5abd213039 added @askvortsov1 to composer.json 2020-10-20 16:46:50 +02:00
Daniël Klabbers
e39a512e0c changelog for v0.1.0-beta.14 2020-10-20 16:45:55 +02:00
Lucas Henrique
68110bf52e
Fix README.md logo path (#68)
Bring back Flarum logo by adding missing "/assets" segment.
2020-10-15 19:41:56 -04:00
Daniël Klabbers
e786d788ea
Update composer.json (#67)
Drop the oauth extensions, see https://github.com/flarum/core/issues/2006
2020-09-07 19:54:14 -04:00
Matt Kilgore
4ffaf91ec4
Add IIS config for easier windows setup (#66)
* Add IIS config for easier windows setup

* Use regex from .nginx.conf and comment out rule

Uses the more common regex which reduces the number of rules and also commented out for consistency with nginx and apache

* Used enabled flag for no-public restrictions

Also fixes any indentations
2020-09-04 18:33:33 -04:00
Clark Winkelmann
0ef4318913
nginx rule to prevent access to sensitive files (#65)
* nginx rule to prevent access to sensitive files
* Add a suggested rule that does the same as the suggested rule in .htaccess
* Add .git and auth.json to nginx sensitive resources
2020-06-03 08:59:10 +02:00
Alexander Skvortsov
3aeffd15aa
Latest beta now requires PHP 7.2+ 2020-05-08 11:49:45 -04:00
Daniël Klabbers
9400a34ab0
Release v0.1.0-beta.13 2020-05-06 10:57:08 +02:00
Daniël Klabbers
adada6456f
prevents reading composer related json file 2020-04-21 15:05:09 +02:00
Daniël Klabbers
7fc74eb36c ready up for b12, updated authors, changelog 2020-03-04 10:41:48 +01:00
Franz Liedke
542331b6b4
Extract duplicated site setup to shared file (#63) 2020-01-31 14:03:32 +01:00
Franz Liedke
41497429f6
Consistent spacing 2020-01-17 16:43:50 +01:00
Daniël Klabbers
abe7a51cf5
update index.php with new license 2020-01-05 22:31:04 +01:00
Daniël Klabbers
7a875ce203
update extend.php with new license 2020-01-05 22:30:37 +01:00
Daniël Klabbers
0aeead1259
update binary with new copyright 2020-01-05 22:30:09 +01:00
Franz Liedke
cb7312b84a
Update copyright year 2020-01-03 15:21:10 +01:00
Franz Liedke
38a0c4558b
Revert "fixes" from StyleCI
These were intended, to simplify getting started or changing things in
the base skeleton.

StyleCI has now been disabled for this repository.
2020-01-03 15:20:30 +01:00
Franz Liedke
f1d5b46b4e Apply fixes from StyleCI 2019-11-29 23:17:03 +00:00
Franz Liedke
60299dd9e5
Update copyright claims in LICENSE 2019-11-30 00:01:05 +01:00
Daniël Klabbers
03223e3c69 v0.1.0-beta.10 releasing 2019-09-16 15:25:00 +02:00
Franz Liedke
b196d2cc32
Release beta.9 2019-07-05 12:49:09 +02:00
Franz Liedke
4acab4a46f
Release beta.8.1 2018-12-06 09:27:08 +01:00
Toby Zerner
1683328c86 Add changelog 2018-12-02 08:03:29 +10:30
Toby Zerner
e2544a2a22 Prevent caching of JSON:API responses
See https://discuss.flarum.org/d/17793-a-force-refresh-fixes-everything-temporarily
2018-12-02 07:44:59 +10:30
Toby Zerner
60005b67cc Uppercase that README 2018-11-22 18:35:40 +10:30
Toby Zerner
69bd886df8 Remove copyright year from LICENSE
So we don't have to worry about keeping it updated
2018-11-21 18:19:40 +10:30
Toby Zerner
fb56b87a49 Update README, consolidate other meta files
Code of Conduct and Contributing have been moved into the new docs
2018-11-21 18:12:40 +10:30
Toby Zerner
b4a09a072f Update .htaccess rules and add .nginx.conf
- Clean up .htaccess and use best practices from h5bp/server-configs.

- Extract Nginx config from docs into a new .nginx.conf file which can
  be included in the server block. Also uses best practices from
  h5bp/server-configs.

- Remove "Allow access if Flarum is installed in a subdirectory but
  another .htaccess in a higher directory denies access" rule. I'm not
  sure why this was in here. Traced it back to

    c17588f1cd (diff-8052c42ab3b8aa06a3f5f788a4ddccc2)

  but there's no real rationale behind why such an edge case should be
  included in the default .htaccess?
2018-11-21 17:26:02 +10:30
Toby Zerner
3ec2aad36e
Merge pull request #58 from flarum/tz/code-of-conduct
Add Code of Conduct
2018-11-15 15:06:16 +10:30
Toby Zerner
8492ce3a0b Add code of conduct 2018-11-14 15:59:32 +10:30
Franz Liedke
8b9da9be31
Configure all paths explicitly
Suggested by @tobscure below commit dfebb5c8ca3306f8dd26003d79ba3d0c830f3081.
2018-10-28 23:12:45 +01:00
Franz Liedke
084d1b2ff2
Remove unused FLARUM_START constant 2018-10-26 00:56:33 +02:00
Franz Liedke
dfebb5c8ca
Adopt new Flarum\Foundation\Site interface
Refs flarum/core#1592.
2018-10-24 22:21:02 +02:00
Toby Zerner
dd740b4c40 Rename packages 2018-10-17 13:46:49 +10:30
Franz Liedke
655aa9cea9
Booting is now done by the Server classes
Refs flarum/core#1421.
2018-09-21 23:35:34 +02:00
Franz Liedke
54d9228ab8
Add a root-level extend.php for per-forum customizations 2018-09-01 16:14:23 +02:00
Toby Zerner
7b5bd17c77
Merge pull request #55 from flarum/fl/sites
Update skeleton for site/app refactoring
2018-08-24 18:21:34 +09:30
Franz Liedke
fe3a0ac993
Update skeleton for site/app refactoring 2018-08-22 08:03:51 +02:00
Clark Winkelmann
a82b4f209f Update urls with their current canonical versions (#54) 2018-08-02 17:35:25 +02:00
Franz Liedke
995a2621db
Prevent Git from auto-merging Composer's lockfile
Source: https://blog.martinhujer.cz/17-tips-for-using-composer-efficiently/
2018-06-02 15:06:48 +02:00
Franz Liedke
01e5fde09c
Composer: Sort dependencies 2018-06-02 15:04:46 +02:00
Franz Liedke
17926d696d
Remove http-interop package 2018-05-29 20:26:15 +02:00
Franz Liedke
088fdb4110
Unbundle Akismet extension
It's used comparatively rarely, and adds another required PHP
extension to our set of minimum requirements.

Closes flarum/flarum.github.io#69.
2018-05-17 15:29:23 +02:00
Franz Liedke
2798440851
Add directory for storing session data 2018-03-18 15:57:18 +01:00
Franz Liedke
84f8ef0395
Add version constraint for http-interop interfaces 2018-03-18 13:54:49 +01:00
Toby Zerner
d43085eaee
Merge pull request #50 from clarkwinkelmann/patch-1
Remove htaccess rules that are no longer necessary with the public folder
2018-03-06 06:08:59 +10:30
Clark Winkelmann
23a1ed3e58
Rules no longer necessary with the public folder 2018-03-05 18:09:14 +01:00
Franz Liedke
0e0d443f85
Tweak readme text 2018-01-07 18:39:15 +01:00
Gurjyot Singh
0e9810b1bc Added link for Flarum/core and Discord Chat (#45)
* Added link for Flarum/core and Discord Chat

* Fixed Text
2018-01-07 18:35:10 +01:00
Miguel Piedrafita
8ab7784514 Update license year (#47) 2017-12-31 20:46:40 +01:00
Franz Liedke
ddf49f77f8
Merge pull request #46 from gwillem/contributing
Add links to dev discussions
2017-12-30 19:09:17 +01:00
Willem de Groot
df852638f9 Add links to dev discussions 2017-12-29 22:10:24 +01:00
Toby Zerner
7dc7f97f3c Merge branch 'next-back' 2017-12-28 12:18:25 +10:30
Gurjyot
530c8a9946 Fixed "Roadmap's" link, "good first issue" label link and added Milestone's link (#44)
* Fixed links for Roadmap and Good first issue label

* Update CONTRIBUTING.md

* Changed Roadmap URL
2017-12-26 19:29:28 +01:00
Toby Zerner
f87217c6d9 Reset composer.json 2017-12-19 18:50:52 +10:30
Toby Zerner
47c8012869 Merge branch 'master' into next-back 2017-12-19 18:45:28 +10:30
Toby Zerner
4549c53c46 Remove Procfile
Leave it up to each dev to decide what workflow for running processes
they want to use.
2017-12-19 18:44:38 +10:30
Toby Zerner
e3ed1adb73 Remove Vagrant
Flarum is meant to be able to run on any PHP installation anyway so
Vagrant is not particularly useful (no need to standardize among devs)
2017-12-19 18:43:07 +10:30
Toby Zerner
c5c81c8651 Add public directory 2017-12-19 18:35:40 +10:30
Daniel Klabbers
7cf64af7f9 seems translations are working again, thanks to @tobscure 2017-11-27 10:01:23 +01:00
Toby Zerner
e1c0f1794a Add folder for locale cache 2017-11-12 22:42:51 +10:30
Franz Liedke
d779c97ced
Use new Site class to bootstrap web server and console 2017-07-05 21:47:23 +02:00
Franz Liedke
18c1750f3a
Delete unnecessary front controllers
See flarum/core@cc4b259115
2017-06-30 12:22:28 +02:00
Toby Zerner
6916205522 Merge pull request #41 from Luceos/patch-1
Update .htaccess
2017-05-24 12:40:53 +09:30
Daniël Klabbers
1ed484990f Update .htaccess
declined access to composer.json
2017-04-10 12:41:46 +02:00
Daniël Klabbers
0ba01391e8 Update .htaccess
flarum/core#692 protect composer.lock, but also improve protection for git directories
2017-04-07 13:39:46 +02:00
Franz Liedke
ba53bc77fd Merge pull request #40 from Strobotti/vagrant
Fix vagrant provisioning
2017-03-03 08:53:29 +01:00
Juha Jantunen
72eeac2b2e Fix vagrant provisioning 2017-03-03 09:02:08 +02:00
Juha Jantunen
4479d857b6 Fixes for Vaprobash environment (#38)
* Escape some quotes in environment.sh
* Fix incompatibility between Vaprobash 1.4.2 where first parameter for composer.sh is now treated as a Github token

Ref: https://github.com/fideloper/Vaprobash/pull/493
2017-03-02 08:07:33 +01:00
Franz Liedke
569e3a3b5e
Fix workaround for HTTPoxy vulnerability
Three issues with the previous solution:
* `Header unset` instead of `RequestHeader unset`
* No check for mod_headers being installed
* No alternative for when mod_headers is not installed (this still
  requires the mod_security module, but that's the best I could do)
2017-02-12 01:36:42 +01:00
Franz Liedke
70a765a2c8 Merge pull request #37 from milescellar/patch-1
Update year
2017-01-02 20:07:20 +01:00
Miles Cellar
a5b4c2eacd Update year 2017-01-01 22:50:11 +01:00
Toby Zerner
0c975a7f10 Remove PPM for now
Since it doesn't have a stable version tagged, which is causing issues with `composer install`.
2016-10-18 22:12:09 +10:30
Franz Liedke
46c951349a apache: Remove proxy header 2016-07-19 11:01:10 +09:00
Franz Liedke
de19d0a95b nginx: Overwrite Proxy header 2016-07-19 10:50:02 +09:00
Franz Liedke
7e17408634
htaccess: Block access to .git directory
Refs flarum/core#632.
2016-04-23 17:08:16 +09:00
Franz Liedke
cc8e9aa6e6
Add a Procfile for starting all dev processes at once
This can be used with tools like Foreman [1] to start a
web server and the asset compilation from one console.

[1] http://ddollar.github.io/foreman/
2016-04-20 20:10:02 +09:00
Franz Liedke
158f2020c8
Configure PPM to use correct bridge class 2016-04-19 11:07:16 +09:00
Franz Liedke
2a53b0367d
PHP-PM bridge for PSR-7 has been moved to new organization 2016-04-19 09:28:42 +09:00
Franz Liedke
6fa9800e55
Configure PHP-PM to use the correct bridge and the new server class 2016-04-16 23:20:28 +09:00
Franz Liedke
e4d90d6017
Load PHP-PM and a bridge for PSR-7 middleware 2016-04-16 23:20:12 +09:00
Franz Liedke
30dfd952b8
Upgrade to latest version of Studio 2016-04-06 22:53:56 +09:00
Franz Liedke
533e7d4051 Use sensible version constraint for Studio 2016-03-28 14:04:44 +09:00
Franz Liedke
8caebc73e6 Upgrade version constraint for Studio 2016-03-04 00:27:09 +09:00
Toby Zerner
e54e60a44b Merge pull request #35 from Luceos/drop-ext-dir
removed composer installer and extensions directory
2016-03-02 19:04:03 +10:30
Daniel Klabbers
eeeca56481 removed composer installer and extensions directory
added composer, dropping composer installer
2016-02-26 12:08:24 +01:00
Toby Zerner
f99aa84034 Delete build.sh
This is outdated, we don't need it anymore!
2016-02-06 15:58:54 +10:30
Toby Zerner
cfd8650ab2 Merge pull request #32 from maelsoucaze/patch-2
Update license year range to 2016
2016-01-26 11:15:13 +10:30
Maël Soucaze
db911e8263 Update license year range to 2016 2016-01-25 16:48:09 +01:00
Toby Zerner
ca4cc753cb Use new extension package names 2015-12-29 13:05:05 +10:30
Franz Liedke
78a72648b4 Update to Vaprobash 1.4.2
This lets me get rid of my patched version
2015-12-01 01:49:13 +01:00
Toby Zerner
4be4e6209f Use the latest version of composer-installer 2015-11-22 09:41:29 +10:30
Toby Zerner
18c471f015 Add beta stability flags 2015-11-03 10:19:02 +10:30
Toby Zerner
fad38c0bbd Update docs for beta 3 2015-11-03 09:58:46 +10:30
Toby Zerner
8b6697dea9 Fix Apache configuration error, blacklist some files
ref #28
2015-11-02 13:42:09 +10:30
Toby Zerner
af0850d842 Include bundled extensions in composer.json
Referencing 0.1.0 won't actually work until we tag a release, but that will be soon.
2015-11-01 16:02:30 +10:30
Franz Liedke
1b0d6c89e6 Remove unstable tobscure/json-api dependency 2015-10-31 12:59:17 +01:00
Franz Liedke
93ed335a8e Merge pull request #28 from terokorp/feature/apache2.4_htaccess
Allowing access only to index.php, admin.php, api.php and assets folder
2015-10-30 17:23:10 +01:00
Thasan
7bff4a2d80 Allowing access only to index.php, admin.php, api.php and assets folder 2015-10-30 14:36:40 +02:00
Franz Liedke
0acb8857f4 Merge pull request #27 from terokorp/feature/apache2.4_htaccess
Adding support for apache 2.4
2015-10-30 11:33:43 +01:00
Thasan
1e15cabd06 Adding support for apache 2.4 2015-10-30 02:33:25 +02:00
Toby Zerner
261ac0366f Merge pull request #26 from sparanoid/patch-1
Fix typo
2015-10-23 13:30:14 +10:30
Tunghsiao Liu
98c12db5c2 Fix typo 2015-10-23 10:24:54 +08:00
Franz Liedke
1bd84561f1 Add rules for compression and cache expiry
Refs flarum/core#514.
2015-10-22 11:37:19 +02:00
Franz Liedke
ccf979c80d Add rules for compression and cache expiry
Refs flarum/core#514.
2015-10-22 11:34:02 +02:00
Franz Liedke
ea61c22556 Ignore composer lock file for now 2015-10-19 15:02:02 +02:00
Franz Liedke
d637522ad5 Fix up Vagrant setup script 2015-10-19 15:00:41 +02:00
Franz Liedke
25cfc56a89 Clarify dev dependency for tobscure/json-api 2015-10-19 14:59:34 +02:00
Franz Liedke
f52143ac87 Vagrant: Do not create database if it already exists
Patch by @oldskool.
Closes #24.
2015-10-14 10:30:03 +02:00
Franz Liedke
accda91bf5 Clean up 2015-10-14 07:50:16 +02:00
Toby Zerner
771549c015 Add temporary file storage dir 2015-10-14 15:50:04 +10:30
Toby Zerner
7f90c99087 Clean up 2015-10-14 11:16:31 +10:30
Toby Zerner
290f1aff55 Require composer installer
This will make packages with the type flarum-extension install into the extensions directory.
2015-10-07 23:10:54 +10:30
Toby Zerner
b009ea6b1c Split up front controllers again 2015-10-07 23:09:57 +10:30
Toby Zerner
e3b14ea8ce Reorganise storage directories 2015-10-07 23:09:09 +10:30
Toby Zerner
f3d8d7b58f Merge flarum/server into core 2015-10-02 17:17:18 +09:30
Toby Zerner
3a0d8a656a New Composer-driven app skeleton
- One front controller to simplify server setup
- Extract all bootstrap code into flarum/server
- Clean up folder structure
2015-10-02 17:07:11 +09:30
Franz Liedke
c090d0ebc3 Vagrant: Fix path of aliases definition 2015-09-28 15:31:59 +02:00
Franz Liedke
1626964689 Vagrant: Remove old fix 2015-09-28 15:31:39 +02:00
Franz Liedke
83b8fcaa2b Vagrant: Fix NodeJS installation
Fixes flarum/core#547.
2015-09-28 14:14:20 +02:00
Franz Liedke
9f15204dff Vagrant: Do not install Memcached and Beanstalkd 2015-09-28 14:12:52 +02:00
Franz Liedke
472553ceaf Vagrant: More global Composer packages 2015-09-28 14:12:23 +02:00
Franz Liedke
91d6e5578b Vagrant: Fix NPM installation 2015-09-28 11:37:01 +02:00
Franz Liedke
5b5bd5ed89 Update Vaprobash 2015-09-25 14:05:19 +02:00
Franz Liedke
6c565c1d25 Add Kulga's new build script for experimentation 2015-09-25 00:39:26 +02:00
Franz Liedke
215c8e03d2 Remove unused import 2015-09-25 00:32:45 +02:00
Franz Liedke
c29323b3f4 Use new middleware for faking HTTP headers 2015-09-25 00:32:32 +02:00
Franz Liedke
5f0315d0fc Vagrant: Prefer flarum.dev server name 2015-09-23 09:24:43 +02:00
Franz Liedke
894e9a9d4d Vagrant: Remove references to Symfony (?) files 2015-09-23 09:23:25 +02:00
Franz Liedke
dee61d288c Vagrant: Rename Flarum log files 2015-09-23 09:20:10 +02:00
Toby Zerner
c3f1d8a627 Merge pull request #16 from Mecvak/patch-1
Use pipe instead of redirect for release.zip
2015-09-23 09:16:12 +09:30
Kulga
982e1bffba Use pipe instead of redirect for release.zip
Directly pipes from git archive to extract to ${release} instead of creating release.zip, changing to the ${release} directory, unzipping release.zip, then removing release.zip.
2015-09-22 16:26:04 -07:00
Toby Zerner
5f00d56f41 Merge branch 'new-scripts' 2015-09-21 08:12:50 +09:30
Franz Liedke
ccc9c1adf8 .htaccess: Allow access to flarum directory 2015-09-17 09:23:07 +02:00
Franz Liedke
efcffa795f Cleanup .htaccess 2015-09-17 09:22:26 +02:00
Franz Liedke
b1324ef703 Merge pull request #14 from Petrouchka/patch-1
Update .htaccess
2015-09-17 09:18:26 +02:00
Petrouchka
c17588f1cd Update .htaccess
# Allow access if Flarum is installed in a subdirectory and another .htaccess deny access in a higher directory
2015-09-17 09:11:42 +02:00
Toby Zerner
4c8be76285 Add generate:migration command 2015-09-17 13:42:22 +09:30
Franz Liedke
fce07ad258 Merge pull request #13 from billmn/composer-fix
Composer fix
2015-09-16 16:46:18 +02:00
Davide Bellini
4a44ceb6a8 Updated Composer Lock file
In addition of composer.json, must be updated composer.lock file to update packages with "composer install"
2015-09-16 15:39:48 +02:00
Davide Bellini
d1c7368ecb Fixed Studio version in Composer 2015-09-16 15:39:36 +02:00
Toby Zerner
1a5d27109e Merge pull request #12 from billmn/update-submodule
Updated Core Submodule
2015-09-16 22:10:49 +09:30
Davide Bellini
cb92d205ba Updated Core Submodule 2015-09-16 13:01:43 +02:00
Toby Zerner
acfdb55460 Merge branch 'master' into new-scripts 2015-09-16 19:38:03 +09:30
Toby Zerner
8b0644ee63 Remove flarum/core composer dependency
We use git + studio to include the flarum/core dependency, so it
needn't be in composer.json. (Our build script still `composer
require`s it.)
2015-09-16 19:37:50 +09:30
Toby Zerner
9539bd9934 Remove flarum/core composer dependency
We use git + studio to include the flarum/core dependency, so it
needn't be in composer.json. (Our build script still `composer
require`s it.)
2015-09-16 19:37:28 +09:30
Franz Liedke
ba3e9dfb88 Merge pull request #11 from billmn/fix-nodejs-install
Fixed Node JS install
2015-09-15 17:05:42 +02:00
Davide Bellini
c4f9c8f4b8 Fixed Node JS install
Restored original Vaprobash's script for Node JS install.
2015-09-15 16:52:49 +02:00
47 changed files with 535 additions and 3294 deletions

View File

@ -15,5 +15,5 @@ indent_size = 2
[*.{diff,md}] [*.{diff,md}]
trim_trailing_whitespace = false trim_trailing_whitespace = false
[*.php] [*.{php,json}]
indent_size = 4 indent_size = 4

2
.gitattributes vendored
View File

@ -1,3 +1,5 @@
.gitattributes export-ignore .gitattributes export-ignore
.gitignore export-ignore .gitignore export-ignore
.gitmodules export-ignore .gitmodules export-ignore
composer.lock -merge

11
.gitignore vendored
View File

@ -1,8 +1,11 @@
.env
.env.*
!.env.example
.DS_Store .DS_Store
Thumbs.db Thumbs.db
.vagrant .vagrant
config.php config.php
.idea .idea
vendor
server
core
studio.json
composer.lock

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "flarum/core"]
path = flarum/core
url = https://github.com/flarum/core.git

View File

@ -1,15 +0,0 @@
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^api(.*)$ api.php [QSA,L]
RewriteRule ^admin(.*)$ admin.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
# MultiViews can mess up our rewriting scheme
Options -MultiViews
</IfModule>

73
.nginx.conf Normal file
View File

@ -0,0 +1,73 @@
# Pass requests that don't refer directly to files in the filesystem to index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Uncomment the following lines if you are not using a `public` directory
# to prevent sensitive resources from being exposed.
# <!-- BEGIN EXPOSED RESOURCES PROTECTION -->
# location ~* ^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor) {
# deny all;
# return 404;
# }
# <!-- END EXPOSED RESOURCES PROTECTION -->
# The following directives are based on best practices from H5BP Nginx Server Configs
# https://github.com/h5bp/server-configs-nginx
# Expire rules for static content
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
add_header Cache-Control "max-age=0";
}
location ~* \.(?:rss|atom)$ {
add_header Cache-Control "max-age=3600";
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
add_header Cache-Control "max-age=2592000";
access_log off;
}
location ~* \.(?:css|js)$ {
add_header Cache-Control "max-age=31536000";
access_log off;
}
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
add_header Cache-Control "max-age=2592000";
access_log off;
}
# Gzip compression
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/javascript
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;

84
CHANGELOG.md Normal file
View File

@ -0,0 +1,84 @@
# Changelog
## [1.8.0](https://github.com/flarum/flarum/compare/v1.7.0...v1.8.0)
No changes.
## [1.7.0](https://github.com/flarum/flarum/compare/v1.6.0...v1.7.0)
No changes.
## [1.6.0](https://github.com/flarum/flarum/compare/v1.5.0...v1.6.0)
No changes.
## [1.5.0](https://github.com/flarum/flarum/compare/v1.4.0...v1.5.0)
### Changed
- Update copyright [#85]
- Link logo to official website [#84]
## [1.4.0](https://github.com/flarum/flarum/compare/v1.3.0...v1.4.0)
No changes.
## [1.3.0](https://github.com/flarum/flarum/compare/v1.2.0...v1.3.0)
No changes.
## [1.2.0](https://github.com/flarum/flarum/compare/v1.1.0...v1.2.0)
No changes.
## [1.1.0](https://github.com/flarum/flarum/compare/v1.0.0...v1.1.0)
No changes.
## [1.0.0](https://github.com/flarum/flarum/compare/v0.1.0-beta.16...v1.0.0)
### Changed
- Updated constraints of core and bundled extensions for v1.0.0 stable release (https://github.com/flarum/flarum/pull/74)
## [0.1.0-beta.16](https://github.com/flarum/flarum/compare/v0.1.0-beta.15...v0.1.0-beta.16)
### Changed
- Remove list of developers and refer to https://flarum.org/team (https://github.com/flarum/flarum/pull/71)
### Fixed
- Missing image on README.md (https://github.com/flarum/flarum/pull/72)
## [0.1.0-beta.15](https://github.com/flarum/flarum/compare/v0.1.0-beta.14...v0.1.0-beta.15)
### Added
- Nicknames added to our bundled list (https://github.com/flarum/flarum/pull/70)
## [0.1.0-beta.14](https://github.com/flarum/flarum/compare/v0.1.0-beta.13...v0.1.0-beta.14)
### Added
- Nginx rules to prevent access to sensitive files (#65)
- IIS configuration added (#66)
### Changed
- Minimum PHP requirement is now 7.2+
### Fixed
- Logo path in readme didn't resolve correctly (#68)
### Removed
- Social auth drivers removed (#67)
## [0.1.0-beta.13](https://github.com/flarum/flarum/compare/v0.1.0-beta.12...v0.1.0-beta.13)
### Changed
- Prevent access to authorisation tokens saved by composer next to the composer.json file ([adada64](https://github.com/flarum/flarum/commit/adada6456f210ea5c94a805a39d88fa613a9e4a2)).
## [0.1.0-beta.12](https://github.com/flarum/flarum/compare/v0.1.0-beta.8.1...v0.1.0-beta.12)
### Changed
- Consolidate site setup into shared file (#63).
## [0.1.0-beta.8.1](https://github.com/flarum/flarum/compare/v0.1.0-beta.8...v0.1.0-beta.8.1)
### Fixed
- Prevent caching of JSON:API responses ([e2544a2](https://github.com/flarum/flarum/commit/e2544a2a223b8ab2fb9efe00036b755b6e2cd7e7))

View File

@ -1,13 +0,0 @@
# Contributing to Flarum
Thanks for your interest in contributing to Flarum! Please read the [Contributing docs](http://flarum.org/docs/contributing) to learn how you can help.
## Contributor License Agreement
By contributing your code to Flarum you grant Toby Zerner a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, transferable license under all of Your relevant intellectual property rights (including copyright, patent, and any other rights), to use, copy, prepare derivative works of, distribute and publicly perform and display the Contributions on any licensing terms, including without limitation: (a) open source licenses like the MIT license; and (b) binary, proprietary, or commercial licenses. Except for the licenses granted herein, You reserve all right, title, and interest in and to the Contribution.
You confirm that you are able to grant us these rights. You represent that You are legally entitled to grant the above license. If Your employer has rights to intellectual property that You create, You represent that You have received permission to make the Contributions on behalf of that employer, or that Your employer has waived such rights for the Contributions.
You represent that the Contributions are Your original works of authorship, and to Your knowledge, no other person claims, or has the right to claim, any right in any invention or patent related to the Contributions. You also represent that You are not legally obligated, whether by entering into an agreement or otherwise, in any way that conflicts with the terms of this license.
Toby Zerner acknowledges that, except as explicitly described in this Agreement, any Contribution which you provide is on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.

View File

@ -1,6 +1,7 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2014-2015 Toby Zerner Copyright (c) 2019-2022 Stichting Flarum (Flarum Foundation)
Copyright (c) 2014-2019 Toby Zerner (toby.zerner@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

40
README.md Normal file
View File

@ -0,0 +1,40 @@
<p align="center">
<a href="https://flarum.org/"><img src="https://flarum.org/images/flarum.svg"></a>
</p>
<p align="center">
<a href="https://packagist.org/packages/flarum/core"><img src="https://poser.pugx.org/flarum/core/d/total.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/flarum/core"><img src="https://poser.pugx.org/flarum/core/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/flarum/core"><img src="https://poser.pugx.org/flarum/core/license.svg" alt="License"></a>
</p>
## About Flarum
**[Flarum](https://flarum.org/) is a delightfully simple discussion platform for your website.** It's fast and easy to use, with all the features you need to run a successful community. It is designed to be:
* **Fast and simple.** No clutter, no bloat, no complex dependencies. Flarum is built with PHP so its quick and easy to deploy. The interface is powered by Mithril, a performant JavaScript framework with a tiny footprint.
* **Beautiful and responsive.** This is forum software for humans. Flarum is carefully designed to be consistent and intuitive across platforms, out-of-the-box.
* **Powerful and extensible.** Customize, extend, and integrate Flarum to suit your community. Flarums architecture is amazingly flexible, with a powerful Extension API.
![screenshot](https://flarum.org/assets/img/home-screenshot.png)
## Installation
Read the **[Installation guide](https://docs.flarum.org/install)** to get started. For support, refer to the [documentation](https://docs.flarum.org/), and ask questions on the [community forum](https://discuss.flarum.org/) or [Discord chat](https://flarum.org/discord/).
## Contributing
Thank you for considering contributing to Flarum! Please read the **[Contributing guide](https://docs.flarum.org/contributing)** to learn how you can help.
This repository only holds the Flarum skeleton application. Most development happens in [flarum/core](https://github.com/flarum/core).
## Security Vulnerabilities
If you discover a security vulnerability within Flarum, please follow our [security policy](https://github.com/flarum/core/security/policy) so we can address it promptly.
## License
Flarum is open-source software licensed under the [MIT License](https://github.com/flarum/flarum/blob/master/LICENSE).

322
Vagrantfile vendored
View File

@ -1,322 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "1.3.0"
github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}"
# Server Configuration
hostname = "flarum.dev"
# Set a local private network IP address.
# See http://en.wikipedia.org/wiki/Private_network for explanation
# You can use the following IP ranges:
# 10.0.0.1 - 10.255.255.254
# 172.16.0.1 - 172.31.255.254
# 192.168.0.1 - 192.168.255.254
server_ip = "192.168.29.29"
server_cpus = "1" # Cores
server_memory = "512" # MB
server_swap = "768" # Options: false | int (MB) - Guideline: Between one or two times the server_memory
# UTC for Universal Coordinated Time
# EST for Eastern Standard Time
# US/Central for American Central
# US/Eastern for American Eastern
server_timezone = "UTC"
# Database Configuration
mysql_root_password = "root" # We'll assume user "root"
mysql_version = "5.5" # Options: 5.5 | 5.6
mysql_enable_remote = "false" # remote access enabled when true
pgsql_root_password = "root" # We'll assume user "root"
mongo_enable_remote = "false" # remote access enabled when true
# Languages and Packages
php_timezone = "UTC" # http://php.net/manual/en/timezones.php
php_version = "5.6" # Options: 5.5 | 5.6
ruby_version = "latest" # Choose what ruby version should be installed (will also be the default version)
ruby_gems = [ # List any Ruby Gems that you want to install
#"jekyll",
#"sass",
#"compass",
]
# To install HHVM instead of PHP, set this to "true"
hhvm = "false"
# PHP Options
composer_packages = [ # List any global Composer packages that you want to install
#"phpunit/phpunit:4.0.*",
#"codeception/codeception=*",
#"phpspec/phpspec:2.0.*@dev",
#"squizlabs/php_codesniffer:1.5.*",
"franzl/studio:dev-master"
]
# Default web server document root
# Symfony's public directory is assumed "web"
# Laravel's public directory is assumed "public"
public_folder = "/vagrant"
laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists
laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here
symfony_root_folder = "/vagrant/symfony" # Where to install Symfony.
nodejs_version = "latest" # By default "latest" will equal the latest stable version
nodejs_packages = [ # List any global NodeJS packages that you want to install
"bower",
"gulp"
]
sphinxsearch_version = "rel22" # rel20, rel21, rel22, beta, daily, stable
Vagrant.configure("2") do |config|
# Set server to Ubuntu 14.04
config.vm.box = "ubuntu/trusty32"
config.vm.define "Vaprobash" do |vapro|
end
if Vagrant.has_plugin?("vagrant-hostmanager")
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = false
end
# Create a hostname, don't forget to put it to the `hosts` file
# This will point to the server's default virtual host
# TO DO: Make this work with virtualhost along-side xip.io URL
config.vm.hostname = hostname
# Create a static IP
config.vm.network :private_network, ip: server_ip
# A private dhcp network is required for NFS to work (on Windows hosts, at least)
# Windows users should use the winnfsd plugin: https://github.com/GM-Alex/vagrant-winnfsd
config.vm.network :private_network, type: "dhcp"
# Use NFS for the shared folder
config.vm.synced_folder ".", "/vagrant",
id: "core",
:nfs => true,
:mount_options => ['nolock,vers=3,udp,noatime,actimeo=1']
# If using VirtualBox
config.vm.provider :virtualbox do |vb|
vb.name = "FlarumVm"
# Set server cpus
vb.customize ["modifyvm", :id, "--cpus", server_cpus]
# Set server memory
vb.customize ["modifyvm", :id, "--memory", server_memory]
# Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
# If the clock gets more than 15 minutes out of sync (due to your laptop going
# to sleep for instance, then some 3rd party services will reject requests.
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
# Prevent VMs running on Ubuntu to lose internet connection
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
# If using VMWare Fusion
config.vm.provider "vmware_fusion" do |vb, override|
override.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
# Set server memory
vb.vmx["memsize"] = server_memory
end
# If using Vagrant-Cachier
# http://fgrehm.viewdocs.io/vagrant-cachier
if Vagrant.has_plugin?("vagrant-cachier")
# Configure cached packages to be shared between instances of the same base box.
# Usage docs: http://fgrehm.viewdocs.io/vagrant-cachier/usage
config.cache.scope = :box
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
# Adding vagrant-digitalocean provider - https://github.com/smdahlen/vagrant-digitalocean
# Needs to ensure that the vagrant plugin is installed
config.vm.provider :digital_ocean do |provider, override|
override.ssh.private_key_path = '~/.ssh/id_rsa'
override.vm.box = 'digital_ocean'
override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
provider.token = 'YOUR TOKEN'
provider.image = 'Ubuntu 14.04 x64'
provider.region = 'nyc2'
provider.size = '512mb'
end
####
# Base Items
##########
# Provision Base Packages
config.vm.provision "shell", path: "#{github_url}/scripts/base.sh", args: [github_url, server_swap, server_timezone]
# optimize base box
config.vm.provision "shell", path: "#{github_url}/scripts/base_box_optimizations.sh", privileged: true
# Provision PHP
config.vm.provision "shell", path: "#{github_url}/scripts/php.sh", args: [php_timezone, hhvm, php_version]
# Enable MSSQL for PHP
# config.vm.provision "shell", path: "#{github_url}/scripts/mssql.sh"
# Provision Vim
# config.vm.provision "shell", path: "#{github_url}/scripts/vim.sh", args: github_url
# Provision Docker
# config.vm.provision "shell", path: "#{github_url}/scripts/docker.sh"
####
# Web Servers
##########
# Provision Apache Base
# config.vm.provision "shell", path: "#{github_url}/scripts/apache.sh", args: [server_ip, public_folder, hostname, github_url]
# Provision Nginx Base
config.vm.provision "shell", path: "#{github_url}/scripts/nginx.sh", args: [server_ip, public_folder, hostname, github_url]
####
# Databases
##########
# Provision MySQL
config.vm.provision "shell", path: "#{github_url}/scripts/mysql.sh", args: [mysql_root_password, mysql_version, mysql_enable_remote]
# Provision PostgreSQL
# config.vm.provision "shell", path: "#{github_url}/scripts/pgsql.sh", args: pgsql_root_password
# Provision SQLite
# config.vm.provision "shell", path: "#{github_url}/scripts/sqlite.sh"
# Provision RethinkDB
# config.vm.provision "shell", path: "#{github_url}/scripts/rethinkdb.sh", args: pgsql_root_password
# Provision Couchbase
# config.vm.provision "shell", path: "#{github_url}/scripts/couchbase.sh"
# Provision CouchDB
# config.vm.provision "shell", path: "#{github_url}/scripts/couchdb.sh"
# Provision MongoDB
# config.vm.provision "shell", path: "#{github_url}/scripts/mongodb.sh", args: mongo_enable_remote
# Provision MariaDB
# config.vm.provision "shell", path: "#{github_url}/scripts/mariadb.sh", args: [mysql_root_password, mysql_enable_remote]
####
# Search Servers
##########
# Install Elasticsearch
# config.vm.provision "shell", path: "#{github_url}/scripts/elasticsearch.sh"
# Install SphinxSearch
# config.vm.provision "shell", path: "#{github_url}/scripts/sphinxsearch.sh", args: [sphinxsearch_version]
####
# Search Server Administration (web-based)
##########
# Install ElasticHQ
# Admin for: Elasticsearch
# Works on: Apache2, Nginx
# config.vm.provision "shell", path: "#{github_url}/scripts/elastichq.sh"
####
# In-Memory Stores
##########
# Install Memcached
config.vm.provision "shell", path: "#{github_url}/scripts/memcached.sh"
# Provision Redis (without journaling and persistence)
# config.vm.provision "shell", path: "#{github_url}/scripts/redis.sh"
# Provision Redis (with journaling and persistence)
# config.vm.provision "shell", path: "#{github_url}/scripts/redis.sh", args: "persistent"
# NOTE: It is safe to run this to add persistence even if originally provisioned without persistence
####
# Utility (queue)
##########
# Install Beanstalkd
config.vm.provision "shell", path: "#{github_url}/scripts/beanstalkd.sh"
# Install Heroku Toolbelt
# config.vm.provision "shell", path: "https://toolbelt.heroku.com/install-ubuntu.sh"
# Install Supervisord
# config.vm.provision "shell", path: "#{github_url}/scripts/supervisord.sh"
# Install ØMQ
# config.vm.provision "shell", path: "#{github_url}/scripts/zeromq.sh"
####
# Additional Languages
##########
# Install Nodejs
config.vm.provision "shell", path: "https://raw.githubusercontent.com/franzliedke/Vaprobash/patch-1/scripts/nodejs.sh", privileged: false, args: nodejs_packages.unshift(nodejs_version, github_url)
# Install Ruby Version Manager (RVM)
# config.vm.provision "shell", path: "#{github_url}/scripts/rvm.sh", privileged: false, args: ruby_gems.unshift(ruby_version)
####
# Frameworks and Tooling
##########
# Provision Composer
config.vm.provision "shell", path: "#{github_url}/scripts/composer.sh", privileged: false, args: composer_packages.join(" ")
# Provision Laravel
# config.vm.provision "shell", path: "#{github_url}/scripts/laravel.sh", privileged: false, args: [server_ip, laravel_root_folder, public_folder, laravel_version]
# Provision Symfony
# config.vm.provision "shell", path: "#{github_url}/scripts/symfony.sh", privileged: false, args: [server_ip, symfony_root_folder, public_folder]
# Install Screen
# config.vm.provision "shell", path: "#{github_url}/scripts/screen.sh"
# Install Mailcatcher
# config.vm.provision "shell", path: "#{github_url}/scripts/mailcatcher.sh"
# Install git-ftp
# config.vm.provision "shell", path: "#{github_url}/scripts/git-ftp.sh", privileged: false
# Install Ansible
# config.vm.provision "shell", path: "#{github_url}/scripts/ansible.sh"
####
# Local Scripts
# Any local scripts you may want to run post-provisioning.
# Add these to the same directory as the Vagrantfile.
##########
config.vm.provision "shell", path: "./flarum/vagrant/environment.sh", privileged: false
end

View File

@ -1,46 +0,0 @@
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Core;
use Flarum\Forum\Middleware\HandleErrors;
use Franzl\Middleware\Whoops\Middleware as WhoopsMiddleware;
use Zend\Diactoros\Server;
use Zend\Stratigility\MiddlewarePipe;
$app = require __DIR__.'/flarum/bootstrap.php';
$app->register('Flarum\Admin\AdminServiceProvider');
$admin = new MiddlewarePipe();
$admin->pipe($app->make('Flarum\Api\Middleware\ReadJsonParameters'));
$admin->pipe($app->make('Flarum\Admin\Middleware\LoginWithCookieAndCheckAdmin'));
$adminPath = parse_url(Core::url('admin'), PHP_URL_PATH);
$router = $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.admin.routes')]);
$admin->pipe($adminPath, $router);
if (Core::inDebugMode()) {
$admin->pipe(new WhoopsMiddleware());
} else {
$admin->pipe(new HandleErrors(base_path('error')));
}
$server = Server::createServer(
$admin,
$_SERVER,
$_GET,
$_POST,
$_COOKIE,
$_FILES
);
$server->listen();

42
api.php
View File

@ -1,42 +0,0 @@
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Api\Middleware\JsonApiErrors;
use Flarum\Core;
use Franzl\Middleware\Whoops\Middleware as WhoopsMiddleware;
use Zend\Diactoros\Server;
use Zend\Stratigility\MiddlewarePipe;
$app = require __DIR__.'/flarum/bootstrap.php';
$app->register('Flarum\Api\ApiServiceProvider');
$api = new MiddlewarePipe();
$api->pipe($app->make('Flarum\Api\Middleware\ReadJsonParameters'));
$api->pipe($app->make('Flarum\Api\Middleware\LoginWithHeader'));
$apiPath = parse_url(Core::url('api'), PHP_URL_PATH);
$router = $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.api.routes')]);
$api->pipe($apiPath, $router);
$api->pipe(new JsonApiErrors());
$server = Server::createServer(
$api,
$_SERVER,
$_GET,
$_POST,
$_COOKIE,
$_FILES
);
$server->listen();

View File

@ -1,87 +0,0 @@
#!/usr/bin/env bash
base=${PWD}
release=/tmp/flarum-release
rm -rf ${release}
mkdir ${release}
git archive --format zip --worktree-attributes HEAD > ${release}/release.zip
cd ${release}
unzip release.zip -d ./
rm release.zip
# Delete files
rm -rf ${release}/build.sh
rm -rf ${release}/Vagrantfile
rm -rf ${release}/flarum/vagrant
rm -rf ${release}/flarum/core
rm -rf ${release}/flarum/studio.json
# Install all Composer dependencies
cd ${release}/flarum
composer require flarum/core:dev-master@dev --prefer-dist --update-no-dev
composer install --prefer-dist --optimize-autoloader --ignore-platform-reqs --no-dev
# Copy public files
cp -R ${release}/flarum/vendor/flarum/core/public/* ${release}/assets
# Install frontend dependencies
# Assumes: npm install -g gulp flarum-gulp babel-core
cd ${release}/flarum/vendor/flarum/core/js
bower install
for app in forum admin; do
cd "${release}/flarum/vendor/flarum/core/js/${app}"
npm link gulp flarum-gulp babel-core
gulp --production
rm -rf "${release}/flarum/vendor/flarum/core/js/${app}/node_modules"
done
rm -rf ${release}/flarum/vendor/flarum/core/js/bower_components
# Bundle extensions
for extension in bbcode emoji likes lock markdown mentions pusher sticky subscriptions suspend tags; do
mkdir "${release}/extensions/${extension}"
cd "${base}/extensions/${extension}"
git archive --format zip --worktree-attributes HEAD > "${release}/extensions/${extension}/release.zip"
cd "${release}/extensions/${extension}"
unzip release.zip -d ./
rm release.zip
composer install --prefer-dist --optimize-autoloader --ignore-platform-reqs --no-dev
cd "${release}/extensions/${extension}/js"
if [ -f bower.json ]; then
bower install
fi
for app in forum admin; do
cd "${release}/extensions/${extension}/js"
if [ -d $app ]; then
cd $app
if [ -f bower.json ]; then
bower install
fi
npm link gulp flarum-gulp
gulp --production
rm -rf node_modules bower_components
fi
done
rm -rf "${release}/extensions/${extension}/js/bower_components"
wait
done
# Finally, create the release archive
cd ${release}
find . -type d -exec chmod 0750 {} +
find . -type f -exec chmod 0644 {} +
chmod 0775 .
chmod -R 0775 assets flarum/storage
zip -r release.zip ./

46
composer.json Normal file
View File

@ -0,0 +1,46 @@
{
"name": "flarum/flarum",
"description": "Delightfully simple forum software.",
"type": "project",
"keywords": [
"forum",
"discussion"
],
"homepage": "https://flarum.org/",
"license": "MIT",
"authors": [
{
"name": "Flarum",
"email": "info@flarum.org",
"homepage": "https://flarum.org/team"
}
],
"support": {
"issues": "https://github.com/flarum/core/issues",
"source": "https://github.com/flarum/flarum",
"docs": "https://docs.flarum.org/"
},
"require": {
"flarum/core": "^1.8",
"flarum/approval": "*",
"flarum/bbcode": "*",
"flarum/emoji": "*",
"flarum/lang-english": "*",
"flarum/flags": "*",
"flarum/likes": "*",
"flarum/lock": "*",
"flarum/markdown": "*",
"flarum/mentions": "*",
"flarum/nicknames": "*",
"flarum/pusher": "*",
"flarum/statistics": "*",
"flarum/sticky": "*",
"flarum/subscriptions": "*",
"flarum/suspend": "*",
"flarum/tags": "*"
},
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}

14
extend.php Normal file
View File

@ -0,0 +1,14 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
use Flarum\Extend;
return [
// Register extenders here to customize your forum!
];

24
flarum Normal file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env php
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
$site = require 'site.php';
/*
|-------------------------------------------------------------------------------
| Interpret console arguments
|-------------------------------------------------------------------------------
|
| Flarum's console interprets all command-line arguments to select and then
| execute corresponding commands for certain administrative tasks.
|
*/
$server = new Flarum\Console\Server($site);
$server->listen();

1
flarum/.gitignore vendored
View File

@ -1 +0,0 @@
vendor

View File

@ -1 +0,0 @@
Deny from All

View File

@ -1,149 +0,0 @@
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Core;
use Flarum\Core\Application;
use Illuminate\Cache\FileStore;
use Illuminate\Cache\Repository;
use Illuminate\Config\Repository as ConfigRepository;
use Illuminate\Filesystem\Filesystem;
define('FLARUM_START', microtime(true));
require __DIR__ . '/vendor/autoload.php';
// franzliedke/studio currently doesn't autoload files (see issue below), so we
// will need to load them manually if we're using studio.
// https://github.com/franzliedke/studio/issues/29
if (file_exists(__DIR__ . '/core')) {
require __DIR__ . '/core/src/helpers.php';
require __DIR__ . '/core/vendor/swiftmailer/swiftmailer/lib/swift_required.php';
}
$app = new Application(realpath(__DIR__));
$app->instance('path.public', __DIR__.'/..');
Illuminate\Container\Container::setInstance($app);
if (file_exists($configFile = __DIR__.'/../config.php')) {
$app->instance('flarum.config', include $configFile);
}
date_default_timezone_set('UTC');
$app->instance('config', $config = new ConfigRepository([
'view' => [
'paths' => [
realpath(base_path('resources/views'))
],
'compiled' => realpath(storage_path().'/framework/views'),
],
'mail' => [
'driver' => 'mail',
],
'cache' => [
'default' => 'file',
'stores' => [
'file' => [
'driver' => 'file',
'path' => storage_path().'/framework/cache',
],
],
'prefix' => 'flarum',
],
'filesystems' => [
'default' => 'local',
'cloud' => 's3',
'disks' => [
'flarum-avatars' => [
'driver' => 'local',
'root' => public_path('assets/avatars')
],
],
],
]));
$logger = new Monolog\Logger($app->environment());
$logPath = $app->storagePath() . '/logs/flarum.log';
$handler = new \Monolog\Handler\StreamHandler($logPath, Monolog\Logger::DEBUG);
$handler->setFormatter(new \Monolog\Formatter\LineFormatter(null, null, true, true));
$logger->pushHandler($handler);
$app->instance('log', $logger);
$app->alias('log', 'Psr\Log\LoggerInterface');
$app->singleton('cache', function ($app) {
$store = new FileStore(new Filesystem(), storage_path('framework/cache'));
$repository = new Repository($store);
$repository->setEventDispatcher($app->make('events'));
return $repository;
});
$app->alias('cache', 'Illuminate\Contracts\Cache\Repository');
$serviceProviders = [
'Flarum\Core\DatabaseServiceProvider',
'Flarum\Core\Settings\SettingsServiceProvider',
'Flarum\Locale\LocaleServiceProvider',
'Illuminate\Bus\BusServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Events\EventServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
];
foreach ($serviceProviders as $provider) {
$app->register(new $provider($app));
}
if (Core::isInstalled()) {
$settings = $app->make('Flarum\Core\Settings\SettingsRepository');
$app->register(new \Flarum\Core\CoreServiceProvider($app));
$config->set('mail.driver', Core::config('mail_driver'));
$config->set('mail.host', Core::config('mail_host'));
$config->set('mail.port', Core::config('mail_port'));
$config->set('mail.from.address', Core::config('mail_from'));
$config->set('mail.from.name', Core::config('forum_title'));
$config->set('mail.encryption', Core::config('mail_encryption'));
$config->set('mail.username', Core::config('mail_username'));
$config->set('mail.password', Core::config('mail_password'));
// Register extensions and tell them to listen for events
$app->register(new \Flarum\Support\ExtensionsServiceProvider($app));
}
$app->boot();
// If the version stored in the database doesn't match the version of the
// code, then run the upgrade script (migrations). This is temporary - a
// proper, more secure upgrade method is planned.
if (Core::isInstalled() && $settings->get('version') !== $app::VERSION) {
$input = new \Symfony\Component\Console\Input\StringInput('');
$output = new \Symfony\Component\Console\Output\BufferedOutput;
app('Flarum\Console\UpgradeCommand')->run($input, $output);
$settings->set('version', $app::VERSION);
app('flarum.formatter')->flush();
$forum = app('Flarum\Forum\Actions\ClientAction');
$forum->flushAssets();
$admin = app('Flarum\Admin\Actions\ClientAction');
$admin->flushAssets();
}
return $app;

View File

@ -1,20 +0,0 @@
{
"name": "flarum/flarum",
"description": "The Flarum forum skeleton.",
"keywords": ["forum", "flarum"],
"license": "MIT",
"type": "project",
"require": {
"illuminate/container": "5.1.*",
"monolog/monolog": "^1.16.0",
"zendframework/zend-stratigility": "^1.1",
"franzl/whoops-middleware": "dev-master",
"flarum/core": "0.1.x@dev"
},
"require-dev": {
"franzl/studio": "1.0.x@dev"
},
"config": {
"preferred-install": "dist"
}
}

2258
flarum/composer.lock generated

File diff suppressed because it is too large Load Diff

@ -1 +0,0 @@
Subproject commit 53f7112248ff4bfb0878d7fcb4487e846a2a8c37

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>404 Not Found</h1>
<p>Looks like this page could not be found.</p>
</body>
</html>

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>500 Internal Server Error</h1>
<p>Something went wrong on our server.</p>
</body>
</html>

View File

@ -1,31 +0,0 @@
#!/usr/bin/env php
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Console\GenerateExtensionCommand;
use Flarum\Console\UpgradeCommand;
use Flarum\Core;
use Flarum\Install\Console\InstallCommand;
use Symfony\Component\Console\Application;
$app = require_once __DIR__.'/bootstrap.php';
$console = new Application('Flarum', $app::VERSION);
if (!Core::isInstalled()) {
$app->register(new \Flarum\Install\InstallServiceProvider($app));
$console->add(new InstallCommand($app));
}
$console->add(new UpgradeCommand($app));
$console->add(new GenerateExtensionCommand($app));
exit($console->run());

View File

@ -1 +0,0 @@
laravel.log

View File

@ -1,6 +0,0 @@
config.php
routes.php
compiled.php
services.json
events.scanned.php
routes.scanned.php

View File

@ -1,5 +0,0 @@
{
"packages": {
"flarum/core": "core"
}
}

View File

@ -1,69 +0,0 @@
#process & file related aliases
alias 755='sudo chmod -R 755 *'
alias 644='sudo chmod -R 644 *'
#copy stuff to clipboard
alias cl='fc -e - | pbcopy'
alias cpwd='pwd | tr -d "\n" | pbcopy'
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
#version control
alias ga='git add -A'
alias gc='git commit -m'
alias gp='git push origin $(current_branch)'
alias gpm='git push origin master'
alias gpd='git push origin develop'
alias gl='git log'
alias glp='git log --pretty=format:"%an %s"'
alias gs='git status'
alias ungit="find . -name '.git' -exec rm -rf {} \;"
#application specific
alias art='php artisan' #laravel
alias srv='php artisan serve' #laravel
alias tnk='php artisan tinker' #laravel
alias gmig='php artisan generate:migration'
alias gcon='php artisan generate:controller'
alias gmod='php artisan generate:model'
alias cc='./vendor/bin/codecept'
alias ccr='./vendor/bin/codecept run'
alias cca='./vendor/bin/codecept Acceptance'
alias ccf='./vendor/bin/codecept Functional'
alias ccu='./vendor/bin/codecept run Unit'
#function aliases
alias ghc=ghc
alias grl=grl
alias grln=grln
alias gac=gac
alias gacm=gacm
alias gacd=gacd
alias ggacm=gulpacm
alias ggac=gulpac
##functions
ghc() {
git clone git@github.com:$1/$2
}
gac() {
git add -A && git commit -m "$1"
}
gacm() {
git add -A && git commit -m "$1" && git push origin master
}
gacd() {
git add -A && git commit -m "$1" && git push origin develop
}
gulpacm() {
gulp && git add -A && git commit -m "$1" && git push origin master
}
gulpac() {
gulp && git add -A && git commit -m "$1"
}
grl() {
grep -rl "$1" *
}

View File

@ -1,96 +0,0 @@
#! /bin/bash
block="
server {
listen 80;
root /vagrant;
index index.html index.htm index.php app.php app_dev.php;
# Make site accessible from ...
server_name 192.168.29.29.xip.io flarum.dev;
access_log /var/log/nginx/vagrant.com-access.log;
error_log /var/log/nginx/vagrant.com-error.log error;
charset utf-8;
location / {
try_files \$uri \$uri/ /app.php?\$query_string /index.php?\$query_string;
}
location /api {
try_files \$uri \$uri/ /api.php?\$query_string;
}
location /admin {
try_files \$uri \$uri/ /admin.php?\$query_string;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { access_log off; log_not_found off; }
# pass the PHP scripts to php5-fpm
# Note: .php$ is susceptible to file upload attacks
# Consider using: \"location ~ ^/(index|app|app_dev|config).php(/|$) {\"
location ~ \.php$ {
try_files \$uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# With php5-fpm:
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_param LARA_ENV local; # Environment variable for Laravel
fastcgi_param HTTPS off;
}
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
}
"
echo "$block" | sudo tee /etc/nginx/sites-available/vagrant
sudo service nginx restart
### Setup NPM globals and create necessary directories ###
sudo apt-get install -y phantomjs zsh exuberant-ctags
mkdir /home/vagrant/npm
sudo chown -R vagrant:vagrant /home/vagrant
cp /vagrant/scripts/aliases ~/.aliases
### Create rc file ###
if [ -e "/home/vagrant/.zshrc" ]
then
echo "source ~/.aliases" >> ~/.zshrc
else
echo "source ~/.aliases" >> ~/.bashrc
fi
mysql -u root -proot -e 'create database flarum'
### Setup flarum/core and install dependencies ###
cd /vagrant/flarum/core
git pull
composer install --prefer-dist
cd /vagrant/flarum
composer install --prefer-dist
composer dump-autoload
cd /vagrant/flarum/core/js
bower install
cd /vagrant/flarum/core/js/forum
npm install
gulp
cd /vagrant/flarum/core/js/admin
npm install
gulp
cd /vagrant/flarum
php flarum install --defaults

View File

@ -1,60 +0,0 @@
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Core;
use Flarum\Forum\Middleware\HandleErrors;
use Franzl\Middleware\Whoops\Middleware as WhoopsMiddleware;
use Zend\Diactoros\Server;
use Zend\Stratigility\MiddlewarePipe;
$app = require __DIR__.'/flarum/bootstrap.php';
// If Flarum's configuration exists, then we can assume that installation has
// been completed. We will set up a middleware pipe to route the request through
// to one of the main forum actions.
if (Core::isInstalled()) {
$app->register('Flarum\Forum\ForumServiceProvider');
$flarum = new MiddlewarePipe();
$flarum->pipe($app->make('Flarum\Forum\Middleware\LoginWithCookie'));
$flarum->pipe($app->make('Flarum\Api\Middleware\ReadJsonParameters'));
$basePath = parse_url(Core::url(), PHP_URL_PATH);
$router = $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.forum.routes')]);
$flarum->pipe($basePath, $router);
if (Core::inDebugMode()) {
$flarum->pipe(new WhoopsMiddleware());
} else {
$flarum->pipe(new HandleErrors(base_path('error')));
}
} else {
$app->register('Flarum\Install\InstallServiceProvider');
$flarum = new MiddlewarePipe();
$basePath = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$router = $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.install.routes')]);
$flarum->pipe($basePath, $router);
$flarum->pipe(new WhoopsMiddleware());
}
$server = Server::createServer(
$flarum,
$_SERVER,
$_GET,
$_POST,
$_COOKIE,
$_FILES
);
$server->listen();

133
public/.htaccess Normal file
View File

@ -0,0 +1,133 @@
<IfModule mod_rewrite.c>
RewriteEngine on
# Ensure the Authorization HTTP header is available to PHP
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Uncomment the following lines if you are not using a `public` directory
# to prevent sensitive resources from being exposed.
# <!-- BEGIN EXPOSED RESOURCES PROTECTION -->
# RewriteRule /\.git / [F,L]
# RewriteRule ^auth\.json$ / [F,L]
# RewriteRule ^composer\.(lock|json)$ / [F,L]
# RewriteRule ^config.php$ / [F,L]
# RewriteRule ^flarum$ / [F,L]
# RewriteRule ^storage/(.*)?$ / [F,L]
# RewriteRule ^vendor/(.*)?$ / [F,L]
# <!-- END EXPOSED RESOURCES PROTECTION -->
# Pass requests that don't refer directly to files in the filesystem to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
</IfModule>
# Disable directory listings
Options -Indexes
# MultiViews can mess up our rewriting scheme
Options -MultiViews
# The following directives are based on best practices from H5BP Apache Server Configs
# https://github.com/h5bp/server-configs-apache
# Expire rules for static content
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rdf+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/ld+json "access plus 0 seconds"
ExpiresByType application/schema+json "access plus 0 seconds"
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
ExpiresByType application/vnd.api+json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/calendar "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType application/manifest+json "access plus 1 week"
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType text/markdown "access plus 0 seconds"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/bmp "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
ExpiresByType application/wasm "access plus 1 year"
ExpiresByType font/collection "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType font/eot "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType font/otf "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/ttf "access plus 1 month"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 month"
ExpiresByType font/woff2 "access plus 1 month"
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
</IfModule>
# Gzip compression
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE "application/atom+xml" \
"application/javascript" \
"application/json" \
"application/ld+json" \
"application/manifest+json" \
"application/rdf+xml" \
"application/rss+xml" \
"application/schema+json" \
"application/vnd.geo+json" \
"application/vnd.ms-fontobject" \
"application/wasm" \
"application/x-font-ttf" \
"application/x-javascript" \
"application/x-web-app-manifest+json" \
"application/xhtml+xml" \
"application/xml" \
"font/collection" \
"font/eot" \
"font/opentype" \
"font/otf" \
"font/ttf" \
"image/bmp" \
"image/svg+xml" \
"image/vnd.microsoft.icon" \
"image/x-icon" \
"text/cache-manifest" \
"text/calendar" \
"text/css" \
"text/html" \
"text/javascript" \
"text/plain" \
"text/markdown" \
"text/vcard" \
"text/vnd.rim.location.xloc" \
"text/vtt" \
"text/x-component" \
"text/x-cross-domain-policy" \
"text/xml"
</IfModule>
</IfModule>
# Fix for https://httpoxy.org vulnerability
<IfModule mod_headers.c>
RequestHeader unset Proxy
</IfModule>

26
public/index.php Normal file
View File

@ -0,0 +1,26 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
$site = require '../site.php';
/*
|-------------------------------------------------------------------------------
| Accept incoming HTTP requests
|-------------------------------------------------------------------------------
|
| Every HTTP request pointed to the web server that cannot be served by simply
| responding with one of the files in the "public" directory will be sent to
| this file. Now is the time to boot up Flarum's internal HTTP server, which
| will try its best to interpret the request and return the appropriate
| response, which could be a JSON document (for API responses) or a lot of HTML.
|
*/
$server = new Flarum\Http\Server($site);
$server->listen();

29
public/web.config Normal file
View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Index.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<!-- Changed `enabled=` to true in the rule below if you are not using the `public` directory to
prevent sensitive resources from being exposed -->
<rule name="Disallow sensitive directories" enabled="false" stopProcessing="true">
<match url="^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor)" ignoreCase="false" />
<action type="CustomResponse" url="/" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="Handle index.php re-write" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

View File

@ -1,36 +0,0 @@
![Flarum](http://flarum.org/img/logo.png)
**[Flarum](http://flarum.org) is free, open-source forum software with a focus on simplicity.** You can use Flarum to easily set up a discussion forum for your website.
[Features](http://flarum.org/features) -
[Download](http://flarum.org/download) -
[Documentation](http://flarum.org/docs) -
[Community](http://discuss.flarum.org) -
[Gitter Chat](https://gitter.im/flarum/flarum) -
[Twitter](http://twitter.com/flarum) -
[Contact](mailto:toby@flarum.org) -
[Donate](http://flarum.org/donate)
![screenshot](http://flarum.org/img/screenshot.png)
## Goals
Flarum is the combined successor of [esoTalk](http://esotalk.org) and [FluxBB](http://fluxbb.org). It aims to be:
- **Fast and simple.** No clutter, no bloat, no complex dependencies. Flarum is built with PHP so it's quick and easy to deploy. The interface is powered by Mithril, a performant JavaScript framework with a tiny footprint.
- **Beautiful and responsive.** This is forum software for humans. Flarum is carefully designed to be consistent and intuitive across platforms, out-of-the-box.
- **Powerful and extensible.** Customize, extend, and integrate Flarum to suit your community. Flarum's architecture is amazingly flexible, prioritizing comprehensive APIs and great [documentation](http://flarum.org/docs).
- **Free and open.** Flarum is released under the [MIT license](https://github.com/flarum/flarum/blob/master/LICENSE).
## Installation
> **Flarum is currently in beta and should not be used in production.** It is being developed openly on GitHub. Check out the [Roadmap](http://flarum.org/roadmap) to follow along with our progress.
To give Flarum a spin, go to the [Download](http://flarum.org/download) page. You'll need a server with **PHP 5.5+** and **MySQL 5.5+**.
If you want to hack on Flarum, you'll need to set up a development environment. Read how in the [Contributing docs](http://flarum.org/docs/contributing)!
## Core Team
- Toby Zerner ([GitHub](http://github.com/tobscure), [Twitter](http://twitter.com/tobscure))
- Franz Liedke ([GitHub](http://github.com/franzliedke), [Twitter](http://twitter.com/franzliedke))

50
site.php Normal file
View File

@ -0,0 +1,50 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
/*
|-------------------------------------------------------------------------------
| Load the autoloader
|-------------------------------------------------------------------------------
|
| First, let's include the autoloader, which is generated automatically by
| Composer (PHP's package manager) after installing our dependencies.
| From now on, all classes in our dependencies will be usable without
| explicitly loading any files.
|
*/
require __DIR__.'/vendor/autoload.php';
/*
|-------------------------------------------------------------------------------
| Configure the site
|-------------------------------------------------------------------------------
|
| A Flarum site represents your local installation of Flarum. It can be
| configured with a bunch of paths:
|
| - The *base path* is Flarum's root directory and contains important files
| such as config.php and extend.php.
| - The *public path* is the directory that serves as document root for the
| web server. Files in this place are accessible to the public internet.
| This is where assets such as JavaScript files or CSS stylesheets need to
| be stored in a default install.
| - The *storage path* is a place for Flarum to store files it generates during
| runtime. This could be caches, session data or other temporary files.
|
| The fully configured site instance is returned to the including script, which
| then uses it to boot up the Flarum application and e.g. accept web requests.
|
*/
return Flarum\Foundation\Site::fromPaths([
'base' => __DIR__,
'public' => __DIR__.'/public',
'storage' => __DIR__.'/storage',
]);

2
storage/locale/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/views/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore