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

#826 2011-05-04 13:56:18

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

scimonster wrote:

sparks wrote:

I already have two dropbox accounts  sad  Can we consider a different image hosting method?

Did you see about the email suggestion?

@Pacola: I always use  tongue   tongue

I meant you used :P)

No, that was a  tongue  in parentheses.  tongue

Offline

 

#827 2011-05-04 13:56:36

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

What can the email be used for?

Dropbox. Also for the website there could be an email thing. But of course they could post here, it would be mostly for dropbox, we could use it for the scratch accounts E-mail.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#828 2011-05-04 13:57:54

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

I was adding and saving the others though, and didn't realize the damage it could do. ^^

Library email is a good idea!
We could use blocklibrary@gmail.com for example.
It could be for contacting a Librarian directly (though of course they can just post here :P)

There! Fixed! (ps I knew it was)

Last edited by Pecola1 (2011-05-04 13:59:11)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#829 2011-05-04 14:49:48

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Maybe a new dropbox account is a good idea. It would allow other library members to add Panther blocks if we moved the panther block files to that one. I was reluctant to do this earlier as it would mean any download blocks people have saved will no longer work.

You guys decide, we can move the blocks to a new dropbox and replace all the existing ones with

Code:

block library
this version of the download block is outdated. Double-click this block to download the new one
-
#FFFFFF
|t2 t3 t4|
t1_'download block $Number$ from the Block Library'.
t2_'-'.
t4_'#9100A8'.
t4_self stringAsColor: t4.
t3_'new block code here'.

