Forum Blocks: Include Scratch blocks in your forum posts!
Forum Blocks allows you to post Scratch blocks in the forums with near-pixel-perfect rendering, with a simple and easy-to-learn syntax. No screenshots necessary!
Using Forum Blocks
Just include this snippet in your forum post:
[img]http://block.site90.net/<blocks>[/img]
Replace <blocks> with the blocks you'd like to include
Exporting from Scratch
Here is a changeset which adds an "export to forums" menu item to blocks, which copies the code for your stack into the clipboard. See here for detailed instructions on installing changesets
Syntax
A block consists of arguments and labels between brackets ( '[' and ']' ). Labels are the parts of blocks that show up in white text directly on the block (like 'forever' in the forever block). For example, the 'clear' block looks like this:
[clear]
▼
Put a block's arguments between parentheses, for example:
[wait(3)secs]
▼
(note: spacing is optional between labels and arguments, but required between words in a label, like "forever if")
To make c- or e-shaped blocks, put stacks in braces ( '{' and '}' ). For example:
[forever{[clear]}]
▼
To insert a variable block, just use [(<variable name>)], for example:
[say[(var)]]
▼
Note: Technical Limitations
Due to technical limitations, spaces, plus signs, hash signs (pound/number signs) and colons cannot be inserted directly into urls. Use an underscore or %20 if you need to insert a space. Use a ~ in place of all + , a %23 in place of all # , and a %3A in place of all :
Complex Example
Range 1, from the Scratch Wiki, with Forum Blocks:
[set(Iterator)to(0)]
[set(Highest)to(0)]
[repeat[length_of(List_of_Numbers)]{
[change(Iterator)by(1)]
[if[[item[(Iterator)]of(List_of_Numbers)]>[(Highest)]]{
[set(Highest)to[item[(Iterator)]of(List_of_Numbers)]]
}]
}]
▼
Source
You can view Forum Block's PHP source by visiting http://block.site90.net/block/source.php.
Coming Soon
- Hat blocks
- Mod support
- Highlighting blocks or arguments
Last edited by nXIII (2011-11-07 19:04:55)
Offline
000webhost admin review D:
Offline
Sweet! This is awesome!! I’m glad you made this, because the other messy forum blocks ruined everything and where impossible to understand! One thing though, booleans show up round.
Test:
Last edited by henley (2011-11-06 19:04:06)
Offline
henley wrote:
Sweet! This is awesome!! I’m glad you made this, because the other messy forum blocks ruined everything and where impossible to understand! One thing though, booleans show up round.
Test:
[url]http://block.site90.net/<[say[hello]for(2)secs]>[/url]
The parser interprets arguments and block types from the block specs; only actual boolean blocks have hexagonal shapes, for example:
[say[[(foo)=(bar)]and[(bar)=(baz)]]]
I did just notice, though, that =, <, and > had the wrong output type in my specs. Whoops!
Last edited by nXIII (2011-11-06 20:06:14)
Offline
Awesome idea!
Offline
Offline
Nice!
Offline
None are showing up...
Must be a 000webhost problem.
Offline
nXIII: To fix the Admin Review you need to send a Support Request about it to get it fixed.
Offline
Magnie wrote:
nXIII: To fix the Admin Review you need to send a Support Request about it to get it fixed.
It's happening to everyone. I'm wondering if this is an automatic thing so that you have to ask them personally to get it unlocked!
Offline
LS97 wrote:
Magnie wrote:
nXIII: To fix the Admin Review you need to send a Support Request about it to get it fixed.
It's happening to everyone. I'm wondering if this is an automatic thing so that you have to ask them personally to get it unlocked!
It is automatic, but it goes away eventually. It takes longer if you have more files on the server. It's taken up to 3 days for me.
Offline
Sorry about the admin review, I think everything's OK again. I moved the block generator to the block/ directory, which is why the source link was broken.
Last edited by nXIII (2011-11-07 14:44:41)
Offline
nXIII wrote:
Sorry about the admin review, I think everything's OK again. I moved the block generator to the block/ directory, which is why the source link was broken.
No chance, nXIII, still reviewing.
Offline
LS97 wrote:
nXIII wrote:
Sorry about the admin review, I think everything's OK again. I moved the block generator to the block/ directory, which is why the source link was broken.
No chance, nXIII, still reviewing.
Odd... they must have a whitelist or something that lets me view the content even though they're still reviewing it. I guess we just have to wait until they finish reviewing it.
Last edited by nXIII (2011-11-07 15:40:31)
Offline
Awesomeness, nxiii!
Last edited by ProgrammingFreak (2011-11-07 16:31:46)
Offline
nXIII wrote:
LS97 wrote:
nXIII wrote:
Sorry about the admin review, I think everything's OK again. I moved the block generator to the block/ directory, which is why the source link was broken.
No chance, nXIII, still reviewing.
Odd... they must have a whitelist or something that lets me view the content even though they're still reviewing it. I guess we just have to wait until they finish reviewing it.
I think it's over now. Might have just been my computer's cache...
Great job as usual, nXIII! By the way, how come you're still on here? I thought you left a year ago.
Last edited by LS97 (2011-11-07 16:50:30)
Offline
All we need now is for someone to make an editor for this. Honestly, inserting that code into a one-line URL is quite tedious. Maybe a special text editor could suffice. The best would be of course a drag and drop interface which could possibly take ages.
Offline