diff --git a/pastebin/README b/pastebin/README new file mode 100644 index 0000000..f8c2832 --- /dev/null +++ b/pastebin/README @@ -0,0 +1,30 @@ +This folder contains the code for KXStudio's Pastebin. + +It's shared under the Public Domain. +The full license is available at: +http://creativecommons.org/licenses/publicdomain/ + + +To use it, download GeSHi first, and unpack the geshi folder in here. + +The file structure must be like this: + + geshi/ + - repo/ + + repo/_error + - .htaccess + - download.php + - geshi.php + - index.php + - kxstudio.css + +NOTE: + -> htaccess has been renamed as usual + -> repo directory must have r+w permissions (we'll use it to store the files) + + +To make this work, you'll need to: + +edit index/download.php and set $base_dir and $server_dir properly. +edit index.php and set the server root path if needed (ie, href="/paste/kxstudio.css" -> href="/home/http/public_html/paste/kxstudio.css") +^ change everything that starts with '/paste'. + diff --git a/pastebin/download.php b/pastebin/download.php new file mode 100644 index 0000000..fcff1b7 --- /dev/null +++ b/pastebin/download.php @@ -0,0 +1,38 @@ + diff --git a/pastebin/htaccess b/pastebin/htaccess new file mode 100644 index 0000000..7afa726 --- /dev/null +++ b/pastebin/htaccess @@ -0,0 +1,6 @@ +Options -Indexes + +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ /paste/index.php?id=$1 [L,QSA] diff --git a/pastebin/index.php b/pastebin/index.php new file mode 100644 index 0000000..875b9c9 --- /dev/null +++ b/pastebin/index.php @@ -0,0 +1,230 @@ +"; + + $fp = fopen($paste_info, 'w'); + + if ($fp) { + fwrite($fp, $paste_info_content); + fclose($fp); + } + + $show_paste = TRUE; + + header ("Location: " . $server_dir . $paste_id); + +} + +?> + + + + KXStudio Paste - <?php echo $paste_name; ?> + + KXStudio Paste + + + + + + + + +
+ +
+ +
+ +enable_classes(); + $geshi->set_header_type(GESHI_HEADER_NONE); + $paste_data = $geshi->parse_code(); + } +?> +

+ +

Invalid Paste ID


+ + +
+
+ +
+ +
+ + + + + + + + +
Syntax Highlighting: + +
Paste Name / Title: + +
+ +
+
+ + +
+ + diff --git a/pastebin/kxstudio.css b/pastebin/kxstudio.css new file mode 100644 index 0000000..7bf2dca --- /dev/null +++ b/pastebin/kxstudio.css @@ -0,0 +1,109 @@ +/* + * GeSHi CSS Inspired by TextMate + * Theme KXStudio + * + * Copyright 2008 Mark Story + * Copyright 2011 Filipe Coelho + * + * This work is licensed under the Creative Commons Attribution-Share Alike 2.5 Canada License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ca/ + * or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA + * + * @filesource + * @copyright Copyright 2008, Mark Story. + * @link http://mark-story.com + * @license http://creativecommons.org/licenses/by-sa/2.5/ca/ + * + * This file has been modified by Filipe Coelho (aka 'falkTX'), to match KXStudio's theme + */ + +/* + * Global geshi styles +**********************/ +#main pre { + line-height: 1.5em; + font-size: 10px; + white-space: normal; + padding: 0; + border: 1px solid; +} +pre ol { + list-style: decimal; + list-style-position: outside; + padding: 0; + margin: 0; +} +#main pre ol li { + margin: 0 0 0 35px; + padding: 0; + color: rgb(240,240,240); + clear: none; +} +pre ol li div { + color: rgb(240,240,240); +} + +/* comments */ +.co0, .co1, +.coMULTI { + color: rgb(100,100,100); +} + +/* brackets */ +.br0 { + color: rgb(230,230,230); +} + +/* strings */ +.st0, .st_h { + color: rgb(230,100,100); +} + +/* keywords */ +.kw1 { + color: rgb(240,240,240); + font-weight: 700; +} +.kw2 { + color: rgb(100,230,100); +} + +.kw3 { + color: rgb(100,100,230); +} + +/* numbers */ +.nu0 { + color: rgb(230,230,100); +} + +/* vars */ +.re0, .re1, .re2 { + color: rgb(100,230,100); +} + +/* + * CSS selectors +*****************/ +/* classnames */ +[lang=css] .kw2, +.css .kw2 { + color: rgb(240,240,240); + font-weight: 700; +} +.re1 { + color: rgb(240,240,240); + font-weight: 700; +} +/* css px */ +.re3 { + color: rgb(230,230,100); +} + +/* + * Javascript +****************/ +[lang=javascript] .me1, +.javascript .me1 { + color: rgb(100,100,230); +} diff --git a/pastebin/repo/_error b/pastebin/repo/_error new file mode 100644 index 0000000..be4539b --- /dev/null +++ b/pastebin/repo/_error @@ -0,0 +1 @@ +

Failed to create new Paste