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

#1026 2012-04-21 15:53:05

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

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

Greenatic wrote:

sparks wrote:

I want to avoid an infinite loop, but certainly several tries is possible and may solve the problem...

Does anyone have any ideas for a library-themed login box? There are a few ideas I have but IDK how good they would look. You could just have a normal login box with a wood background, you could have parchment and hide the text boxes above dotted lines on a piece of paper so it looks like you're signing in... The login details could be entered into the string fields of a block... suggestions, thoughts?

IMO, first let's get it working, then worry about design.

Design is first, then coding. You have to know how it looks to code it.  wink

Offline

 

#1027 2012-04-21 16:27:10

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

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

Magnie wrote:

Greenatic wrote:

sparks wrote:

I want to avoid an infinite loop, but certainly several tries is possible and may solve the problem...

Does anyone have any ideas for a library-themed login box? There are a few ideas I have but IDK how good they would look. You could just have a normal login box with a wood background, you could have parchment and hide the text boxes above dotted lines on a piece of paper so it looks like you're signing in... The login details could be entered into the string fields of a block... suggestions, thoughts?

IMO, first let's get it working, then worry about design.

Design is first, then coding. You have to know how it looks to code it.  wink

Only to a certain extent.


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

Offline

 

#1028 2012-04-21 17:01:12

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

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

Hmm. Yes, only to a certain extent. However, my question about the login box, while perhaps not a necessary one at this point still stands if anyone has any cool ideas for it  wink


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

Offline

 

#1029 2012-04-22 20:22:59

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

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

For the SQL test, it seems to always succeed the first time and fail the second...   hmm

Offline

 

#1030 2012-04-23 09:35:34

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

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

Greenatic wrote:

For the SQL test, it seems to always succeed the first time and fail the second...   hmm

Firewall problem?  hmm

Offline

 

#1031 2012-04-23 10:07:58

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

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

Really? It's failed once for me and I've tried it about 50 times...


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

Offline

 

#1032 2012-05-09 08:32:17

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

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

Well I finally had a moment to make a start on the navigation bar for the Block Library site. I'd appreciate feedback and suggestions for improvement as I don't think it looks quite right. Alternate looks for the search bar would also be welcome  smile

Also suggestion for good wording for the links, and which links to actually include there would be good. I was having a lot of trouble getting the navigation buttons to link without looking like hyperlinks (coloured and underlined) without changing the link style for the whole site. I ended up using javascript to create the links. Does anyone know how I can apply link styles to one div?

Last edited by sparks (2012-05-09 08:33:52)


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

Offline

 

#1033 2012-05-09 08:49:20

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

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

you forgot cursor:pointer  tongue
and google is your friend http://stackoverflow.com/questions/796087/make-a-div-into-a-link
(or use the button tag)

Last edited by roijac (2012-05-09 10:28:50)

Offline

 

#1034 2012-05-09 09:52:40

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

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

sparks wrote:

Well I finally had a moment to make a start on the navigation bar for the Block Library site. I'd appreciate feedback and suggestions for improvement as I don't think it looks quite right. Alternate looks for the search bar would also be welcome  smile

Also suggestion for good wording for the links, and which links to actually include there would be good. I was having a lot of trouble getting the navigation buttons to link without looking like hyperlinks (coloured and underlined) without changing the link style for the whole site. I ended up using javascript to create the links. Does anyone know how I can apply link styles to one div?

Code:

div.header a

tongue

Offline

 

#1035 2012-05-09 10:50:23

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

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

Code:

/*this is css*/
.button a:link {
  color: white;/*or whatever*/
  text-decoration: none;/*removes underline*/
}
.button a:link {
  color: white;/*or whatever*/
  text-decoration: none;/*removes underline*/
}
.button a:hover {
  color: white;/*or whatever*/
  text-decoration: none;/*removes underline*/
}
.button a:visited {
  color: white;/*or whatever*/
  text-decoration: none;/*removes underline*/
}
.button:hover {
/*stuff*/
}
.button {
/*stuff*/
}

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

