mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Forum Feedback (https://www.mersenneforum.org/forumdisplay.php?f=61)
-   -   Pastebin BB Code (https://www.mersenneforum.org/showthread.php?t=20547)

Xyzzy 2015-10-15 21:07

Pastebin BB Code
 
We have implemented a new BB Code that allows you to embed a [URL="http://pastebin.com/"]Pastebin[/URL] snippet.

It allows syntax highlighting and a bunch of other features that we barely understand.

We hope this enhancement will make listing logs and code snippets on the forum much easier.

We are not sure how many pixels to give it for height. Right now it is set for 500 pixels. Suggestions are appreciated.

If this does not work for you please let us know!

[COLOR=White]Please try to break it. So we can try to fix it.[/COLOR]

Xyzzy 2015-10-15 21:07

[PASTEBIN]iVcctAA3[/PASTEBIN]

Batalov 2015-10-15 22:09

[PASTEBIN]jb5cFSYQ[/PASTEBIN]

henryzz 2015-10-17 17:42

This could start a new style of posting on the forum. I like it.

Not fond of how it looks if your code has less lines than the size of the box. Seems a waste of space. Does it need to be a fixed size?

Xyzzy 2015-10-17 22:00

[QUOTE=henryzz;412945]Does it need to be a fixed size?[/QUOTE]We didn't find a better option.

[url]http://www.w3schools.com/cssref/pr_dim_height.asp[/url]

Dubslow 2015-10-18 08:56

[QUOTE=Xyzzy;412959]We didn't find a better option.

[url]http://www.w3schools.com/cssref/pr_dim_height.asp[/url][/QUOTE]

Why not just use "auto"? You can also use a percentage instead of a fixed pixel count.

[url]https://developer.mozilla.org/en-US/docs/Web/CSS/length[/url]

Xyzzy 2015-10-18 14:25

[QUOTE=Dubslow;412996]Why not just use "auto"?[/QUOTE]That option only shows six lines.

[QUOTE=Dubslow;412996]You can also use a percentage instead of a fixed pixel count.[/QUOTE]That option shows six lines no matter what percentage it is set for.

Maybe we need to tune the height in pixels? Suggestions?

science_man_88 2015-10-18 14:32

[QUOTE=Xyzzy;413006]That option only shows six lines.

That option shows even less.

Maybe we need to tune the height in pixels? Suggestions?[/QUOTE]

not really but Here's a comparison to a post I made in the [URL="http://mersenneforum.org/showpost.php?p=403141&postcount=2547"]Pari commands thread[/URL]:

[PASTEBIN]G55ZpLHr[/PASTEBIN]
[PASTEBIN]8wbbeNDT[/PASTEBIN]
[PASTEBIN]G62my0ie[/PASTEBIN]
[PASTEBIN]7YMVKsSC[/PASTEBIN]
[PASTEBIN]P6ZS6SY8[/PASTEBIN]
[PASTEBIN]q1U96T64[/PASTEBIN]
[PASTEBIN]6QtLctAh[/PASTEBIN]

retina 2015-10-18 14:33

iframes are usually used for adverts. And AFAIK you can't get the height of the contents of the iframe because it acts like a new window inside the page. And each window can't communicate with each other, for security reasons.

Xyzzy 2015-10-18 14:36

[QUOTE=science_man_88;413007]not really but Here's a comparison to a post I made in the [URL="http://mersenneforum.org/showpost.php?p=403141&postcount=2547"]Pari commands thread[/URL]:[/QUOTE]It looks like "auto" makes the most sense!

:tu:

Xyzzy 2016-01-12 16:01

The embed code that was working is broken.

:help:

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


All times are UTC. The time now is 13:08.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.