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

#351 2011-01-22 07:28:06

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

I'll modify my mockup:

<head> code(html):

<script type="text/javascript" src="ZeroClipboard.js"></script>
<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript">
var clip = null;
$(document).ready(function () {
  // setup single ZeroClipboard object for all our elements
  clip = new ZeroClipboard.Client();
  clip.setHandCursor(true);
  // assign a common mouseover function for all elements using jQuery
  $('div.copybutton').mouseover(function () {
  // set the clip text to our innerHTML
  var cliptext = document.getElementById(this.id + "text");
  clip.setText(cliptext.innerHTML);
  // reposition the movie over our element
  // or create it if this is the first time
  if (clip.div) {
    clip.receiveEvent('mouseout', null);
    clip.reposition(this);
  }
  else clip.glue(this);
  // gotta force these events due to the Flash movie
  // moving all around.  This insures the CSS effects
  // are properly updated.
  clip.receiveEvent('mouseover', null);
  });
});
$('div.comments').hide().css('display', 'block');
$('div.commentbutton').click(function () {
$('#' + this.id + 'comments').slideToggle('fast');
});
</script>

PHP code:

//loop through all block library results, printing out copy buttons as we go:
//echo block code here(eg. echo $code)
echo '<div id="' . $i . '" style="padding:0px; width:16; height:16;" class="copybutton"><img src="page_white_copy.png" /></div>';
echo '<div id="' . $i . 'text" style="display:none;">' . $copy . '</div>';
echo '<div id="' . $i . 'cb" class="commentbutton">Show/hide comments</div>';
echo '<div id="' . $i . 'cbcomments" class="comments" style="display:none;">' . $comments . '</div>';
// with $i being the loop iteration count, $copy being the code to copy and $comments being the comment code.
//finish loop

Yay! 15 Pages!
Anyway, It hasn't been tested.

Last edited by comp500 (2011-01-22 10:52:53)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#352 2011-01-22 07:30:23

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

ProgrammingFreak wrote:

You don't have to do it right now. Its not for this project...not yet. I was working on another project and was wondering if you could do it...  smile

Oh. I did. I'll tell you all the code when I finish it.  smile

Last edited by comp500 (2011-01-22 07:30:40)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#353 2011-01-22 07:30:39

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

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

Daffy22 wrote:

Maybe someone could make the success page too?  smile

does that just mean the news page?

Offline

 

#354 2011-01-22 07:31:26

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

ProgrammingFreak wrote:

Daffy22 wrote:

Maybe someone could make the success page too?  smile

does that just mean the news page?

I think he means the page you get to when your block is submitted.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#355 2011-01-22 07:33:27

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

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

comp500 wrote:

ProgrammingFreak wrote:

Daffy22 wrote:

Maybe someone could make the success page too?  smile

does that just mean the news page?

I think he means the page you get to when your block is submitted.

ok.

Offline

 

#356 2011-01-22 07:33:50

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

ProgrammingFreak wrote:

comp500 wrote:

ProgrammingFreak wrote:


does that just mean the news page?

I think he means the page you get to when your block is submitted.

ok.

smile


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#357 2011-01-22 07:40:15

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

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

The ftp details aren't working...

Offline

 

#358 2011-01-22 07:47:10

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

ProgrammingFreak wrote:

The ftp details aren't working...

:\ I don't know. Ask Daffy22.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#359 2011-01-22 09:38:25

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

More updates from me:
I found TextLimiter, a plugin for jquery that limits the amount of text entered, and I made a nice add comment image:
http://img163.imageshack.us/img163/7281/addcomment.gif

Edit: I can modify TextLimiter so that it says something/something instead of something characters remaining.

Last edited by comp500 (2011-01-22 10:32:11)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#360 2011-01-23 04:26:35

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

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

comp500 wrote:

More updates from me:
I found TextLimiter, a plugin for jquery that limits the amount of text entered, and I made a nice add comment image:
http://img163.imageshack.us/img163/7281/addcomment.gif

Edit: I can modify TextLimiter so that it says something/something instead of something characters remaining.

ok.  smile
What will the limit be? Should there be a limit?  hmm


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#361 2011-01-23 08:32:20

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

Daffy22 wrote:

comp500 wrote:

More updates from me:
I found TextLimiter, a plugin for jquery that limits the amount of text entered, and I made a nice add comment image:
http://img163.imageshack.us/img163/7281/addcomment.gif

