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

#876 2011-08-31 11:09:12

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

Re: Welcome to your local block library! - Website development thread.

Internet Explorer annoys me  sad

Last edited by sparks (2011-08-31 11:14:52)


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

Offline

 

#877 2011-08-31 11:12:27

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

Re: Welcome to your local block library! - Website development thread.

sparks wrote:

Internet Explorer makes my life a living *  sad

Careful of what you say here...

Offline

 

#878 2011-08-31 11:14:33

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

Re: Welcome to your local block library! - Website development thread.

Didn't realise that would offend some, sorry  hmm  I still dislike IE  sad


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

Offline

 

#879 2011-08-31 11:17:26

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

Re: Welcome to your local block library! - Website development thread.

sparks wrote:

Didn't realise that would offend some, sorry  hmm  I still dislike IE  sad

Any same person would.  tongue
And I never use it so I don't even know what makes it half bad...

It won't post! It's probably something to do with all the Parental Controls errors I've been getting today.

Offline

 

#880 2011-08-31 11:19:17

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

Re: Welcome to your local block library! - Website development thread.

I'm not able to post either.... I'm trying to see a pattern to work out what's causing it because there's nothing I can see in the code  hmm


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

Offline

 

#881 2011-08-31 13:28:28

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Welcome to your local block library! - Website development thread.

Guys, what can I do?  hmm

Offline

 

#882 2011-08-31 13:38:58

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

Re: Welcome to your local block library! - Website development thread.

You could take a look at why posting isn't working? It's driving me nuts!


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

Offline

 

#883 2011-08-31 22:49:25

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

Re: Welcome to your local block library! - Website development thread.

Sorry, but due to an extreme bout of laziness and then RL getting in the way, I did absolutely nothing on the uploader D:
*hides in shame*  tongue
I was working on this other project for a while (installer for a game mod), but I stopped working on that too  tongue
I'm really still interested in this, I just can't be committed to something for long, sorry D:
I'll do an odd job or two, but nothing big, 'cause I might not finish it--you've been warned!  tongue


Yawn.

Offline

 

#884 2011-09-01 06:30:02

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

Re: Welcome to your local block library! - Website development thread.

Well you have the site11 info, you could take a look at that, add bits and pieces  smile

Today I'm going to copy the pages from the scratchr domain across to the site11 one since we've decided on using the Scratch layout  smile

Oh, librarians and devs, if you log in with one of your users you should find that a link to the admin page now appears in your top bar for easy access  smile  I'm currently working on the comment approval page  smile

Last edited by sparks (2011-09-01 06:31:03)


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

Offline

 

#885 2011-09-01 07:08:17

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

Re: Welcome to your local block library! - Website development thread.

Woo! Commenting is working again! I hope I've found the cause.

EDIT: or not... Posts just don't always update. I have no idea why! This is annoying...

For those of you interested, I'll talk you through what I thought the problem was.

Firstly you have a comment space, an "add" button and a smiley tickbox. each one of these is counted as a "form element" and has a name. In the case of this form they are called "comment", "submit" and "smilies". When you click the submit button the form reloads the page but at the top of the page is a little "if" statement that checks to see if one of the elements has been set to anything.

Code:

if isset($_POST['submit']){
code
}

People who know C++ will see this as vaguely familiar.

The piece of code simply checks to see if the submit button has been pressed.

Now for some reason the submit button wasn't responding properly for this form (possibly because I replaced the regular submit button with a http://www.blocks.scratchr.org/add.bmp image.) So I simply got it to check if the comment space had been set instead. Seems to have worked!

Last edited by sparks (2011-09-01 07:17:27)


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

Offline

 

#886 2011-09-01 07:28:14

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

Re: Welcome to your local block library! - Website development thread.

sparks wrote:

Woo! Commenting is working again! I hope I've found the cause.

EDIT: or not... Posts just don't always update. I have no idea why! This is annoying...

For those of you interested, I'll talk you through what I thought the problem was.

Firstly you have a comment space, an "add" button and a smiley tickbox. each one of these is counted as a "form element" and has a name. In the case of this form they are called "comment", "submit" and "smilies". When you click the submit button the form reloads the page but at the top of the page is a little "if" statement that checks to see if one of the elements has been set to anything.

Code:

if isset($_POST['submit']){
code
}

People who know C++ will see this as vaguely familiar.

The piece of code simply checks to see if the submit button has been pressed.

