Compare commits

...

92 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
27 changed files with 501 additions and 802 deletions

View File

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

2
.gitattributes vendored
View File

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

View File

@ -1,92 +0,0 @@
# Allow access if Flarum is installed in a subdirectory,
# but another .htaccess in a higher directory denies access.
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Allow from all
</IfModule>
# Fix for https://httpoxy.org vulnerability
<IfModule mod_headers.c>
RequestHeader unset Proxy
</IfModule>
<IfModule mod_security.c>
SecRule &REQUEST_HEADERS:Proxy "@gt 0" "id:1000005,log,deny,msg:'httpoxy denied'"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^vendor/(.*)?$ / [F,L]
RewriteRule ^storage/(.*)?$ / [F,L]
RewriteRule ^config.php$ / [F,L]
RewriteRule /\.git / [F,L]
RewriteRule ^composer\.(lock|json)$ / [F,L]
RewriteRule ^api(.*)$ api.php [QSA,L]
RewriteRule ^admin(.*)$ admin.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !^assets index.php [QSA,L]
# MultiViews can mess up our rewriting scheme
Options -MultiViews
# Autoindex will list all assets files which is not so good
Options -Indexes
</IfModule>
<IfModule mod_deflate.c>
# Compress all output labeled with one of the following MIME-types
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/xml
</IfModule>
</IfModule>
# Configure cache expiry for different file types
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 second"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
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-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/font-woff2 "access plus 1 month"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
</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,67 +0,0 @@
# Contributing to Flarum
Howdy! We're really excited that you are interested in contributing to Flarum. Before submitting your contribution, please take a moment and read through the following guidelines.
## Reporting Bugs
- Before opening an issue, debug your problem by following [these instructions](http://flarum.org/docs/contributing). Only open an issue if you are confident it is a bug with Flarum, not with your own setup.
- All issues should be reported on the [flarum/core](https://github.com/flarum/core/issues) repository. Issues pertaining to a specific extension should include the extension name in their title, e.g. `[Tags] Issue title`.
- Try to search for your issue it may have already been answered or even fixed in the development branch.
- Check if the issue is reproducible with the latest version of Flarum. If you are using a pre-release or development version, please indicate the specific version you are using.
- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "needs verification" receives no further input from the issue author for more than 5 days, it will be closed.
### Security Vulnerabilities
If you discover a security vulnerability within Flarum, please send an email to [security@flarum.org](mailto:security@flarum.org).
## Pull Request Guidelines
- Read the [Contributor License Agreement](#contributor-license-agreement).
- Checkout a topic branch from `master` and merge back against `master`.
- Do NOT checkin the JavaScript `dist` files in commits.
- [Squash the commits](http://davidwalsh.name/squash-commits-git) if there are too many small ones.
- Follow the [code style](#code-style).
## Code Style
- PHP: [PSR-2 coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), [PHPDoc](http://www.phpdoc.org/docs/latest/index.html)
- JavaScript: [Airbnb Style Guide](https://github.com/airbnb/javascript), [ESDoc](https://esdoc.org/tags.html)
- When in doubt, read the source code.
## Development Setup
[flarum/flarum](https://github.com/flarum/flarum) is a "skeleton" application which uses Composer to download [flarum/core](https://github.com/flarum/core) and a [bunch of extensions](https://github.com/flarum). In order to work on these, you will need to change their versions to `dev-master` in `composer.json` and install them from source:
```bash
$ composer update --prefer-source
```
Flarum's front-end code is written in ES6 and transpiled into JavaScript. The compiled JavaScript is only committed when we tag a release; during development you will need to do it yourself. To recompile the JavaScript you will need [Node.js](http://nodejs.org).
```bash
$ npm install -g gulp
$ cd vendor/flarum/core
$ ./scripts/compile.sh
```
Check out the [Roadmap](https://github.com/flarum/core/issues/74) for an overview of what needs to be done. See the [Good For New Contributors](https://github.com/flarum/core/labels/Good%20for%20New%20Contributors) label for a list of issues that should be relatively easy to get started with.
## Contributor License Agreement
By contributing your code to Flarum you grant Toby Zerner a non-exclusive, irrevocable, worldwide, royalty-free, sublicensable, 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)
Copyright (c) 2014-2017 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
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,2 +0,0 @@
forum: cd vendor/flarum/core/js/forum && gulp watch
admin: cd vendor/flarum/core/js/admin && gulp watch

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.4.2"
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 = "7.1" # Options: 5.6 | 7.0 | 7.1
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', inline: "sudo add-apt-repository -y ppa:ondrej/php && sudo apt-get update && sudo apt-get -y install php#{php_version}-fpm php#{php_version}-curl php#{php_version}-mbstring php#{php_version}-xml php#{php_version}-mysql php#{php_version}-gd", run: "once"
# 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: "#{github_url}/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", inline: "/bin/bash /vagrant/scripts/environment.sh --php-version #{php_version}", run: "once"
end

View File

@ -1,16 +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.
*/
require 'vendor/autoload.php';
$server = new Flarum\Admin\Server(__DIR__);
$server->listen();

16
api.php
View File

@ -1,16 +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.
*/
require 'vendor/autoload.php';
$server = new Flarum\Api\Server(__DIR__);
$server->listen();

View File

@ -2,51 +2,45 @@
"name": "flarum/flarum",
"description": "Delightfully simple forum software.",
"type": "project",
"keywords": ["forum", "discussion"],
"homepage": "http://flarum.org",
"keywords": [
"forum",
"discussion"
],
"homepage": "https://flarum.org/",
"license": "MIT",
"authors": [
{
"name": "Toby Zerner",
"email": "toby.zerner@gmail.com"
},
{
"name": "Franz Liedke",
"email": "franz@develophp.org"
"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": "http://flarum.org/docs"
"docs": "https://docs.flarum.org/"
},
"require": {
"flarum/core": "^0.1.0",
"flarum/flarum-ext-akismet": "^0.1.0",
"flarum/flarum-ext-approval": "^0.1.0",
"flarum/flarum-ext-auth-facebook": "^0.1.0",
"flarum/flarum-ext-auth-github": "^0.1.0",
"flarum/flarum-ext-auth-twitter": "^0.1.0",
"flarum/flarum-ext-bbcode": "^0.1.0",
"flarum/flarum-ext-emoji": "^0.1.0",
"flarum/flarum-ext-english": "^0.1.0",
"flarum/flarum-ext-flags": "^0.1.0",
"flarum/flarum-ext-likes": "^0.1.0",
"flarum/flarum-ext-lock": "^0.1.0",
"flarum/flarum-ext-markdown": "^0.1.0",
"flarum/flarum-ext-mentions": "^0.1.0",
"flarum/flarum-ext-pusher": "^0.1.0",
"flarum/flarum-ext-sticky": "^0.1.0",
"flarum/flarum-ext-subscriptions": "^0.1.0",
"flarum/flarum-ext-suspend": "^0.1.0",
"flarum/flarum-ext-tags": "^0.1.0"
},
"require-dev": {
"franzl/studio": "^0.11.0"
"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"
},
"minimum-stability": "beta",
"prefer-stable": true
"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!
];

22
flarum
View File

@ -1,18 +1,24 @@
#!/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.
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
define('FLARUM_START', microtime(true));
$site = require 'site.php';
require 'vendor/autoload.php';
$server = new Flarum\Console\Server(__DIR__);
/*
|-------------------------------------------------------------------------------
| 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();

View File

@ -1,16 +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.
*/
require 'vendor/autoload.php';
$server = new Flarum\Forum\Server(__DIR__);
$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,33 +0,0 @@
![Flarum](http://flarum.org/img/logo.png)
**[Flarum](http://flarum.org) is free, open-source forum software** built with PHP and [Mithril.js](http://mithril.js.org). It is:
* **Simple**, with a responsive UI that is optimized for touch devices
* **Fast**, with a total JS payload size of ~130 KB gzipped
* **Extensible**, so you can tailor it to your use-case
![screenshot](http://flarum.org/img/screenshot.png)
## 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.
You must have SSH access to a server with **PHP 5.5+** and **MySQL 5.5+**, and install [Composer](https://getcomposer.org).
```
composer create-project flarum/flarum . --stability=beta
```
Read the [Installation Guide](http://flarum.org/docs/installation) for more information.
## Support
Refer to the [FAQ](http://flarum.org/docs/faq), [Documentation](http://flarum.org/docs), and ask questions on the [Community Forum](http://discuss.flarum.org) or [Gitter Chat](https://gitter.im/flarum/flarum).
## Contributing
Flarum is open-source and we would love your help building it! Please read the [Contributing Guide](https://github.com/flarum/flarum/blob/master/CONTRIBUTING.md) to learn how you can help.
## License
Copyright (c) 2015 Toby Zerner. Code released under the [MIT License](https://github.com/flarum/flarum/blob/master/LICENSE).

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,124 +0,0 @@
#! /bin/bash
# Defaults:
PHP_VERSION=5.6
while [[ $# -gt 1 ]]; do
key="$1"
case "$key" in
--php-version)
PHP_VERSION="$2"
shift # past argument
;;
*)
# unknown option
;;
esac
shift # past argument or value
done
block="
server {
listen 80;
root /vagrant;
index index.html index.htm index.php;
# Make site accessible from ...
server_name flarum.dev 192.168.29.29.xip.io;
access_log /var/log/nginx/flarum-access.log;
error_log /var/log/nginx/flarum-error.log error;
charset utf-8;
location / {
try_files \$uri \$uri/ /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 php-fpm:
fastcgi_pass unix:/run/php/php${PHP_VERSION}-fpm.sock;
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 HTTP_PROXY \"\"; # Fix for https://httpoxy.org/ vulnerability
fastcgi_param HTTPS off;
}
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
location ~* \.html$ {
expires -1;
}
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 1M;
add_header Pragma public;
add_header Cache-Control \"public, must-revalidate, proxy-revalidate\";
}
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types application/atom+xml \
application/javascript \
application/json \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/xml;
gzip_buffers 16 8k;
gzip_disable \"MSIE [1-6]\.(?!.*SV1)\";
}
"
echo "$block" | sudo tee /etc/nginx/sites-available/vagrant
sudo service nginx restart
### Setup NPM globals and create necessary directories ###
sudo chown -R vagrant:vagrant /home/vagrant
cp /vagrant/scripts/aliases ~/.aliases
### Create rc file ###
echo "source ~/.aliases" >> ~/.bashrc
mysql -u root -proot -e 'create database if not exists flarum'
cd /vagrant
composer install --prefer-dist
composer dump-autoload
php flarum install --defaults

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/sessions/.gitignore vendored Normal file
View File

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