createdBlocks at: t1 put: {t1. t1. '-'. ''. self class blockColorFor: 'custom'}.createdBlocks at: t1 put: {t1. t1. t2. t3. t4}.(t4 _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [t4 viewerPane categoryChanged: 'variables'].

self showInformDialog: 'Success' withText: 'You have updated your download block!'

This means that a block will be downloaded that lets them download the new download block if they want...

and we will have to redirect the links for every single existing Panther block in the library as they all have "view source" links next to them.

Last edited by sparks (2011-05-04 14:51:08)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#830 2011-05-04 14:51:04

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

Maybe a new dropbox account is a good idea. It would allow other library members to add Panther blocks if we moved the panther block files to that one. I was reluctant to do this earlier as it would mean any download blocks people have saved will no longer work.

You guys decide, we can move the blocks to a new dropbox and replace all the existing ones with

Code:

block library
this version of the download block is outdated. Double-click this block to download the new one
-
#FFFFFF
|t2 t3 t4|
t1_'download block $Number$ from the Block Library'.
t2_'-'.
t4_'#9100A8'.
t4_self stringAsColor: t4.
t3_'new block code here'.

createdBlocks at: t1 put: {t1. t1. '-'. ''. self class blockColorFor: 'custom'}.createdBlocks at: t1 put: {t1. t1. t2. t3. t4}.(t4 _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [t4 viewerPane categoryChanged: 'variables'].

self showInformDialog: 'Success' withText: 'You have updated your download block!'

and we will have to redirect the links for every single existing Panther block in the library as they all have "view source" links next to them.

I can change them easily with find and replace.  big_smile

Offline

 

#831 2011-05-04 14:54:42

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Maybe we should do that then.

I'm thinking if we're making a change to the download block anyway to read blocks from the new dropbox we should build in some sort of feature that allows the block to be updated easily without this sort of download change system needed. One way would be to have the block read it's own operation code from a file. I don't know how to run a full piece of smalltalk from a webpage though. It would mean we can make an edit to that one file and all download blocks would read the changed file and operate in that way.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#832 2011-05-04 14:55:52

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

Maybe we should do that then.

I'm thinking if we're making a change to the download block anyway to read blocks from the new dropbox we should build in some sort of feature that allows the block to be updated easily without this sort of download change system needed. One way would be to have the block read it's own operation code from a file. I don't know how to run a full piece of smalltalk from a webpage though. It would mean we can make an edit to that one file and all download blocks would read the changed file and operate in that way.

Is there a run command and a getfromurl command? So, why not?

Offline

 

#833 2011-05-04 14:58:55

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Why not use SQL and keep all blocks in a database?


You can now reach me on Twitter @johnnydean1_

Offline

 

#834 2011-05-04 15:04:29

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Is there a runCode: command in Panther?

Last edited by scimonster (2011-05-04 15:04:40)

Offline

 

#835 2011-05-04 15:09:40

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

johnnydean1 wrote:

Why not use SQL and keep all blocks in a database?

That's a good idea, I suppose the block could use POST commands to send a number to a site on the blocklib site, then the page can send the block information back. I might go ahead and set something up now!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#836 2011-05-04 15:10:59

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: ITopic: Welcome to your local block library!

johnnydean1 wrote:

New Panther Blocks:

Name:

get var $String$ from online

Type

r

Code:

    | t2 t3 t4 t5 t6 t7 t8 |
    t8 _ t1 asString.
 t2_ 'http://scratchlive.xtreemhost.com/'.
    t2 _ t2 asString.
    t3 _ t2 , 'set.php?user=' , t8 , '&pass=1'.
    t4 _ self readLine: 4 FromUrl: t3.
    t4 = '<html>' ifTrue: [t4 _ ''].
    t5 _ 0.
    t7 _ ''.
    t4 size
        timesRepeat: 
            [t5 _ t5 + 1.
            t6 _ self letter: t5 of: t4.
            t6 = '_' ifTrue: [t6 _ ' '].
            t7 _ t7 , t6].
    ^ t7

Name:

set/make a online var $String$ to $String$

Type

-

Code:

    | t3 t4 t5 t6 t7 t8 t9 t10 |
    t9 _ t2 asString.
    t10 _ t1 asString.
    t6 _ 0.
    t8 _ ''.
    t9 size
        timesRepeat: 
            [t6 _ t6 + 1.
            t7 _ self letter: t6 of: t9.
            t7 = ' ' ifTrue: [t7 _ '_'].
            t8 _ t8 , t7].
    t3 _ PhpUrl.
t3 _ 'http://scratchlive.xtreemhost.com/'.
    t3 _ t3 asString.
    t4 _ t3 , 'set.php?user=' , t10 , '&pass=1&value=' , t8.
    t5 _ self readLine: 4 FromUrl: t4.
    ^ t5

Here, all data and variable names can be seen.
*These are also in Claw

Have these been added yet?


You can now reach me on Twitter @johnnydean1_

Offline

 

#837 2011-05-04 17:08:51

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

DarthPickley wrote:

uh, you know that block for panther in sensing called < password for [user] is [password] > ? wouldn't that be able to be used by hackers or something? although I suppose it would be difficult to use that to hack into people's accounts, versus confirming things, but also:
I remember that in the terms of use of the source code you're not supposed to interact with the scratch web site much with the mods. although I think it said only don't share projects.

A valid point. I can see that it might be a problem but it was the Scratch team who released the URL this block uses. The Scratch site does not have a cut-out limit if too many incorrect passwords are given so guessing the password in Scratch is as time-consuming and fruitless as doing it on the Site. An MD5 dictionary onslaught will be just as easy to do with Panther as some other program such as C++ and probably even python.

My main worry is that someone might release a project containing this block and then use Panther's URL connection blocks to send the user name and password that someone enters in the project to a MySQL database of their own, this is unlikely to happen though as I thoroughly check all Panther projects before I upload them. I will report my post to the Scratch team and see what they think. If they want me to remove it from the library I am more than happy to do so  smile

I sent of a report to the Scratch team about this. No reply so it would seem there isn't a problem with it. @Lighnin (I think that makes lighnin see it) If the Scratch team ever want it removed just post!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#838 2011-05-04 17:12:40

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: ITopic: Welcome to your local block library!

[VERY ANNOYED] WHEN ARE YOU ADDING MY BLOCKS! [/VERY ANNOYED]

Last edited by johnnydean1 (2011-05-04 17:13:40)


You can now reach me on Twitter @johnnydean1_

Offline

 

#839 2011-05-04 17:45:33

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

johnnydean1 wrote:

[VERY ANNOYED] WHEN ARE YOU ADDING MY BLOCKS! [/VERY ANNOYED]

These blocks run with your online SQL system. Are you sure that you have finished work on it? Happy with it all because if you want to make changes to these blocks later older copies people download may conflict.

My main worry is that with your system anyone can wipe/reset another's variable but if you're happy with the blocks I can add them  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#840 2011-05-04 17:48:04

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

Maybe a new dropbox account is a good idea. It would allow other library members to add Panther blocks if we moved the panther block files to that one. I was reluctant to do this earlier as it would mean any download blocks people have saved will no longer work.

You guys decide, we can move the blocks to a new dropbox and replace all the existing ones with

Code:

block library
this version of the download block is outdated. Double-click this block to download the new one
-
#FFFFFF
|t2 t3 t4|
t1_'download block $Number$ from the Block Library'.
t2_'-'.
t4_'#9100A8'.
t4_self stringAsColor: t4.
t3_'new block code here'.

createdBlocks at: t1 put: {t1. t1. '-'. ''. self class blockColorFor: 'custom'}.createdBlocks at: t1 put: {t1. t1. t2. t3. t4}.(t4 _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [t4 viewerPane categoryChanged: 'variables'].

self showInformDialog: 'Success' withText: 'You have updated your download block!'

This means that a block will be downloaded that lets them download the new download block if they want...

and we will have to redirect the links for every single existing Panther block in the library as they all have "view source" links next to them.

yes!


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#841 2011-05-04 17:55:45

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

@sparks If you wan't to turn a string into a method, (basically run the string as if it weren't the string), then simply use this code:

Code:

Compiler evaluate: 'string or variable with string value goes here' for: self logged: false.

So you can run a method from a url use:

Code:

t1 _ readFromUrl: 'URLSouldBePutHere'.
Compiler evaluate: t1 for: self logged: false.

If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#842 2011-05-04 18:15:54

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

here is a few codes for http://i54.tinypic.com/iy1xg2.gif block.
first, a list of needed things before we put the code in.
scratch-objects>>scriptablescratchmorph>>class>>blockspecs>>blockcolorfor:
add this directly below ^lists

Code:

    'custom' = t1 ifTrue: [^ Color
        h: 200
        s: 0.2
        v: 0.5].

then,
scratch-objects>>scriptablescratchmorph>>instance>>objects i/o

Code:

showInformDialog: t1 withText: t2
    DialogBoxMorph inform: t2 title: t1

Code:

readLine: t1 FromUrl: t2 
    ^    (HTTPScket httpGet: t2) contents lines at: t1 ifAbsent: ['']

Code:

stringAsColor: t1
    ^    Color fromString: t1 asString

Code:

createdBlocks
    ^    createdBlocks

then, finally, the code

Code:

downloadBlock: t1
|maker link t2 t3 t4 t5|
link_'http://dl.dropbox.com/u/6273449/', t1 asString, '.txt'.
maker_self readLine: 1 FromUrl: link.
t5_self readLine: 2 FromUrl: link.
t2_self readLine: 3 FromUrl: link.
t4_self readLine: 4 FromUrl: link.
t4_self stringAsColor: t4.
t3_self readLine: 5 FromUrl: link.

createdBlocks at: t1 put: {t5. t5. '-'. ''. self class blockColorFor: 'custom'}.createdBlocks at: t5 put: {t5. t5. t2. t3. t4}.(t4 _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [t4 viewerPane categoryChanged: 'variables'].

self showInformDialog: 'Sucess!' withText: 'The block has been added to your variables tab.', '
', 'The "', t5, '" block', '
', ' was shared by ', maker

then, the block spec.

Code:

('download Kitcat block %n' #- #downloadBlock: '1')

now, theoretecly, this should work, but it doesn't yet. I think it needs more codes to work. I'm working on it at the moment.
this will also give you some more blocks;

Code:

('show inform dialog %s with text %s' #- #showInformDialog:withText:)

Code:

('read line %n of url: %s' #r #readLine:FromUrl:)

Code:

('%s as color' #l #stringAsColor:)

although, I don't know what use the () as color will do. I'm also working on color blocks, just like panther  smile

Last edited by GP1 (2011-05-04 18:22:22)


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#843 2011-05-04 18:26:35

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

gp1 This looks really cool but isn't this just the download block from the library? You're welcome to add it to your modification but if you do, people won't need to code you gave above - it'll already be in your mod. Also, you should know that we might be moving the location of our blocks so your whole download setup will stop working, we might even be changing the way the blocks are stored (namely an SQL table).


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#844 2011-05-04 18:34:51

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

@sparks If you wan't to turn a string into a method, (basically run the string as if it weren't the string), then simply use this code:

Code:

Compiler evaluate: 'string or variable with string value goes here' for: self logged: false.

So you can run a method from a url use:

Code:

t1 _ readFromUrl: 'URLSouldBePutHere'.
Compiler evaluate: t1 for: self logged: false.

Just wanted to bump this for sparks because of SOMEBODIES long post. (LOL I am not really mad)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#845 2011-05-04 18:42:57

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: ITopic: Welcome to your local block library!

Wow, I missed a lot. *Reads*  sad  Mostly just code stuff that I don't understand. Where's new BYOB blocks!  tongue


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#846 2011-05-04 18:55:38

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

sparks wrote:

DarthPickley wrote:

uh, you know that block for panther in sensing called < password for [user] is [password] > ? wouldn't that be able to be used by hackers or something? although I suppose it would be difficult to use that to hack into people's accounts, versus confirming things, but also:
I remember that in the terms of use of the source code you're not supposed to interact with the scratch web site much with the mods. although I think it said only don't share projects.

A valid point. I can see that it might be a problem but it was the Scratch team who released the URL this block uses. The Scratch site does not have a cut-out limit if too many incorrect passwords are given so guessing the password in Scratch is as time-consuming and fruitless as doing it on the Site. An MD5 dictionary onslaught will be just as easy to do with Panther as some other program such as C++ and probably even python.

My main worry is that someone might release a project containing this block and then use Panther's URL connection blocks to send the user name and password that someone enters in the project to a MySQL database of their own, this is unlikely to happen though as I thoroughly check all Panther projects before I upload them. I will report my post to the Scratch team and see what they think. If they want me to remove it from the library I am more than happy to do so  smile

I sent of a report to the Scratch team about this. No reply so it would seem there isn't a problem with it. @Lighnin (I think that makes lighnin see it) If the Scratch team ever want it removed just post!

I think the user pass block isn't the problem, it's really the problem, its the mysql blocks, they are the only connection to send the information, without the block, you could still easily get people to think it would work, it could simply ask what their user or password, or even make itself as if it would 'put your email backwards' or password or whatever information the hacker wants, hey hey HEY! This would be great to add to my story! (not to give out any ideas)

Last edited by Pecola1 (2011-05-04 18:55:57)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#847 2011-05-04 18:58:10

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

OMG! I accidentally posted a bad word (fifth word in above post) I edited it before anyone saw it though. *phew* I just missed a letter.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#848 2011-05-04 19:04:19

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

gp1 This looks really cool but isn't this just the download block from the library? You're welcome to add it to your modification but if you do, people won't need to code you gave above - it'll already be in your mod. Also, you should know that we might be moving the location of our blocks so your whole download setup will stop working, we might even be changing the way the blocks are stored (namely an SQL table).

yeah, I read about that. that's sad, but I'm going to edit this block to make it download from our dropbox account. I just want people who want some of Kitcat's blocks in Scratch or mod very quickly. I also give credit for panther devs for the codes, just if anybody wants the block


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#849 2011-05-04 19:04:33

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: ITopic: Welcome to your local block library!

SSBBM wrote:

Wow, I missed a lot. *Reads*  sad  Mostly just code stuff that I don't understand. Where's new BYOB blocks!  tongue

Were you the one that uploaded two new BYOB sprites?


Yawn.

Offline

 

#850 2011-05-04 19:22:05

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

To save space would this be better:

YourLocalBlockLib wrote:

http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

http://www.weebly.com/uploads/5/4/1/3/5 … 942334.gif
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
How to add one of these blocks to Scratch:
I suggest visiting this excellent forum page. It has a full explanation from Billyedward. You can also look at this detailed explaination on the layout of blockspecs by ScratchReallyRocks.

To install a block importer in Scratch to automatically add a (downloadable) block for you, click here! But beware, this feature is untested!

Choose a block type to view, or scroll down this page to see more!

http://i53.tinypic.com/29wri81.jpg Motion [6]
http://i51.tinypic.com/2yvj4w5.jpg Control [20]
http://i54.tinypic.com/1555368.jpg Looks[13]
http://i55.tinypic.com/rc3i41.jpg Sensing[9]
http://i54.tinypic.com/9j0lcg.jpg Sound[2]
http://i56.tinypic.com/261km15.jpg  Operators [23]
http://i52.tinypic.com/2mi16w3.jpg  Pen [4]
http://i51.tinypic.com/21j38ra.jpg Variables  [6]
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
home

The only thing changed is the number of blocks in that category is there, then we can remove it from the other place.

Last edited by Pecola1 (2011-05-04 19:27:41)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

Board footer