I've figured out how!
First, you need to add the block images.
Those are the .png files here.
Next, you need to parse the scripts, which is where we split into 2:
For phpBB
Add this code to the top of your scripts_footer.html (in template) or overall_footer.html if you don't have it:
<script type="text/javascript" src="http://scratch.mit.edu/ext/blocksplugin/blocksplugin.js"></script>
<script type="text/javascript">
var blocks = document.getElementsByClassName("blocks");
var i;
for (i=0; i<blocks.length; i++) {
if (blocks[i].innerText)
blocks[i].innerHTML = blocks[i].innerText;
else {
blocks[i].innerHTML = blocks[i].innerHTML.replace(/<br \/>/gi, "\r\n");
blocks[i].innerHTML = blocks[i].innerHTML.replace(/<br>/gi, "\r\n");
blocks[i].innerHTML = blocks[i].innerHTML.replace(/&/g, "&");
blocks[i].innerHTML = blocks[i].innerHTML.replace(/</g, "<");
blocks[i].innerHTML = blocks[i].innerHTML.replace(/>/g, ">");
blocks[i].innerHTML = blocks[i].innerHTML.replace(/"/g, """);
blocks[i].innerHTML = blocks[i].innerHTML.replace(/'/, "'");
}
}
scratchBlocksPlugin.parse({containerTag: 'pre', containerClass: 'blocks'});
</script>And add the following BBCode tag:
[scratchblocks]{TEXT}[/scratchblocks]Makes:
<pre class="blocks">{TEXT}</pre>For PunBB/FluxBB
Add the code that corresponds to your version to the bottom of main.tpl, just before </body>:
PunBB
<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/punbb.js"></script>
FluxBB 1.2
<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/fluxbb-1.2.js"></script>
FluxBB 1.3 (Rare)
<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/fluxbb-1.3.js"></script>
FluxBB 1.4
<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/fluxbb-1.4.js"></script>
FluxBB 1.5
<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/fluxbb-1.5.js"></script>
If you use PunBB Hosting or other hosting where you can't access the filesystem and add the block images (below), you should add this right beneath the Pun/Flux code:
<script type="text/javascript" src="http://geonotron.net84.net/forums/plugins/resourcegrab.js"></script>
Next, we must celebrate!
when gf clicked repeat (1000) celebrate end stop all
Last edited by GeonoTRON2000 (2012-06-16 17:45:30)
Offline
jvvg wrote:
Nice guide! I wonder what LS97 has to say about adding this to Mod Share. I think we talked about it once.
Thanks!
Offline
The link to your forums in your sig doesn't work.
Hyperlinked page wrote:
Error 404: File Not Found
(+/-) More Information
Last edited by nathanprocks (2012-06-02 05:22:23)
Offline
nathanprocks wrote:
The link to your forums in your sig doesn't work.
![]()
Hyperlinked page wrote:
Error 404: File Not Found
(+/-) More Information
This link should work: http://geonotron.net84.net/forums/
Offline
Where is the viewtopic thing. This is my forums:
joletolesforum.punbb-hosting.com
Offline
joletole wrote:
Where is the viewtopic thing. This is my forums:
joletolesforum.punbb-hosting.com
In your /forums folder, there is a file called viewtopic.php. I don't think you can edit the forum software with punbb-hosting though.
Offline
nathanprocks wrote:
joletole wrote:
Where is the viewtopic thing. This is my forums:
joletolesforum.punbb-hosting.comIn your /forums folder, there is a file called viewtopic.php. I don't think you can edit the forum software with punbb-hosting though.
No, I think you can (you certainly can with phpBB).
Try going to the admin panel and editing your style.
If it lets you edit the template, go ahead and edit the file that's something like scripts_footer.html, and put the code there.
Offline
GeonoTRON2000 wrote:
nathanprocks wrote:
joletole wrote:
Where is the viewtopic thing. This is my forums:
joletolesforum.punbb-hosting.comIn your /forums folder, there is a file called viewtopic.php. I don't think you can edit the forum software with punbb-hosting though.
No, I think you can (you certainly can with phpBB).
Try going to the admin panel and editing your style.
If it lets you edit the template, go ahead and edit the file that's something like scripts_footer.html, and put the code there.
Hmm..., I need help. Join my forum, then I will make you admin so you can do this.
Offline
joletole wrote:
GeonoTRON2000 wrote:
nathanprocks wrote:
In your /forums folder, there is a file called viewtopic.php. I don't think you can edit the forum software with punbb-hosting though.No, I think you can (you certainly can with phpBB).
Try going to the admin panel and editing your style.
If it lets you edit the template, go ahead and edit the file that's something like scripts_footer.html, and put the code there.Hmm..., I need help. Join my forum, then I will make you admin so you can do this.
I did
I'm GeonoTRON2000
Offline
Yay this is a great tutorial for me
Just a reminder I won't be on Scratch that much but I 'll still be here, so if i'm on something, I will be commenting back, okay!
, PICO Team!!!!!!!!!!! SCRATCH DEADW!!! PICO HACK ACCOUTNTT@@Offline
Found a glitch.
If you do repeat, the | | connector bar doesn't show up.

Offline
funelephant wrote:
Found a glitch.
If you do repeat, the | | connector bar doesn't show up.
What do you mean?
Can you show an example?
repeat until <(glitch) = [fixed]> say [uh-oh]
Offline
GeonoTRON2000 wrote:
funelephant wrote:
Found a glitch.
If you do repeat, the | | connector bar doesn't show up.What do you mean?
Can you show an example?repeat until <(glitch) = [fixed]> say [uh-oh]
On my forums. In the Welcome to the new forums topic.

Offline
funelephant wrote:
GeonoTRON2000 wrote:
funelephant wrote:
Found a glitch.
If you do repeat, the | | connector bar doesn't show up.What do you mean?
Can you show an example?repeat until <(glitch) = [fixed]> say [uh-oh]On my forums. In the Welcome to the new forums topic.
Never mind, it's fixed

Offline
williambl wrote:
The when green flag clicked block is glitchy on my forums..
To get hat block and C blocks to work correctly, you need to upload these images to your forums root directory:
gf.png
hat_bg.png
cwrap.png
Offline
GeonoTRON2000 wrote:
williambl wrote:
The when green flag clicked block is glitchy on my forums..
To get hat block and C blocks to work correctly, you need to upload these images to your forums root directory:
gf.png
http://img214.imageshack.us/img214/8501/64730809.png
hat_bg.png
http://img194.imageshack.us/img194/6569/hatbg.png
cwrap.png
http://img16.imageshack.us/img16/5030/cwrap.png
How do I do that with punbb hosting?
Offline
williambl wrote:
GeonoTRON2000 wrote:
williambl wrote:
The when green flag clicked block is glitchy on my forums..
To get hat block and C blocks to work correctly, you need to upload these images to your forums root directory:
gf.png
http://img214.imageshack.us/img214/8501/64730809.png
hat_bg.png
http://img194.imageshack.us/img194/6569/hatbg.png
cwrap.png
http://img16.imageshack.us/img16/5030/cwrap.pngHow do I do that with punbb hosting?
I'm working on a script for that now...
Offline
GeonoTRON2000 wrote:
williambl wrote:
GeonoTRON2000 wrote:
To get hat block and C blocks to work correctly, you need to upload these images to your forums root directory:
gf.png
http://img214.imageshack.us/img214/8501/64730809.png
hat_bg.png
http://img194.imageshack.us/img194/6569/hatbg.png
cwrap.png
http://img16.imageshack.us/img16/5030/cwrap.pngHow do I do that with punbb hosting?
I'm working on a script for that now...
Great!
Offline
Here's what I have (place under the embed code in the first post):
<script type="text/javascript">
// basic settings
var protocol = self.location.href.split("/")[0].substring(0, self.location.href.split("/")[0].length-1);
var base_url = self.location.href.split("/")[2];
var L;
var directory = "";
for (L = 3; L < self.location.href.split("/").length-1; L++) {
directory += "/"+self.location.href.split("/")[L];
}
L=null;
// the green flag
var imgs = document.getElementsByTagName("img");
for (L = 0; L < imgs.length; L++) {
if (imgs[L].src==protocol+"://"+base_url+directory+"/gf.png" || imgs[L].src == "gf.png") {
imgs[L].src = "http://scratch.mit.edu/ext/blocksplugin/gf.png";
}
}
L = null;
// the hat block and C block
var divs = document.getElementsByTagName("div");
for (L = 0; L < divs.length; L++) {
var div = divs[L];
if (div.style.backgroundImage == "url("+protocol+"://"+base_url+directory+"/hat_bg.png)" || div.style.backgroundImage == "url('"+protocol+"://"+base_url+directory+"/hat_bg.png')" || div.style.backgroundImage == "url('hat_bg.png')" || div.style.backgroundImage == "url(hat_bg.png)") {
div.style.backgroundImage = "url(http://scratch.mit.edu/ext/blocksplugin/hat_bg.png)";
}
else if (div.style.backgroundImage == "url("+protocol+"://"+base_url+directory+"/cwrap.png)" || div.style.backgroundImage == "url('"+protocol+"://"+base_url+directory+"/cwrap.png')" || div.style.backgroundImage == "url('cwrap.png')" || div.style.backgroundImage == "url(cwrap.png)") {
div.style.backgroundImage = "url(http://scratch.mit.edu/ext/blocksplugin/cwrap.png)";
}
}
</script>Can you test it for me?
Last edited by GeonoTRON2000 (2012-06-03 15:49:36)
Offline