A Conversation for Ask h2g2

Table image maker!

Post 21

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Uh oh, technical difficulties. The GuideML parser keeps inserting tags around my 'nbsp's, overriding my style attribute on the table and making them actual size, which causes the table to be huge.
In short, GuideML is cramping my .


Table image maker!

Post 22

Dogster

The colspan thing isn't too difficult to do, here is a modified version of your putittogether() javascript function that does it (it considerably reduces the size of the table!):

function putItTogether()
{
fred.printout.value='\r';
for(i=0;i<16;i++)
{
fred.printout.value=fred.printout.value+'\r'
var n = 1;
var c = pixelcell[i*16].bgColor;
for(j=1;j1)
{
fred.printout.value=fred.printout.value+'\r'
} else
{
fred.printout.value=fred.printout.value+'\r'
}
n = 1;
c = pixelcell[j+i*16].bgColor;
} else
{
n++;
}
}
if(n>1)
{
fred.printout.value=fred.printout.value+'\r'
} else
{
fred.printout.value=fred.printout.value+'\r'
}
fred.printout.value=fred.printout.value+'\r'
}
fred.printout.value=fred.printout.value+''
}


Also, you're not gaining anything by putting the after the unless you change it to &nbsp; because otherwise some browsers will optimise it so that the cell is empty.


Table image maker!

Post 23

Dogster

I just added a smiley to my user space designed using my slightly updated version of Twinkl's code. Neato!


Table image maker!

Post 24

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Hey, really cool smiley! About the nbsp thing though, it works in regular HTML but the GuideML parser resizes the font so it makes the table WAY too big. I'm not really fluent in Javascript, this was actually the first major thing I made from scratch. smiley - smiley Since all of the programming languages that I use I've taught myself, I have significant gaps in my knowledge because I often just skip what looks boring, and don't realize I need it until later. You, on the other hand, seem to know what you're doing. smiley - smiley Still, it's not bad for a 14-year-old novice programmer with too much spare time on his hands, is it?
Also, do you have any idea how I can get it to read a smiley table that's already made?


Table image maker!

Post 25

Dogster

Hehe, I've done a pirate flag now too!

I'd better stop or I'll be doing this all night, it reminds we of those wonderful "sprite editors" in old games programming packages!

Well done, by the way, it's an excellent little program.

Here's an idea for how to read in a previously saved smiley, unfortunately it won't work with your custom colours thingy.

Add a bit to your program so that it outputs a line like this before the table:

<!--AABB-->
<!--ABAB-->
<!--ACCA-->
<!--BAAD-->

Where the letters A,B,C,D, and so on, represent colours 0 through 16 (0 being transparent perhaps). This way you could relatively easily read it back in by just pasting this bit into a text book and scanning through it (do you know how to do basic string manipulation in Javascript?).

I tried the &nbsp; thing too, it's quite irritating that GuideML adds the font tags. Oh well. Anyone have any ideas to make it work with Netscape?

I'm a self taught programmer too, but I guess I've been doing it a bit longer (aah, the wasted years smiley - smiley).


Table image maker!

Post 26

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

The editor won't work with Netscape anyway, because it doesn't detect the onClick for table cells. smiley - sadface But, it would be nice if we could find a way to make them at least visible to everyone.


Table image maker!

Post 27

Dogster

I've been looking through the GuideML-Clinic, but there doesn't seem to be any tags that have a hope of working. If H2G2 ever introduces a feature where you can resize the images they provide, you might have a hope because they have a large stock of pictures ready made. Chances are that if you resize each of these pictures to 1 pixel by 1 pixel, you'll get a decent range of colours. Then you could put something like:



And it would give you a 1 pixel by 1 pixel blob of colour.

Maybe in the future...


Table image maker!

Post 28

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

What I'm still trying to figure out is _why_ it puts those stupid font tags there... being able to do more with blobs would be nice, though. Have you seen what I've done with tables and ascii art on my page?


Table image maker!

Post 29

Dogster

I'm guessing it puts them there so that all entries are stylistically consistent and work equally well in different skins...

I like your ascii art thing, but it seems to only work in Goo?


Table image maker!

Post 30

Ottox

It's a well-kept secret that you can use the width attribute with blobs! smiley - winkeye


Table image maker!

Post 31

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Only in Goo... Hmm, you're right. How odd. I suspect it's putting tags where they don't belong again. Well, it does say "best viewed in Goo" at the bottom... I guess that's a good thing, at least. smiley - erm


Table image maker!

Post 32

E G Mel

ASCII art doesn't work in netscape smiley - sadface

Mel smiley - hsif


Key: Complain about this post