Offline

 

#1036 2012-05-09 14:55:15

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

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

Thanks for the suggestions, I'll work on that!

Suggestions for names and looks?


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

Offline

 

#1037 2012-05-09 22:14:11

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

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

Looking good so far  smile

The only complaints that I have are silly little spelling/grammar things like the fact that the L in the title of the page isn't capitalized  tongue

Is there any sort of roadmap you have plotted out for how this thing is going to evolve?


Yawn.

Offline

 

#1038 2012-05-09 22:56:07

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

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

I noticed you added tabs  big_smile .
For share.php, try this:

Code:

<html>

<head>

<title>Submit your block!</title>

<script type="text/javascript">

function typeScratch() {

  var buttons = document.forms[0].getElementsByTagName('input');

  buttons[0].click();

  document.getElementById('scratchInputForm').style.display = 'block';

  document.getElementById('BYOBInputForm').style.display = 'none';

  document.getElementById('pantherInputForm').style.display = 'none';

}

function typeBYOB() {

  var buttons = document.forms[0].getElementsByTagName('input');

  buttons[1].click();

  document.getElementById('scratchInputForm').style.display = 'none';

  document.getElementById('BYOBInputForm').style.display = 'block';

  document.getElementById('pantherInputForm').style.display = 'none';

}

function typePanther() {

  var buttons = document.forms[0].getElementsByTagName('input');

  buttons[2].click();

  document.getElementById('scratchInputForm').style.display = 'none';

  document.getElementById('BYOBInputForm').style.display = 'none';

  document.getElementById('pantherInputForm').style.display = 'block';

}

</script>

</head>

<body>

<h1>Submit your block!</h1>

<div id="seltype">

<h2>Choose a block type:</h2>

<form enctype="multipart/form-data">

<p onclick="typeScratch();"><input type="radio" name="blocktype" value="scratch" />Scratch Block</p>

<p onclick="typeBYOB();"><input type="radio" name="blocktype" value="BYOB" />BYOB Block</p>

<p onclick="typePanther();"><input type="radio" name="blocktype" value="panther" />Panther Block</p>

</form>

</div>

<div id="scratchInputForm" style="display: none;">

<form>


<h4>enter your blockspec.</h4>


<input type="text" name="blockspec" value="e.g. say %s" />


<br />


<h4>Upload a picture of your block. <a href="www.linktohowtosaveblockpicture.com">what's this?</a> <br />


<input type="file" accept="image/*" name="blockPic" value="Upload" />


<h4> Which catagory does your block belong to?</h4>


<select name="Catagory">


<option value="Motion">Motion</option>


<option value="Control">Control</option>


<option value="Looks">Looks</option>


<option value="Sensing">Sensing</option>


<option value="Sound">Sound</option>


<option value="Operators">Operators</option>


<option value="Pen">Pen</option>


<option value="Variables">Variables</option>


</select>


<br />


<h4>What type of block is it?</h4>


<input type="radio" name="type" value="-" /> Stack image here<br />


<input type="radio" name="type" value="r" /> Reporter image here<br />


<input type="radio" name="type" value="b" /> Boolean image here<br />


<input type="radio" name="type" value="c" /> C loop image here<br />


<h4>Who created this block?</h4>


<input type="text" value="Scratch username" />


<br />


<h4>Enter the code for your block. Test it before you submit it to make sure it works If the code needs to</h4> 


<h4>go in more than one place, mark the locations of the code clearly.</h4>


<textarea rows="10" cols="50">


e.g. ^ t1


</textarea>


<br />


<br />


<input type="submit" value="Submit block" />


</form>


</div>

<div id="BYOBInputForm" style="display: none;">

<form enctype="multipart/form-data">


<h4>Upload a picture of your block. <a href="www.linktohowtosaveblockpicture.com">what's this?</a> <br /></h4>


<input type="file" accept="image/*" name="blockPic" value="Upload" />


<br />


