summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-02-19 03:15:05 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2010-02-19 03:15:05 +0100
commit1160ccc1193b134c09c0a543f61e7cd4463de53f (patch)
tree9fa46de9676136a5d229decb29680cdb827c7024
parent63b581935440bf8b119e3b0ad5d910f91788cd3e (diff)
downloadrafb-nopaste-1160ccc1193b134c09c0a543f61e7cd4463de53f.tar.gz
rafb-nopaste-1160ccc1193b134c09c0a543f61e7cd4463de53f.tar.xz
rafb-nopaste-1160ccc1193b134c09c0a543f61e7cd4463de53f.zip
layout change, urls are now set here
-rw-r--r--paste/include/pastify.inc25
1 files changed, 15 insertions, 10 deletions
diff --git a/paste/include/pastify.inc b/paste/include/pastify.inc
index e5a0508..328c1bf 100644
--- a/paste/include/pastify.inc
+++ b/paste/include/pastify.inc
@@ -35,31 +35,36 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require_once("geshi.php");
-function PastifyText($text, $language, $desc)
+function PastifyText($text, $language, $desc, $get_url, $remove_url)
{
+ global $config;
+
$plaintext = $text;
# Do the actual syntax highlighting
$geshi = new GeSHi($text, $language);
+ $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
+ $geshi->set_header_type(GESHI_HEADER_PRE_TABLE);
+
+ $geshi->set_footer_content('<div style="font-size: 0.5em; color: #DDD; text-align: center;">Rendered in {TIME}s with GeSHi {VERSION}</div>');
+ $geshi->set_overall_style('width: 100%;');
+
$output = $geshi->parse_code();
$html = <<<EOH
<html>
<head>
-<link rel="stylesheet" type="text/css" href="paste.css"/>
+<link rel="stylesheet" type="text/css" href="${config['site_path']}paste.css"/>
<meta name="robots" content="noarchive"/>
<title>Pasted code - $desc</title>
</head>
-<div style="border-bottom: 2px solid gray;">
+<div style="border-bottom: 2px solid #AAA; margin-bottom: 1em;">
<table border="0" cellpadding="1" cellspacing="2" width="100%">
<tr>
- <td><small>Pasted as <b>$language</b> <span id="controls">[<a href="={remove-paste-url}">Remove this paste</a> ]</span></small></td>
-</tr>
-<tr>
- <td><small>Description: $desc</small></td>
-</tr>
-<tr>
- <td><small>URL: ={this-paste-url}</small></td>
+ <td style="color: #888; font-family: monospace;" width="100%">$desc ($language)</td>
+ <td class="control" nowrap="nowrap">[ <a href="${config['site_domain']}${config['site_path']}">New</a> ]</td>
+ <td class="control" nowrap="nowrap">[ <a href="$get_url">Link</a> ]</td>
+ <td class="control" nowrap="nowrap">[ <a href="$remove_url">Remove</a> ]</td>
</tr>
</table>
</div>