From a3025ca5bb4113ec069770d9b24659a3e229ec9d Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Fix whitespace --- Gruntfile.js | 6 +- moe/includes/api.php | 1 + moe/index.php | 1 + moe/panel/index.php | 119 +++++++++++++++-------------- pages/ca.swig | 6 +- pages/check_fileapica.swig | 2 +- pages/check_scriptca.swig | 2 +- pages/faq.swig | 24 +++--- pages/index.swig | 8 +- pages/layout.swig | 24 +++--- pages/layoutca.swig | 24 +++--- pages/nav.swig | 16 ++-- pages/nojs.swig | 8 +- pages/other.swig | 7 +- pages/tools.swig | 153 ++++++++++++++++++++++++-------------- static/classes/Response.class.php | 8 +- 16 files changed, 223 insertions(+), 186 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 70cbfbe..96fbab2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,9 +18,9 @@ module.exports = function (grunt) { 'index.swig', 'faq.swig', 'tools.swig', - 'other.swig', - 'nojs.swig', - 'ca.swig' + 'other.swig', + 'nojs.swig', + 'ca.swig' ], siteUrl: 'https://pantsu.cat/', production: false, diff --git a/moe/includes/api.php b/moe/includes/api.php index b85cbbf..634cd74 100644 --- a/moe/includes/api.php +++ b/moe/includes/api.php @@ -1,4 +1,5 @@ - - Moe Panel - - - - - - - - - - - - - -
- - - - - -
- - -
-
-

- -
- - - -
-
- - - -
- - + + Moe Panel + + + + + + + + + + + + +
+ + + +
+ +
+
+

+ +

+ +
+ + + +
+
+ + +
+ diff --git a/pages/ca.swig b/pages/ca.swig index 68c7b97..a15a7d5 100644 --- a/pages/ca.swig +++ b/pages/ca.swig @@ -2,9 +2,9 @@ {% block body %}
-
-

Roba Interior~

-
+
+

Roba Interior~

+

Màxima grandària de pujada {{max_upload_size}}MiB, read the FAQ

{% include "check_scriptca.swig" %} {% include "check_fileapica.swig" %} diff --git a/pages/check_fileapica.swig b/pages/check_fileapica.swig index a3e8120..1797a9b 100644 --- a/pages/check_fileapica.swig +++ b/pages/check_fileapica.swig @@ -1,3 +1,3 @@

- El seu navegador és una merda. Instal l'última Firefox o Botnet i tornar <3 + El seu navegador és una merda. Instal l'última Firefox o Botnet i tornar <3

diff --git a/pages/check_scriptca.swig b/pages/check_scriptca.swig index 0a5f0ea..3c8b01a 100644 --- a/pages/check_scriptca.swig +++ b/pages/check_scriptca.swig @@ -1,3 +1,3 @@ diff --git a/pages/faq.swig b/pages/faq.swig index 320f4b4..dca3c80 100644 --- a/pages/faq.swig +++ b/pages/faq.swig @@ -3,20 +3,20 @@ {% block title %}FAQ{% endblock %} {% block body %}
-

FAQ

-{% include "nav.swig" %} +

FAQ

+ {% include "nav.swig" %}
{% include "banners.swig" %} {% endblock %} diff --git a/pages/index.swig b/pages/index.swig index 8a1635e..3335661 100644 --- a/pages/index.swig +++ b/pages/index.swig @@ -2,10 +2,10 @@ {% block body %}
-
-

Pantsu~

-

Ropa Interior~

-
+
+

Pantsu~

+

Ropa Interior~

+

Max upload size is {{max_upload_size}}MiB, read the FAQ

{% include "check_script.swig" %} {% include "check_fileapi.swig" %} diff --git a/pages/layout.swig b/pages/layout.swig index 7daaf0b..d887a3e 100644 --- a/pages/layout.swig +++ b/pages/layout.swig @@ -1,15 +1,15 @@ - - - - Pantsu.cat · {% block title %}Kawaii File Hosting{% endblock %} - - - - -
- {% block body %}What the fuck are you doing here, baka?{% endblock %} -
- + + + + Pantsu.cat · {% block title %}Kawaii File Hosting{% endblock %} + + + + +
+ {% block body %}What the fuck are you doing here, baka?{% endblock %} +
+ diff --git a/pages/layoutca.swig b/pages/layoutca.swig index 92f9824..54c54d6 100644 --- a/pages/layoutca.swig +++ b/pages/layoutca.swig @@ -1,15 +1,15 @@ - - - - Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} - - - - -
- {% block body %}What the fuck are you doing here, baka?{% endblock %} -
- + + + + Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} + + + + +
+ {% block body %}What the fuck are you doing here, baka?{% endblock %} +
+ diff --git a/pages/nav.swig b/pages/nav.swig index 5864c43..cd2f43d 100644 --- a/pages/nav.swig +++ b/pages/nav.swig @@ -1,11 +1,11 @@ diff --git a/pages/nojs.swig b/pages/nojs.swig index c526688..91d1105 100644 --- a/pages/nojs.swig +++ b/pages/nojs.swig @@ -2,10 +2,10 @@ {% block body %}
-
-