<h4>Upload a picture of the blocks that make up your block. <a href="www.linktohowtosaveblockpicture.com">what's this?</a> <br /></h4>


<input type="file" accept="image/*" name="blockStructure" value="Upload" />


<br />


<h4> Which catagory does your block belong to?</h4>


<select name="Catagory">


<option value="Motion">Motion</option>


<option value="Control">Control</option>


<option value="Looks">Looks</option>


<option value="Sensing">Sensing</option>


<option value="Sound">Sound</option>


<option value="Operators">Operators</option>


<option value="Pen">Pen</option>


<option value="Variables">Variables</option>


<option value="Other">Other</option>


</select>


<br />


<h4>What type of block is it?</h4>


<input type="radio" name="type" value="-" /> Stack image here<br />


<input type="radio" name="type" value="r" /> Reporter image here<br />


<input type="radio" name="type" value="b" /> Boolean image here<br />


<input type="radio" name="type" value="c" /> C loop image here<br />


<h4>Who created this block?</h4>


<input type="text" value="Scratch username" />


<br />


<br />


<input type="submit" value="Submit block" />


</form>


</div>

<div id="pantherInputForm" style="display: none;">

<form enctype="multipart/form-data">


<h4>enter your blockspec.</h4>


<input type="text" name="blockspec" value="e.g. say $String$" />


<br />


<h4>Upload a picture of your block. <a href="www.linktohowtosaveblockpicture.com">what's this?</a> <br />


<input type="file" name="blockPic" value="Upload" />


<h4> Which catagory does your block belong to?</h4>


<select name="Catagory">


<option value="Motion">Motion</option>


<option value="Control">Control</option>


<option value="Looks">Looks</option>


<option value="Sensing">Sensing</option>


<option value="Sound">Sound</option>


<option value="Operators">Operators</option>


<option value="Pen">Pen</option>


<option value="Variables">Variables</option>


<option value="Files">Files</option>


<option value="Colors">Colors</option>


<option value="Other">Other</option>


</select>


<br />


<h4>What type of block is it?</h4>


<input type="radio" name="type" value="-" /> Stack image here<br />


<input type="radio" name="type" value="r" /> Reporter image here<br />


<input type="radio" name="type" value="b" /> Boolean image here<br />


<input type="radio" name="type" value="c" /> C loop image here<br />


<h4>Who created this block?</h4>


<input type="text" value="Scratch username" />


<br />


<h4>Enter the code for your block. Test it before you submit it to make sure it works.</h4>


<textarea rows="10" cols="50">


e.g. ^ t1


</textarea>


<br />


<br />


<input type="submit" value="Submit block" />


</form>


</div>

</body>

</html>

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

Offline

 

#1039 2012-05-10 16:13:45

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

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

Uhhhmm. You know the Click Me thing, that's at the bottom of the main page? The first time I click it, it says "OK, everything worked fine" - but when I refresh and click it again it errors, and every time i do it again, it errors - Was this meant to be for debugging purposes?


I'm back.
Maybe.

Offline

 

#1040 2012-05-10 18:04:12

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

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

DigiTechs wrote:

Uhhhmm. You know the Click Me thing, that's at the bottom of the main page? The first time I click it, it says "OK, everything worked fine" - but when I refresh and click it again it errors, and every time i do it again, it errors - Was this meant to be for debugging purposes?

That's exactly the problem I was having!   yikes

Oh, and the links on the home page seem to be broken...?   hmm

Offline

 

#1041 2012-05-10 18:07:45

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

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

Thanks for the feeback, guys!

The links aren't broken, I just haven't made the pages yet. I'll be making them soon, and hopefully be creating an editing system for librarians to help with editing certain pages.

The button on the home page is a test, yes, and the error is something that different people seem to get more or less frequently and no one has a clue why  tongue

Meowmeow, there's no map at the moment, and I'll fix the grammar mistake!


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

Offline

 

#1042 2012-05-10 18:10:56

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

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

sparks wrote:

Thanks for the feeback, guys!