Now for some reason the submit button wasn't responding properly for this form (possibly because I replaced the regular submit button with a http://www.blocks.scratchr.org/add.bmp image.) So I simply got it to check if the comment space had been set instead. Seems to have worked!

"With a 'Add' image"? D:
Yeah, it works now!  big_smile

Offline

 

#887 2011-09-01 07:41:15

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

Re: Welcome to your local block library! - Website development thread.

But not always! I have no idea what's up, sometimes it posts, sometimes it does not and I can't see a rule  hmm

Has the block site ever logged you off, by the way?


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

Offline

 

#888 2011-09-01 08:07:43

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

Re: Welcome to your local block library! - Website development thread.

sparks wrote:

Has the block site ever logged you off, by the way?

No, but I haven't spent tons of time on it... yet. xP

EDIT: Not posting now. Here's my comment:

So maybe it's the CSS then. Also, could you move the navbar to the left, maybe 15px? :3

On the admin comment review page, it would help if we could see the comment, but I suppose you'll get to that.  tongue  Also, how about auto-review for admins, because we wouldn't post anything bad, right? :-)

http://www.blocks.scratchr.org/smilies/smile.gif

Last edited by scimonster (2011-09-01 08:19:04)

Offline

 

#889 2011-09-01 08:32:03

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

Re: Welcome to your local block library! - Website development thread.

Autoreview for admins is a good idea. I've actually put a comment space on the admin page for librarian discussion - all posts there are auto validated.

Yes, the list there was just for me to check that the posts would display. Eventually they will appear as normal comments with all the info plus an piece of text telling you where the comment is and buttons to approve or "move to vault". Bad comments won't actually be deleted so we can go back to them if need be but are simply not shown anymore.


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

Offline

 

#890 2011-09-01 12:07:54

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

Re: Welcome to your local block library! - Website development thread.

You should make it so that the pages are stuff like /about.php, /search.php, /upload.php (note no trailing slash). This is so that the <h1><a href="index.php">Scratch</a></h1> will work.  smile

Offline

 

#891 2011-09-01 14:30:57

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

Re: Welcome to your local block library! - Website development thread.

Let me grammar cop the History section:

The Block Library started life as a forum thread in the Scratch Advanced Topics forum created by the Scratch user Sparks on the 15th of July, 2010. It consisted of a single post that contained marked sections for Scratch blocks. There were no images or ways to navigate. On the 19th of July, BYOB and Panther blocks were supported and several blocks had been shared. Several people pushed to get the library I-Topic'd (ITopiced) (a thread status that keeps a link to the thread at the top of the forum page). A "fossil" of the block library as it appeared on the 16th of August can be found neatly preserved in stickdude123's post.

On the 11th of September 2010 the Block Library was I-Topic'd (ITopiced) by the community moderator Coolstuff and to celebrate, Sparks spent several weeks redesigning the layout of the entire library through suggestions by Scratchers to make the library easier to browse and use including the splitting of the first post into one post per block category on the 16th of September and new graphic navigation (as well as the library header logo still used today) designed by nXIII.

By March Sparks was struggling to keep the library updated due to a huge flood of block submissions. On the 16th of March Coolstuff, fullmoon and Lightnin moved the I-Topic (ITopic) status from the old library thread to a new one created on a shared Scratch account called "YourLocalBlockLib", an account shared by Sparks, meowmeow55, Pecola1, SSBBM, TheSucessor and Scimonster.

On the 15th of July the library website was officially hosted and moved to the Scratch site (blocks.scratchr.org domain)  thanks to Andrés (Andr&eacute;s) and Amos from the Scratch Team.

Red means definite mistake, yellow is stuff that may be preferred, and green are my suggestions.  smile

Last edited by scimonster (2011-09-01 14:33:10)

Offline

 

#892 2011-09-02 12:03:44

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

Re: Welcome to your local block library! - Website development thread.

Cheers, Sci  smile  Will fix in a moment...


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

Offline

 

#893 2011-09-03 14:00:18

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

Re: Welcome to your local block library! - Website development thread.

Have you done it yet?
Also, for some reason my pic wasn't displaying on the admin page at one point.

Offline

 

#894 2011-09-03 17:19:50

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

Re: Welcome to your local block library! - Website development thread.

Fixed, and this entire site is a little odd really, sometimes it works, sometimes it does not. For a while the day before yesterday it couldn't seem to find the CSS stylesheets for all the pages for me...


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

Offline

 

