vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   BB Code Enhancements - pastebin.com BBCode (https://vborg.vbsupport.ru/showthread.php?t=238550)

mikey1991 03-17-2010 10:00 PM

pastebin.com BBCode
 
1 Attachment(s)
Title: paste
BB Code Tag Name: paste
Replacement:
HTML Code:

<iframe src="http://pastebin.com/embed_iframe.php?i={param}" style="border:none;width:100%"></iframe>
Example: [paste]q7Hx7EAZ[/paste]
Description: A code to embed pastebin.com code...
Use {option}: No
Remove Tag If Empty: Yes
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: No

djbaxter 03-18-2010 10:10 PM

:confused:

What exactly does this do?

mandingo 03-19-2010 12:34 AM

Quote:

Originally Posted by djbaxter (Post 2006114)
:confused:

What exactly does this do?

Pastebin is a text and code hosting site,this code allows the embedding of the raw formatted code using bbcode.

djbaxter 03-19-2010 12:55 AM

How is that different from the existing code, html, and php tags?

mandingo 03-19-2010 01:06 AM

This embeds from pastebin, when you "upload" code there it gives you a code,say Xm3Lrdjc. When you put your code between the [paste]Xm3Lrdjc[/paste] it displays your formatted code for you. It formats WAY more than just php or html.

djbaxter 03-19-2010 01:16 AM

Oh, okay. Thanks. It's only useful for pastebin.com members then.

mandingo 03-19-2010 01:26 AM

You don't have to be a member to use the service.

mikey1991 03-19-2010 11:48 AM

As mandingo has said, its free, no membership, and formats many more than php/html :) thx for answering questions mandingo.

Floris 03-19-2010 11:32 PM

Great addition. :)

Can't wait for possible?? future version where user pastes a link in a post to pastebin, and saves post, it returns with the pastebin being parsed (embedded). :)

mikey1991 03-22-2010 01:16 AM

1 Attachment(s)
Quote:

Originally Posted by Floris (Post 2006803)
Great addition. :)

Can't wait for possible?? future version where user pastes a link in a post to pastebin, and saves post, it returns with the pastebin being parsed (embedded). :)

great suggestion, currently this is just using what pastebin.com provide with thier api, I just thought of this use for it. I suppose if pastebin.com make this iframe code syntax highlight (I think they do if i chose html it will highlight in html? not sure, would need to test) - then that would work..

EDIT: It already does syntax highlighting, see attached example of the "PHP" language. :)

as7apcool 03-23-2010 07:59 PM

mmmmm.. thanks ..but this 4 members

MichaelDance 03-28-2010 11:13 AM

Thanks mate been looking for this one for ages :) x

need2fart 09-15-2010 08:56 PM

Does this still work? It's not working for me.

mikey1991 09-17-2010 12:14 AM

Works here; http://pastebin.com/embed_iframe.php?i=q7Hx7EAZ <- example url which is being iframed by the code.

May need to rebuild counters or such. Sorry for the delayed response, I'm quite busy these days so my mods go unsupported til I have time.

need2fart 09-17-2010 04:43 PM

Quote:

Originally Posted by mikey1991 (Post 2099364)
Works here; http://pastebin.com/embed_iframe.php?i=q7Hx7EAZ <- example url which is being iframed by the code.

May need to rebuild counters or such. Sorry for the delayed response, I'm quite busy these days so my mods go unsupported til I have time.

What counters?

And when I try this:

[paste]/**
* @Author: Kyle
* @Date: 08-31-2010
* @Description: Quadriatic Formula
*
*/

#include <stdio.h>
#include <math.h>
#include <windows.h>

main()
{
float a, b, c, answer1, answer2;
printf("Enter your equation Ax^2+Bx+C\n\n");
printf("Enter A: ");
scanf("%f", &a);
printf("Enter B: ");
scanf("%f", &b);
printf("Enter C: ");
scanf("%f", &c);
answer1=(-b+(sqrt(b*b-(4*a*c))))/(2*a);
answer2=(-b-(sqrt(b*b-(4*a*c))))/(2*a);

if (answer1 < 0 || answer2 < 0)
{
printf("The roots are: %f and %f\n",answer1,answer2);
}
else
{
printf("The values are imaginary...\n");
}
system("PAUSE");
return 0;

}[/paste]

It tells me this...

"Data provided by Pastebin.com - Download Raw
ERROR, PASTE ID IS INVALID, OR PASTE HAS BEEN REMOVED!"

When I hover over raw code it displays this:

"http://pastebin.com/raw.php?i=/**%20br%20/%3E*%20@Author:%20Kyle%20br%20/%3E*%20@Date:%2008-31-2010%20br%20/%3E*%20@Description:%20Quadriatic%20Formula%20br%2 0/%3E*%20br%20/%3E*/%20br%20/%3E%20br%20/%3E"

BirdOPrey5 09-20-2010 12:50 AM

Quote:

Originally Posted by need2fart (Post 2099686)
What counters?

And when I try this:
...
It tells me this...

"Data provided by Pastebin.com - Download Raw
ERROR, PASTE ID IS INVALID, OR PASTE HAS BEEN REMOVED!"

When I hover over raw code it displays this:

"http://pastebin.com/raw.php?i=/**%20br%20/%3E*%20@Author:%20Kyle%20br%20/%3E*%20@Date:%2008-31-2010%20br%20/%3E*%20@Description:%20Quadriatic%20Formula%20br%2 0/%3E*%20br%20/%3E*/%20br%20/%3E%20br%20/%3E"

You don't put the code between the [paste] tags... you put the code on pastebin.com and then you get an id code from the URL they give you and out that between the tags, like:
[paste]q7Hx7EAZ[/paste]

need2fart 09-20-2010 04:08 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2100750)
You don't put the code between the [paste] tags... you put the code on pastebin.com and then you get an id code from the URL they give you and out that between the tags, like:
[paste]q7Hx7EAZ[/paste]

Oh.... I am so blonde.

Thanks dude lol.

xtragic 09-01-2013 01:01 AM

I'm getting this error.

Quote:

The following BB Code replacement may not be properly formed. All HTML attributes should be enclosed within double quotes.

<iframe src="http://pastebin.com/embed_iframe.php?i={param}" style="border:none;width:100%"></iframe>

BirdOPrey5 09-01-2013 09:21 AM

That's not a error, it is a warning. The subtle difference is you have the option to ignore a warning.

In this case it looks safe to me, but it is up to you.


All times are GMT. The time now is 11:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01778 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete