Alright, so I thought I would go ahead and detail a rough plan for the library site.
I'm going to start trying out this new wood look for the site, play around with that a bit and try and find a way of open-sourcing the pages as I develop them (minus any passwords). Meanwhile, the log book will hopefully end up being a place that librarians can actually edit certain pages, PHP and all! As well as upload images. I can't give librarians full access because Andres doesn't want me to give full access to anyone for security reasons, so creating full access for some non-essential pages is a good plan, I think and should speed development.
Offline
anyone have an idea for the library's 3-part slogan? (Like imagine, program, share)
I've also updated the home page with the new look!
Last edited by sparks (2012-04-16 16:21:44)
Offline
sparks wrote:
I'm going to [...] try and find a way of open-sourcing the pages as I develop them (minus any passwords).
I would suggest using some source code repository then have an install.php file which creates the config.php file. So then you upload the source to the repository and the website after each update, but when you update the website, it'll just replace all the files on their, keeping the config.php file safe from any overwrites and prying eyes.
Offline
ProgrammingFreak wrote:
sparks wrote:
Okay, thanks for the input!
How about http://dl.dropbox.com/u/22935223/woody2.PNG
Hmm, I'm not sure that I agree with Trocket that contrast is a bad thing... Then again I'm not really an artist, so what do other people think? Should I reduce it? I basically did it cos I wanted a width for the site that most screens can fit (I didn't go 800*600 but went up to the 1024*768). Then I needed some sort of background to that fitting box![]()
I like the look of this. And yes, sometimes contrast is bad, but I don't think it applies here.
![]()
+1 to the design and ProgrammingFreak's statement. I think it looks amazing!

Offline
Magnie wrote:
sparks wrote:
I'm going to [...] try and find a way of open-sourcing the pages as I develop them (minus any passwords).
I would suggest using some source code repository then have an install.php file which creates the config.php file. So then you upload the source to the repository and the website after each update, but when you update the website, it'll just replace all the files on their, keeping the config.php file safe from any overwrites and prying eyes.
Could you explain in a little more detail what you mean? I'm a little confused. I already have database connection code in a connect.php file. I was going to work out a way to write code to allow direct-editing of files on the system, but then limit that to certain files by hand.
Offline
sparks wrote:
Magnie wrote:
sparks wrote:
I'm going to [...] try and find a way of open-sourcing the pages as I develop them (minus any passwords).
I would suggest using some source code repository then have an install.php file which creates the config.php file. So then you upload the source to the repository and the website after each update, but when you update the website, it'll just replace all the files on their, keeping the config.php file safe from any overwrites and prying eyes.
Could you explain in a little more detail what you mean? I'm a little confused. I already have database connection code in a connect.php file. I was going to work out a way to write code to allow direct-editing of files on the system, but then limit that to certain files by hand.
I suggest you store the content in a mysql database, through experience I have discovered this is an effective way of doing this - then again, they both have their pros and cons.
On an unrelated note, I made a little mock up for the kind of thing that I could imagine the site looking like (I took into account the wood idea).
Click for a larger version
Any thoughts and feedback are appreciated.
I also followed your advice of setting the width of the centre section where the content would lie to 1024, the sides would just be a tileable image and would obviously scale depending on the user's monitor size.
Last edited by rookwood101 (2012-04-16 17:45:11)
Offline
Hmmm In general I like it! I think it's a little too dark, a lighter wood might look friendlier but it's a good design!
Of course storing the page code in an SQL database is an excellent idea! Oh, wait, now I remember why I didn't do that; SQL isn't working!
Offline
sparks wrote:
Hmmm In general I like it! I think it's a little too dark, a lighter wood might look friendlier but it's a good design!
Of course storing the page code in an SQL database is an excellent idea! Oh, wait, now I remember why I didn't do that; SQL isn't working!
But then again for the site to work as intended at all, SQL would need to be working so the end product could hopefully do this.
Offline
That's true. I really need to get it working. So far I have been using arrays for things like librarian lists, which is fine, but not writeable
It's getting late here, but I'll see if I can devise a test thingy to check how well the SQL database is working now... give me 5 mins....
Last edited by sparks (2012-04-16 17:56:21)
Offline
sparks wrote:
That's true. I really need to get it working. So far I have been using arrays for things like librarian lists, which is fine, but not writeable
![]()
It's getting late here, but I'll see if I can devise a test thingy to check how well the SQL database is working now... give me 5 mins....
Have you tried to connect to another mysql database? I could give you a test mysql account on my server if you want.
Offline
sparks wrote:
Magnie wrote:
sparks wrote:
I'm going to [...] try and find a way of open-sourcing the pages as I develop them (minus any passwords).
I would suggest using some source code repository then have an install.php file which creates the config.php file. So then you upload the source to the repository and the website after each update, but when you update the website, it'll just replace all the files on their, keeping the config.php file safe from any overwrites and prying eyes.
Could you explain in a little more detail what you mean? I'm a little confused. I already have database connection code in a connect.php file. I was going to work out a way to write code to allow direct-editing of files on the system, but then limit that to certain files by hand.
Like the install.php file would create the connect.php file. So this is what happens: You write some code on your computer > It gets uploaded to blocks.scratchr.org and a source code repository (where we can see the code) > You run the install.php on the blocks.scratchr.org website and then use your site a bit then find an error > You write a fix on your computer then upload the fixed version to your website and the repository, keeping the database info hidden but still being able to give out the code.
Offline
FINALLY!
So it turns out javascript functions can't have the same name as an element on the page...
anyway, please take the test now installed on the http://blocks.scratchr.org/index.php!!!!!
I've tried it a few times and it worked fine. The button uses AJAX to increment a database value and then report the result, checking with the user to see if it worked.
Offline
Got rid of the stupid addition thing, it might as well calculate itself, so you just get a success/failure message now. I'm going to bed. Tired. Sleep. You guys test it though!!!!
Hmm, I realise there's still a flaw in this. you will get an error message if someone clicks between you loading the page and you clicking the button. I'll fix it tomorrow, but please report any errors all the same. There will be two numbers at the end of the message like 16:17 - please reference those numbers
Last edited by sparks (2012-04-16 18:51:18)
Offline
21:20 error
Last edited by Greenatic (2012-04-16 19:06:37)

Offline
Number: 23
Hooray! Everything worked fine, thank you! You can try this again by fully refreshing the page!
Seems to work fine for me (FF 11)!

Offline
I just got an error:
29:28
Just so you know, the first number is the number taken from the database beforehand + 1 and the second number is the number read from the database after the update. So if it's less, the update hasn't happened.
So, I may have dreamed of a solution last night to this problem... Well, I say solution, it's not much better but we could effectively do what I did for this test.
Using AJAX, a javascript code can try to update the database, then check for success like this one does. If there is an error it can try again, with a max of say, 5 tries. After that it displays an error message to the user saying the database couldn't be reached (with a try again button) and a button next to it saying "email instead". This would send us some SQL code we can put directly into the database, adding their block manually.
However, that's gonna be picky, a pain and not tidy at all. Rookwood offered to let me use one of his databases, considering mine failed to connect altogether, so I want to give that a try too first...
Last edited by sparks (2012-04-17 04:45:51)
Offline
Sparks, if you use your scratch login on: http://mc.lasthorizon.tk/findthepass.php then it should tell you the details for the database I set up for you.
Offline
sparks wrote:
Okay, got it, thanks
have you set up external permissions for the database? It it will need to allow external access from blocks.scratchr.org
Yeh I set it to allow connections from anywhere.
Offline
How about an infinite loop until the update works? From what I've heard here, it will work eventually

Offline
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?
Offline
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.

Offline
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.
+1
Offline