#895 2011-09-04 02:38:41

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

Re: Welcome to your local block library! - Website development thread.

sparks wrote:

Fixed, and this entire site is a little odd really, sometimes it works, sometimes it does not. For a while the day before yesterday it couldn't seem to find the CSS stylesheets for all the pages for me...

Me too.

Offline

 

#896 2011-09-11 11:09:29

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

Re: Welcome to your local block library! - Website development thread.

I've nearly finished Panther block importing on the blocks site and I wrote a script to import the 60 blocks already into the library for me. However, it's not behaving as both the category and the code parts of the block are not being updated. Please take a look and see if you can spot a mistake!

Code:

<?php
include("connect.php");
mysql_query("TRUNCATE blocks");
mysql_query("ALTER TABLE blocks AUTO_INCREMENT=0");
$count = 0;
while ($count != 60){
    $count ++;
    $count2 = 0;
    $file = fopen("http://dl.dropbox.com/u/6273449/" . $count . ".txt", "r") or exit("Unable to open file!");
    while(!feof($file)){
        $count2 ++;
        if($count2 == 1){
            $creator = fgets($file);
        }
        if($count2 == 2){
            $name = fgets($file);
        }
        if($count2 == 3){
            $type = fgets($file);
        }
        if($count2 == 4){
            $colour = fgets($file);
            if(strpos(fgets($file), '#4A6CD4') != 0){
                $category = 'Motion';
            }
            if(strpos(fgets($file), '#E6A822') != 0){
                $category = 'Control';
            }
            if(strpos(fgets($file),  '#8C52E7') != 0){
                $category = 'Looks';
            }
            if(strpos(fgets($file), '#0494DC') != 0){
                $category = 'Sensing';
            }
            if(strpos(fgets($file), '#CE4ADE') != 0){
                $category = 'Sound';
            }
            if(strpos(fgets($file), '#63C610') != 0){
                $category = 'Operators';
            }
            if(strpos(fgets($file), '#00A57B') != 0){
                $category = 'Pen';
            }
            if(strpos(fgets($file), '#F77318') != 0){
                $category = 'Variables';
            }
            if(strpos(fgets($file), '#297BC6') != 0){
                $category = 'Files';
            }
            if(strpos(fgets($file), '#424242') != 0){
                $category = 'Colors';
            }
        }
        if($count2 == 5){
            $code = fgets($file);
        }
    }
    $sharer = 'sparks';
    $comment = '';
    echo $count2;
    
    
    mysql_query("INSERT INTO `blocks` (id, name, type, category, code, creator, sharer, comment, status, colour)
    VALUES ('', '$name', '$type', '$category', '$code', '$creator', '$sharer', '$comment', 'approved', '$colour')");
    fclose($file);
}

?>

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

Offline

 

#897 2011-09-13 00:32:39

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

Re: Welcome to your local block library! - Website development thread.

A possible answer for why all the intermittent stuff is going on: Perhaps there's connection issues to the MySQL database? That could explain why none of the code seems to be wrong but things just don't update all the time. That doesn't explain how it couldn't find the CSS stylesheets that one time though... O_o


Yawn.

Offline

 

#898 2011-09-13 04:33:18

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

Re: Welcome to your local block library! - Website development thread.

I am beginning to suspect a similar problem and I think if you're voicing it too I will contact Andres and see what he says. I really don't see why a piece of code such as my commenting system can work perfectly on my site and then only work sometimes on this one...

However, the code above is still writing all but the code and category lines to the database so there is something wrong there I think...


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

Offline

 

#899 2011-09-15 05:24:22

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

Re: Welcome to your local block library! - Website development thread.

I'm not sure what I'm doing with Scratch blocks on the site. Am I leaving them out until .block files are done? (How is research and development on that front, btw?) Panther blocks are done, though the search function isn't I'll need to take a look at that at some point.

Unfortunately theSuccessor seems to have vanished which means our php block display system is half-finished (still can't display arguments).

If Scratch blocks are being added to the block library in their current text format I want to increase the detail for installation, e.g. full browser paths for all the code required by the block as some (especially control blocks) can be difficult to install properly with the amount of information currently given - I'd much rather we get the .block files working though  tongue


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

Offline

 

#900 2011-09-15 05:54:21

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

Re: Welcome to your local block library! - Website development thread.

Oh GREAT. The Panther block submission form is yet another example of the MySQL connection SOMETIMES working :'(


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

Offline

 

Board footer