The links aren't broken, I just haven't made the pages yet. I'll be making them soon, and hopefully be creating an editing system for librarians to help with editing certain pages.

The button on the home page is a test, yes, and the error is something that different people seem to get more or less frequently and no one has a clue why  tongue

Meowmeow, there's no map at the moment, and I'll fix the grammar mistake!

I'm starting to suspect the problem is not in the code itself.  Perhaps scratchr.org or the database is blocking some connections?  I don't know...but if the problem was in the code, then we should have found it long ago.   hmm

Offline

 

#1043 2012-05-10 18:12:59

danwoodski
Scratcher
Registered: 2009-12-23
Posts: 100+

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

I don't know if this will help with your debugging, but I have never gotten the error before, and I have tried refreshing the page multiple times on the same day, and various days over the past couple weeks.  I am currently using Chrome 18, although I used to use FF a week ago (it broke now...), and I am using Win XP Pro.
Your MySql problems most likely have nothing to do with that, but you never know  smile


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://dl.dropbox.com/u/12506914/Pics/p2e-2.png&amp;link2=http://dl.dropbox.com/u/12506914/Pics/ms.png&amp;link3=http://dl.dropbox.com/u/12506914/Pics/block%20lib.png
Starting to move on to other languages, but I'll still be around from time to time  smile

Offline

 

#1044 2012-05-11 14:11:01

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

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

Well, I've finally added the pages linked in the nav bar.

EXCITING NEWS! Libarians and developers can now edit certain pages! Scroll to the bottom and click the "admin" link to be taken the the log book.

scimonster, SSBBM, Pecola1, sparks, meowmeow55, Greenatic and Thesuccessor have editing power.

The editor will eventually have change logs.

Last edited by sparks (2012-05-11 14:11:24)


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

Offline

 

#1045 2012-05-12 17:04:55

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

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

Yay!  big_smile

I updated the home page to fix a sentence fragment, and I'm looking around the other pages. Plus, I can copy and paste to/from Notepad++ for full syntax highlighting!  big_smile


Yawn.

Offline

 

#1046 2012-05-12 17:09:47

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

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

Glad it works, meowmeow55 and thanks for editing!

Would it be possibly for you to add a "change log" to the top of any page you change in the PHP section with the other information? I had forgotten to add it, and it means I don't accidentally overwrite a minor change I don't spot!


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

Offline

 

#1047 2012-05-12 21:23:06

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

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

sparks wrote:

Glad it works, meowmeow55 and thanks for editing!

Would it be possibly for you to add a "change log" to the top of any page you change in the PHP section with the other information? I had forgotten to add it, and it means I don't accidentally overwrite a minor change I don't spot!

Sure! In fact, I'll go add something to all the files right now so someone doesn't forget to add it.

Edit: Done  smile

Code:

/*
* *** CHANGELOG ***
* Add your name, the date and time (including timezone!), and a short description of your changes
* at the top of the list here each time you modify this file so that the changes can be tracked.
* Don't forget to add your name to the contributors list above if it isn't there already!
* Example:
* - Changed something - NoOne, 1/1/70 00:00 GMT

*/

Last edited by meowmeow55 (2012-05-12 21:48:51)


Yawn.

Offline

 

#1048 2012-05-13 07:57:07

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

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

The "Share" page has the following text:

The share page is currently being worked on so don't be surprised when the form does not work! It won't don't bother trying!

That last sentence is grammatically incorrect.  I'm changing it to "Don't bother trying!".

Offline

 

#1049 2012-05-13 09:47:40

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

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

Greenatic wrote:

The "Share" page has the following text:

The share page is currently being worked on so don't be surprised when the form does not work! It won't don't bother trying!

That last sentence is grammatically incorrect.  I'm changing it to "Don't bother trying!".

You added your change at the bottom of the changelog, when it said to add at the top.  tongue
I fixed it for you, though.


Yawn.

Offline

 

#1050 2012-05-13 10:08:13

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

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

hi devs, maybe you should use two spans instead of the one category span to align the second row  smile

Offline

 

Board footer