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)
Offline
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...
![]()
Oh. I did. I'll tell you all the code when I finish it.
Last edited by comp500 (2011-01-22 07:30:40)
Offline
Daffy22 wrote:
Maybe someone could make the success page too?
![]()
does that just mean the news page?
Offline
ProgrammingFreak wrote:
Daffy22 wrote:
Maybe someone could make the success page too?
![]()
does that just mean the news page?
I think he means the page you get to when your block is submitted.
Offline
comp500 wrote:
ProgrammingFreak wrote:
Daffy22 wrote:
Maybe someone could make the success page too?
![]()
does that just mean the news page?
I think he means the page you get to when your block is submitted.
ok.
Offline
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.
Offline
The ftp details aren't working...
Offline
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:
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)
Offline
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.
What will the limit be? Should there be a limit?
Offline
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.
![]()
What will the limit be? Should there be a limit?![]()
scratch has one.
Offline
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.
![]()
What will the limit be? Should there be a limit?![]()
scratch has one.
because they don't have unlimited web space, we do
Offline
Daffy22 wrote:
comp500 wrote:
Daffy22 wrote:
ok.
![]()
What will the limit be? Should there be a limit?![]()
scratch has one.
because they don't have unlimited web space, we do
![]()
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.
Offline
meowmeow55 wrote:
Daffy22 wrote:
comp500 wrote:
scratch has one.because they don't have unlimited web space, we do
![]()
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?
Offline
Daffy22 wrote:
meowmeow55 wrote:
Daffy22 wrote:
because they don't have unlimited web space, we do![]()
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?
![]()
okay, 1000 then, could we then do Javascript and PHP together?
Offline
k, so what do i do?
Offline
oh wait I thought i was supposed to do the homepage. are you sure about that?
Offline
ProgrammingFreak wrote:
oh wait I thought i was supposed to do the homepage. are you sure about that?
yes
(do you have dreamweaver? It might help) remember to download the template from the server. (template.php)
Offline
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.
Offline
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!!
Offline