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.
Offline
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.
![]()
Only to a certain extent.
Offline
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
Offline
For the SQL test, it seems to always succeed the first time and fail the second...

Offline
Greenatic wrote:
For the SQL test, it seems to always succeed the first time and fail the second...
![]()
Firewall problem?
Offline
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
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)
Offline
you forgot cursor:pointer
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
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
![]()
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?
div.header a
Offline
/*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*/
}Offline
Looking good so far
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
Is there any sort of roadmap you have plotted out for how this thing is going to evolve?
Offline
I noticed you added tabs
.
For share.php, try this:
<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>Offline
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?
Offline
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!
Oh, and the links on the home page seem to be broken...?

Offline
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
Meowmeow, there's no map at the moment, and I'll fix the grammar mistake!
Offline
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![]()
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.

Offline
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

Offline
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)
Offline
Yay!
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!
Offline
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!
Offline
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
/* * *** 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)
Offline
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
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.
I fixed it for you, though.
Offline