This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#51 2012-06-16 16:02:38

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Using scratchblocks on your forum!

stevetheipad wrote:

Is this compatible with Fluxbb 1.5? And where do we add the image files and where do we find them?

It is compatible.  Add the pun/fluxbb code to main.tpl (in include/template) just before </body>
Add the image files to your forum's root directory.
Find them here: http://joren.tk/blocks


http://i.imgur.com/BAEgGDL.png

Offline

 

#52 2012-06-16 16:29:26

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Using scratchblocks on your forum!

Didn't work. I'm using PunBB 1.4.1. Added images to root dir, added code to main.tpl. What did I do wrong? Thanx.

Last edited by SciTecCf (2012-06-16 16:39:35)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#53 2012-06-16 17:19:22

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Using scratchblocks on your forum!

SciTecCf wrote:

Didn't work. I'm using PunBB 1.4.1. Added images to root dir, added code to main.tpl. What did I do wrong? Thanx.

I'd have to see... did you add the code before </body>?

EDIT: oh, I see the problem... updating code.
You should use the code for FluxBB 1.4.

Last edited by GeonoTRON2000 (2012-06-16 17:46:40)


http://i.imgur.com/BAEgGDL.png

Offline

 

#54 2012-06-17 05:08:38

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Using scratchblocks on your forum!

GeonoTRON2000 wrote:

SciTecCf wrote:

Didn't work. I'm using PunBB 1.4.1. Added images to root dir, added code to main.tpl. What did I do wrong? Thanx.

I'd have to see... did you add the code before </body>?

EDIT: oh, I see the problem... updating code.
You should use the code for FluxBB 1.4.

Thanks!

Last edited by SciTecCf (2012-06-18 03:25:08)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#55 2012-06-18 13:49:42

bonechill
Scratcher
Registered: 2012-05-02
Posts: 500+

Re: Using scratchblocks on your forum!

GeonoTRON2000 wrote:

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:

Code:

<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, "&amp;");
    blocks[i].innerHTML = blocks[i].innerHTML.replace(/</g, "&lt;");
    blocks[i].innerHTML = blocks[i].innerHTML.replace(/>/g, "&gt;");
    blocks[i].innerHTML = blocks[i].innerHTML.replace(/"/g, "&quot;");
    blocks[i].innerHTML = blocks[i].innerHTML.replace(/'/, "'");
  }
}
scratchBlocksPlugin.parse({containerTag: 'pre', containerClass: 'blocks'});
</script>

And add the following BBCode tag:

Code:

[scratchblocks]{TEXT}[/scratchblocks]

Makes:

Code:

<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

Code:

<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/punbb.js"></script>

FluxBB 1.2

Code:

<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/fluxbb-1.2.js"></script>

FluxBB 1.3 (Rare)

Code:

<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/fluxbb-1.3.js"></script>

FluxBB 1.4

Code:

<script type="text/javascript" src="http://geonotron.net84.net/scratchblocks/fluxbb-1.4.js"></script>

FluxBB 1.5

Code:

<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:

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

that helps  smile


http://www.planetminecraft.com/files/sigs/scratch9p_693826_sig.jpg

Offline

 

#56 2012-06-21 15:18:51

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Using scratchblocks on your forum!

Hey Geono, I'm still having trouble on my forums. Can you help? Thanks!


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#57 2012-06-21 20:29:37

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Using scratchblocks on your forum!

SciTecCf wrote:

Hey Geono, I'm still having trouble on my forums. Can you help? Thanks!

I'm not sure your error is a problem with my code...
Yeah, that's an error by the ST.

Last edited by GeonoTRON2000 (2012-06-21 20:31:52)


http://i.imgur.com/BAEgGDL.png

Offline

 

#58 2012-06-25 10:29:40

soniku3
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: Using scratchblocks on your forum!

It doesn't work on Punbb hosting!


internet's all about cats today.

Offline

 

#59 2012-06-25 17:20:06

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Using scratchblocks on your forum!

soniku3 wrote:

It doesn't work on Punbb hosting!

PunBB hosting uses FluxBB 1.2
Make sure you use the right one!


http://i.imgur.com/BAEgGDL.png

Offline

 

#60 2012-07-06 07:36:05

soniku3
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: Using scratchblocks on your forum!

GeonoTRON2000 wrote:

soniku3 wrote:

It doesn't work on Punbb hosting!

PunBB hosting uses FluxBB 1.2
Make sure you use the right one!

I DID SHOULD I MAKE YOU ADMIN? http://pinkie-pie.punbb-hosting.com/index.php


internet's all about cats today.

Offline

 

#61 2012-07-07 07:58:17

PullJosh
Scratcher
Registered: 2011-08-01
Posts: 500+

Re: Using scratchblocks on your forum!

Hey, Geono... I know you're probably very, very tired of this, but I was wondering if you could help set up my forums? They aren't scratch approved yet, but they are 100% safe. Since they aren't approved, I would need to email you the link. If you aren't comfortable sharing your email, that's fine. I understand. See your forum posts soon!

EDIT: I have everything... Other than scripts_footer.html and overall_footer.html. Any other things I could use? I'm using phpbb.

Last edited by PullJosh (2012-07-08 19:51:23)


http://www.blocks.scratchr.org/API.php?action=text&amp;string=I'm_on_vacation!&amp;xpos=155&amp;ypos=90&amp;font_size=30&amp;bgimage=http://imageshack.us/a/img339/7215/sspeechsigapiforwords.png

Offline

 

Board footer