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

#776 2011-07-16 15:20:33

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

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

So sorry :S

EDIT: I placed a warning message on the admin page now, so hopefully that will solve the problem till I work our what's wrong... What's bizzare is that it sometimes works and sometimes does not! That makes it really hard to say what's going wrong!

Last edited by sparks (2011-07-16 15:22:13)


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

Offline

 

#777 2011-07-16 15:24:44

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

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

Hmm, I was going to edit the code, but I was surprised to see that there wasn't really anything wrong!  sad

Offline

 

#778 2011-07-16 15:27:06

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

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

You looked at the code? Yes, the only explaination I can come up with is that the error is caused by what you did beforehand as it's all on one page.... maybe moving the about updater to a seperate page would do the trick? I could try that, since the fact that it works some of the time indicates that the table names and MySQL connections aren't typo'd.

P.S. what's with your sig? Are you selling your username?!

Last edited by sparks (2011-07-16 15:28:30)


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

Offline

 

#779 2011-07-16 15:51:22

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

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

I found out why: You need to set/change on line 41. $_POST[about] does not work. So the way you are doing it right now won't work. It has to be $_POST['about'] .
Change:

Code:

mysql_query("UPDATE aboutme SET text = '$_POST[about]'
                WHERE name = '$_SESSION[adminUsername]'");

To:

Code:

$aboutTxt = $_POST['about'];
$adminUser = $_POST['adminUsername'];
mysql_query("UPDATE aboutme SET text = '$aboutTxt'
                WHERE name = '$adminUser'");

You keep placing they $_POST vars in the MySQL query and that will almost guarantee problems. And the quotes are needed in the $_POST vars. I suggest getting all the $_POST data in vars at the beginning of the code. And not in the middle.


Btw: You should recode it so it checks a list of users if they are admin/mod, and don't put it directly into the code where it checks if you are an Admin/Mod. It can cause problems when adding new helpers.

----

I understand how they want to discourage the FTP details so I won't try any further.  tongue

Last edited by Magnie (2011-07-16 15:54:24)

Offline

 

#780 2011-07-16 16:12:24

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

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

Right, great, I will make the change, thanks very much!

I think rather than going for the "MySQL members list check" thing I'll just list members in a php page and include() it in. I'm not planning to add members often either  smile


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

Offline

 

#781 2011-07-16 16:47:51

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

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

Mmk, I'll test it.

---

Yep, it works!  big_smile

---

Or maybe not... Can't really tell.

Last edited by Magnie (2011-07-16 16:57:49)

Offline

 

#782 2011-07-16 16:57:54

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

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

... well pleased to hear it, I haven't applied any changes yet... This is what I mean by sometimes works!


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

Offline

 

#783 2011-07-16 17:22:44

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

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

Still not working!

Last edited by sparks (2011-07-16 18:41:45)


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

Offline

 

#784 2011-07-16 17:55:18

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

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

It's the same with $_SESSION vars too:
Wrong:

Code:

$result = mysql_query("SELECT * FROM aboutme
                WHERE name='$_SESSION[adminUsername]'");

Right:

Code:

$adminUser = $_SESSION['adminUsername'];
$result = mysql_query("SELECT * FROM aboutme
                WHERE name='$adminUser'");

Offline

 

#785 2011-07-16 18:12:08

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

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

Right. Got it! I think it works!


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

Offline

 

#786 2011-07-16 18:16:56

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

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

It seems to work, I like the update as well.  smile

Offline

 

#787 2011-07-16 18:29:33

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

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

What update? I'm working on a logout button now  tongue


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

Offline

 

#788 2011-07-16 18:32:00

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

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

The update where you login and then you have an option to change your "about me" page.

Offline

 

#789 2011-07-16 18:37:20

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

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

Alright, logging out works, that's mostly so I could check the "update about" page couldn't be used to change anything if you hadn't logged in  tongue


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

Offline

 

#790 2011-07-16 18:38:06

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

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

Hehe mmk.

Offline

 

#791 2011-07-16 18:40:19

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

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

I'm really looking forward to this front-end working. It's a shame that I have to be so secretive about the details but I can see where the scratch team are coming from  hmm


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

Offline

 

#792 2011-07-16 19:13:36

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

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

the About updater now works! Please log in and fill it in!


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

Offline

 

#793 2011-07-16 21:38:30

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

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

Doesn't seem to be updating for me.

Offline

 

#794 2011-07-17 01:25:41

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

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

sparks wrote:

P.S. what's with your sig? Are you selling your username?!

PF is running for mod.  wink

Magnie wrote:

Doesn't seem to be updating for me.

Me either.  sad

sparks wrote:

Sorry sci, the updater sometimes works and sometimes does not  hmm  I have no idea why and I'm trying to fix it. I can only recommend copying your changes to clipboard before posting, and then updating till the changes stick  sad

And I wrote it in a text editor and kept it there, because I know it's glitchy. ;P

Last edited by scimonster (2011-07-17 01:26:16)

Offline

 

#795 2011-07-17 11:30:35

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

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

At least all these problems with updating give me time to think of something to type.  tongue


Yawn.

Offline

 

#796 2011-07-21 11:48:29

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

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

Just wondering, hows the integration with the old website stuff and the new website going?


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#797 2011-07-21 11:52:35

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

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

IDK, we're sort of waiting on meowmeow to finish the front-end... Most of the pages aren't finished so there's not point moving them yet.


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

Offline

 

#798 2011-07-21 14:05:48

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

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

cool


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#799 2011-07-23 15:23:23

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

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

Okay, so how is work going on the site11 site everyone? And meowmeow55, any luck with that front-end?


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

Offline

 

#800 2011-07-25 12:59:13

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

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

I'm slowly moving pages across to the new site, it would be nice to see some other developers adding some code to the site11 site though!


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

Offline

 

Board footer