Pantsu~

-

Ropa Interior~

-
+
+

Pantsu~

+

Ropa Interior~

+

Max upload size is {{max_upload_size}}MiB, read the FAQ

{% include "check_fileapi.swig" %} {% include "upload_form_nojs.swig" %} diff --git a/pages/other.swig b/pages/other.swig index 2efb119..4071fb5 100644 --- a/pages/other.swig +++ b/pages/other.swig @@ -3,12 +3,11 @@ {% block title %}FAQ{% endblock %} {% block body %}
-

Other Services

+

Other Services

{% include "nav.swig" %} {% endblock %} - diff --git a/pages/tools.swig b/pages/tools.swig index f82e8e4..2632f5f 100644 --- a/pages/tools.swig +++ b/pages/tools.swig @@ -6,83 +6,122 @@

Pomf Tools

{% include "nav.swig" %}
-

Pomfit

-
Download
-
https://github.com/pantsucat/pomfit
-
Contact
+
+

Pomfit

+
+
Download
+
https://github.com/pantsucat/pomfit
+
Contact
https://twitter.com/Senketsu_Dev
-
-

Bash Pomf Uploader

-
Download
+
+
+
+

Bash Pomf Uploader

+
+
Download
https://gist.github.com/pantsucat/b46320a4103afda4e0ff
-
Contact
+
Contact
https://twitter.com/AnonymousLink
-
-

Simple Bash Pomf Uploader

-
Download
+
+
+
+

Simple Bash Pomf Uploader

+
+
Download
https://gist.github.com/pantsucat/da46d56e22063704604a
-
Contact
+
Contact
https://twitter.com/dev_console
-
-

limf

-
Download
-
https://github.com/lich/limf
-
Contact
-
http://lich.github.io//
-
-

1339secure

-
Download
-
https://github.com/pantsucat/1339secure
-
Contact
-
adriankoshcha@teknik.io
-
-

Python Pomf Uploader

-
Download
+
+
+
+

limf

+
+
Download
+
https://github.com/lich/limf
+
Contact
+
http://lich.github.io//
+
+
+
+

1339secure

+
+
Download
+
https://github.com/pantsucat/1339secure
+
Contact
+
adriankoshcha@teknik.io
+
+
+
+

Python Pomf Uploader

+
+
Download
https://github.com/pantsucat/POMF
-
Contact
+
Contact
https://twitter.com/FuzzyPomf
-
-

Sharex

-
Download
+
+
+
+

Sharex

+
+
Download
https://code.google.com/p/sharex/
-
Settings
+
Settings
https://p.pantsu.cat/view/raw/b79ea507
-
-

Scotty

-
Download
+
+
+
+

Scotty

+
+
Download
https://github.com/pantsucat/Scotty
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

Gyazo Client (Puush like client)

-
Download
+
+
+
+

Gyazo Client (Puush like client)

+
+
Download
https://github.com/pantsucat/gyazowin
-
Contact
+
Contact
https://twitter.com/4vailable
-
-

Bash Screenshot Uploader

-
Download
+
+
+
+

Bash Screenshot Uploader

+
+
Download
https://gist.github.com/aki--aki/6258422
-
Contact
+
Contact
https://twitter.com/__akiaki
-
-

Pomf.se Windows Client Dead

-
Download
+
+
+
+

Pomf.se Windows Client Dead

+
+
Download
http://mavanmanen.nl/index.php?page=projects
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

ScrotUP Dead

-
Download
+
+
+
+

ScrotUP Dead

+
+
Download
https://github.com/mavanmanen/ScrotUP
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

Perl Pomf Uploaer Dead

-
Download
+
+
+
+

Perl Pomf Uploaer Dead