Edit: I can modify TextLimiter so that it says something/something instead of something characters remaining.

ok.  smile
What will the limit be? Should there be a limit?  hmm

scratch has one.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#362 2011-01-23 11:44:33

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

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

comp500 wrote:

Daffy22 wrote:

comp500 wrote:

More updates from me:
I found TextLimiter, a plugin for jquery that limits the amount of text entered, and I made a nice add comment image:
http://img163.imageshack.us/img163/7281/addcomment.gif

Edit: I can modify TextLimiter so that it says something/something instead of something characters remaining.

ok.  smile
What will the limit be? Should there be a limit?  hmm

scratch has one.

because they don't have unlimited web space, we do  tongue


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#363 2011-01-23 11:53:26

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

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

Daffy22 wrote:

comp500 wrote:

Daffy22 wrote:

ok.  smile
What will the limit be? Should there be a limit?  hmm

scratch has one.

because they don't have unlimited web space, we do  tongue

It's just a few hundred bytes per comment! Sheesh! (And this will probably get way less traffic than the Scratch site, anyway.) I think the main purpose of a limit would be to stop spammers that come along and post giant comments that have no purpose except to clutter up the screen. Maybe the limit should be 1000 characters? Or should it be 500 like the Scratch site? If this doesn't get any spammers for a while after it starts functioning properly, maybe the limit could be removed.


Yawn.

Offline

 

#364 2011-01-23 12:07:31

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

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

meowmeow55 wrote:

Daffy22 wrote:

comp500 wrote:


scratch has one.

because they don't have unlimited web space, we do  tongue

It's just a few hundred bytes per comment! Sheesh! (And this will probably get way less traffic than the Scratch site, anyway.) I think the main purpose of a limit would be to stop spammers that come along and post giant comments that have no purpose except to clutter up the screen. Maybe the limit should be 1000 characters? Or should it be 500 like the Scratch site? If this doesn't get any spammers for a while after it starts functioning properly, maybe the limit could be removed.

ok, limit it to 1000 characters but first we need a comment script? I'd prefer file based and in php. Could someone make that? lets persume that each blocks spec is the name. So for each block there will be a txt file called $spec.txt okay?  smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#365 2011-01-24 02:31:56

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

Daffy22 wrote:

meowmeow55 wrote:

Daffy22 wrote:


because they don't have unlimited web space, we do  tongue

It's just a few hundred bytes per comment! Sheesh! (And this will probably get way less traffic than the Scratch site, anyway.) I think the main purpose of a limit would be to stop spammers that come along and post giant comments that have no purpose except to clutter up the screen. Maybe the limit should be 1000 characters? Or should it be 500 like the Scratch site? If this doesn't get any spammers for a while after it starts functioning properly, maybe the limit could be removed.

ok, limit it to 1000 characters but first we need a comment script? I'd prefer file based and in php. Could someone make that? lets persume that each blocks spec is the name. So for each block there will be a txt file called $spec.txt okay?  smile

okay, 1000 then, could we then do Javascript and PHP together?


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#366 2011-01-24 16:37:24

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

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

k, so what do i do?

Offline

 

#367 2011-01-24 16:41:53

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

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

oh wait I thought i was supposed to do the homepage. are you sure about that?

Offline

 

#368 2011-01-25 02:51:29

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

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

ProgrammingFreak wrote:

oh wait I thought i was supposed to do the homepage. are you sure about that?

yes  smile  (do you have dreamweaver? It might help) remember to download the template from the server. (template.php)


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#369 2011-01-25 03:20:40

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

bump.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#370 2011-01-27 02:14:34

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

bumpp


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#371 2011-02-06 09:06:37

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

Come on!!


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#372 2011-02-06 09:57:29

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

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

You know what I found? You might already know about this but there's something called firebug that lets you view and edit webpages as you view them in your browser!

Firefox addon
built into Chrome

no idea about IE, not avaliable for Mac, I don't think.


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

Offline

 

#373 2011-02-06 14:48:57

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

sparks wrote:

You know what I found? You might already know about this but there's something called firebug that lets you view and edit webpages as you view them in your browser!

Firefox addon
built into Chrome

no idea about IE, not avaliable for Mac, I don't think.

Of course I know. Bet you didn't know there is a firebug lite extension for chrome too!!


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#374 2011-02-11 02:27:53

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

bump


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#375 2011-02-13 03:45:18

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

bump


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

Board footer