If anyone hangs out in most programming channels on efnet, such as #c++, #asm, etc, then you're probably familiar with the "nopaste" or "pastebin" scripts they encourage you to use.
I have made one similar to most others around, but I feel it's quicker and more efficient because it's not flatfile, like a lot of the ones out there. It has syntax highlighting for most languages.
Feel free to check it out, and use it. http://www.rafm.org/paste
For an example of the syntax highlighting, and a sweet dll injector class, check here http://www.rafm.org/paste/results.php?id=19 :-)
I used something like this b4 ( i think same people)
http://rafb.net
That's hot. :P
Quote from: FrostWraith on May 09, 2006, 03:54 PM
I used something like this b4 ( i think same people)
http://rafb.net
Yes. I got the idea for the script from a site similar to rafb.net - I got the idea for my site title from rafb.net. :-P
Eww -- I pasted (http://www.rafm.org/paste/results.php?id=24) my DataFormatter (http://www.jinxbot.net/mbncsutil/codebrowse.aspx?lang=cs&id=code-1.3.0.6/dataformatter.cs) class (1.3.0.6) and your bin didn't persist my tabs (which are extended to spaces) and didn't parse my C# XML comments (which you see in my output but not yours).
I'll work on it some more. :-( hehe
It doesn't like your HTML-style comments.
Ok, fixed. http://www.rafm.org/paste/results.php?id=24
Bueno!
Actually, after some research, pre tags seem to be depricated. I've switched it to largely css.
I also added line numbers and word wrapping. It looks real pretty in IE, but the word wrapping isn't working yet on firefox.
I don't know if your script does this, but whenever I process HTML, I immediately replace all instances of:
& with &
< with <
> with >
Wasn't sure if you did that or not, just thought I'd throw it out there. ;-)
Quote from: MyndFyre[vL] on May 14, 2006, 02:25 AM
I don't know if your script does this, but whenever I process HTML, I immediately replace all instances of:
& with &
< with <
> with >
Wasn't sure if you did that or not, just thought I'd throw it out there. ;-)
Yes, there is a php function called htmlentities() that does this.
You might htmlspecialchars (http://us2.php.net/manual/en/function.htmlspecialchars.php) instead. It doesn't translate quite as much; only the special characters.
The pastebin script now supports commenting. Pastes posted by non-registered users, as anonymous, last only 24 hours. Pastes posted by registered users lasts a month. Registered users may comment on any paste. Non-registered users may not make comments, but may view them.
Example here (http://www.rafm.org/paste/results.php?id=66)
Any way to get a longer paste without repasting?
Well, naturally there is a maximum length for pastes. I've pasted large amounts of code, and the length allowed right now should be sufficient enough to use this script for what it's purpose is - share, or show people code in a formatted, nice looking and easy to read manner.
Also, I don't want people pasting a bunch of junk and cluttering my database.
I got bored creating my listserve script, so I have returned the paste scripts and the old rafm.org page with all of my files on it. I don't intend to take it down again, so feel free to start pasting again.
http://pastebin.com/ > *
Well, I'm currently working on integrating my newer login scheme into my old paste bin script. Should be done soon. I'm getting rid of my use of sessions, and moving entirely to cookies so you stay logged in. Not to mention I like my current layout better than my previous one.
You can currently sign up, in and out. Not to mention I have a new feature that I have yet to see in current paste bin scripts in mind. Within the week this should all be fully functional.
I'd suggest getting rid of the "all content copyright rafm..." under where people paste their scripts. It gives off the wrong impression. :P
"Pastebin script copyright..." would be more appropriate.
Quote from: Rule on July 31, 2006, 01:50 AM
I'd suggest getting rid of the "all content copyright rafm..." under where people paste their scripts. It gives off the wrong impression. :P
"Pastebin script copyright..." would be more appropriate.
Maybe, "all non user-generated content..." :-P
Anyways, just an update, the entire paste script is back up and running including the new "private" feature. This new feature makes the "recent paste" page ignore your paste so random viewers don't visibly notice your paste. I'm going to get the comments feature back up today. Other than that, are there any features you would like to see on here that could be of use to anyone?
Make a paste's duration based on ratings. I think you should add in a ratings system so that highly rated pastes won't just go poof.
Quote from: rabbit on July 31, 2006, 09:13 AM
Make a paste's duration based on ratings. I think you should add in a ratings system so that highly rated pastes won't just go poof.
Ah, very nice. Possibly pastes rated "Exemplary" will never expire. Pastes created by users that are logged in already last a month. I mean, we're talking about pastes being deleted either daily, monthly, after 5 or so months maybe, and then yearly and then never...
Ok, I've started adding rating functionality. Should it be required that you're logged in to rate pastes, or should anyone be able to rate them?
Ok. Rating the pastes is now fully functional with pretty stars to depict the rating (theyre not appearing transparent on IE but they do on FireFox, I think). You can only rate pastes if you're logged in. Pastes by logged in and non-logged in users may be rated. The duration that a paste will stay intact depends on its rating. Pastes with a rating of 4.5 or better are exempt from deletion, and all pastes with less rates are subject to deletion.
Quote from: warz on August 05, 2006, 10:45 AM
Ok. Rating the pastes is now fully functional with pretty stars to depict the rating (theyre not appearing transparent on IE but they do on FireFox, I think). You can only rate pastes if you're logged in. Pastes by logged in and non-logged in users may be rated. The duration that a paste will stay intact depends on its rating. Pastes with a rating of 4.5 or better are exempt from deletion, and all pastes with less rates are subject to deletion.
IE6 doesn't support transparent PNGs, IE7 does.
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
var imgAttribs = img.attributes;
for (var j=0; j<imgAttribs.length; j++)
{
var imgAttrib = imgAttribs[j];
if (imgAttrib.nodeName == "align")
{
if (imgAttrib.nodeValue == "left") imgStyle = "float:left;" + imgStyle
if (imgAttrib.nodeValue == "right") imgStyle = "float:right;" + imgStyle
break
}
}
var strNewHTML = "<span " + imgID + imgClass + imgTitle
strNewHTML += " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
strNewHTML += "(src=\'" + img.src + "\', sizingMethod='none');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent("onload", correctPNG);
</script>