+
+
Download
http://p.pomf.se/624
-
Contact
+
Contact
Kori
-
+
+
{% endblock %} diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 951e39e..b7e4c5d 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -17,7 +17,7 @@ class Response $this->type = $response_type; break; - case 'html': + case 'html': header('Content-Type: text/html;charset=utf-8'); $this->type = 'html'; break; @@ -118,7 +118,7 @@ class Response $result .= $file['url']."\n"; } - return $result; + return $result; } private static function html_error($code, $description) @@ -129,10 +129,10 @@ class Response private static function html_success($files) { foreach ($files as $file) { - $result .= "".$file['url']."
"; + $result .= ''.$file['url'].'
'; } - return $result; + return $result; } private static function json_error($code, $description) -- cgit v1.2.3 From 2a0bc6e20ce1e348962301eadb055f1d5971e1de Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Fix README.md outline --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++--------------------- wub.patch | 18 ++++++++++++++++ 2 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 wub.patch diff --git a/README.md b/README.md index 4cf35fe..213bf90 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,69 @@ # Pomf -Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to work with Apache 2.4 -and newer PHP versions. Should work with any other PDO-compatible database. -# Install +Pomf is a simple file uploading and sharing platform. + +Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to +work with Apache 2.4 and newer PHP versions. Should work with any other +PDO-compatible database. + +## Install + For the purposes of this guide, we won't cover setting up Nginx, PHP, MySQL, -Node, or NPM. So we'll just assume you already have them all running well. +Node, or NPM. So we'll just assume you already have them all running well. + +### Compiling -## Compiling The assets are minified and combined using [Grunt](http://gruntjs.com/). -Assuming you already have Node and NPM working, compilation is easy: -``` -$ npm install -g grunt-cli -$ git clone git://github.com/pantsucat/pomf.git -$ cd pomf/ -$ npm install -$ grunt -``` -After this, the pomf site is now compressed and set up inside `dist/`. +Assuming you already have Node and NPM working, compilation is easy. Use the +following shell code: -### Apache -If you are running Apache and want to compress your output when serving files, add to your `.htaccess` file: ``` -AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json +npm install -g grunt-cli +git clone git://github.com/pantsucat/pomf.git +cd pomf/ +npm install +grunt ``` -Remember to enable `deflate_module` and `filter_module` modules in your Apache configuration file. + +After this, the pomf site is now compressed and set up inside `dist/`. ## Configuring -The majority of settings are in `static/includes/settings.inc.php`. Read the + +The majority of settings are in `static/includes/settings.inc.php`. Read the comments in that file for more information. -For file size configuration, there is no server-side verification: we assume -that PHP and Nginx provide ample protection in this department. There is, +For file size configuration, there is no server-side verification: we assume +that PHP and Nginx provide ample protection in this department. There is, however, client-side configuration for max size, the `data-max-size` attribute on the file input in `pages/upload_form.swig`. -Make sure to disable PHP from being executed on the file download domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious .php file and execute it on your server. +Make sure to disable PHP from being executed on the file download +domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious +.php file and execute it on your server. + +### Apache + +If you are running Apache and want to compress your output when serving files, +add to your `.htaccess` file: + +``` +AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json +``` + +Remember to enable `deflate_module` and `filter_module` modules in your Apache +configuration file. ## Todo * Clean up Moe code, a lot.. * API keys? -# Contact -I can be contacted via hostmaster@pantsu.cat. +## License + +Pomf is free software, and is released under the terms of the MIT (Expat) +license. See LICENSE. + +## Contact + +The maintainer can be contacted via hostmaster@pantsu.cat. diff --git a/wub.patch b/wub.patch new file mode 100644 index 0000000..7f0e620 --- /dev/null +++ b/wub.patch @@ -0,0 +1,18 @@ +diff --git a/README.md b/README.md +index 646bea3..213bf90 100644 +--- a/README.md ++++ b/README.md +@@ -30,11 +30,11 @@ After this, the pomf site is now compressed and set up inside `dist/`. + + ## Configuring + +-The majority of settings are in `static/includes/settings.inc.php`. Read the ++The majority of settings are in `static/includes/settings.inc.php`. Read the + comments in that file for more information. + + For file size configuration, there is no server-side verification: we assume +-that PHP and Nginx provide ample protection in this department. There is, ++that PHP and Nginx provide ample protection in this department. There is, + however, client-side configuration for max size, the `data-max-size` attribute + on the file input in `pages/upload_form.swig`. + -- cgit v1.2.3