About
A short MyCode for pastebin advents
Regular Expression
\[pastebin\]http:\/\/([a-zA-Z]?)+(\.)?pastebin\.com\/(.+?)\[\/pastebin\]
*Update : Gives compatibility to pastebin's subdomain service
Replacement
<script src=\"http://pastebin.com/embed_js.php?i=$3\"></script>
Note : Also available in HTTPS
Cheers!,
-n1tr0b
Thanks, just discovering things
How about this one:
Regular Expression
<a href="http[s]?://pastebin.com/([A-Za-z0-9]+)".*?>.*?</a>
Replacement
<div class="codeblock">
<div class="title">Pastebin:</div>
<div class="body">
<code><object data="http://pastebin.com/raw.php?i=$1" type="text/html">
<a href="http://pastebin.com/$1" target="_blank">http://pastebin.com/$1</a>
</object>
</code></div>
</div>
Example
http://pastebin.com/feqS5PdV
(No need for adding MyCode tags, just paste the URL in post content)
Good idea, but I don't do automatic URL parsing in my custom script. Lol
Cool, this MyCode is very helpful!
By the way in my forum I have an issue:
Why the width is so low? It is not like the screenshot querschlaeger has posted.
A URL to a thread with one of those tags might help.
Use this in the replacement instead:
<div class="codeblock">
<div class="title">Pastebin:</div>
<div class="body">
<code><object width="100%" data="http://pastebin.com/raw.php?i=$1" type="text/html">
<a href="http://pastebin.com/$1" target="_blank">http://pastebin.com/$1</a>
</object>
</code></div>
</div>