quarta-feira, setembro 28, 2005

let them eat HTML

See just this Post & Comments / 1 Comments so far / Post a Comment /   Home
Up, Down, Thread Ahead: Boycott SONY?.

wha?
this is not coding, this is a TRIAL - this is mere TRIBULATION!
this is weeping and wailing and gnashing of teeth!
this HTML does not even deserve to have its name capitalized.


January 9, 2006
ahhh ... another mystery elucidated ... the blogger interpreter does not check for closure of <span> tags apparently, that is why the sidebar can suddenly go for a shit when you make a simple and innocuous change to a post since it interprets the posts before the sidebar and leaves the font settings as they may be when that is done, ai ai ai, constant requirement for self-defence, wasting time, it is rare that a 'quick' change can ever be made, you always need to do it, then check to see what it looks like, then check unrelated areas to see if they have been affected

and woe betide you if you go into 'compose' mode - you wind up with endless <span> and </span> tages inserted everywhere, it has to have an effect, sometimes doubles the length of the html text file, dumbass nonsense!!

January 2, 2006
with the help of Mark 'Tarquin' Wilton-Jones at http://www.howtocreate.co.uk/ i managed to make two pop-up windows for my blog, one to show images, and one to show documents, and THEN i tried to post the code to this page so other people could see how to do it, hahahahaha ... so today i returned to the problem, and discovered the <xmp> tag, which is not quite what i wanted, and anyway is deprecated. then i discovered how to use &lt; and &gt; instead of < and >. In order to even show you this i had to resort to an additional level of indirection - it just gets worse and worse. i do not quite know how to show you how to code an ampersand, ok it is &amp;, but of course i had to code something completely different to show you that because it just goes on and on ... eventually we will blow the recursion depth eh?


ai ai ai! é absurdo!

the code when you finally see it is yet another indirection, he writes a little program to the browser window - it really is a complete waste of human potential, this post today has so far taken me over an hour, anyway ... so after much trouble, here is the code, paste it into a page somewhere after the HEAD tag:

<!-- thanks to Tarquin at http://www.howtocreate.co.uk/ -->
<SCRIPT TYPE="text/javascript">
PositionX = 10;
PositionY = 10;
defaultWidth = 600;
defaultHeight = 400;
var AutoClose = true;
function popImage(imageURL,imageTitle){
  var imgWin = window.open('','_blank',
    'scrollbars=1,resizable=1,width='+defaultWidth+
    ',height='+defaultHeight+',left='+PositionX+
    ',top='+PositionY);
  //popup blockers should not cause errors
  if( !imgWin ) { return true; }
  imgWin.document.write('<html><head><title>'+imageTitle+
    '<\/title><script type="text\/javascript">\n'+
    'function resizeWinTo() {\n'+
    'if( !document.images.length ) { '+
    'document.images[0] = document.layers[0].images[0]; }'+
    'var oH = document.images[0].height, '+
    'oW = document.images[0].width;\n'+
    'if( !oH || window.doneAlready ) { return; }\n'+ //in case images disabled
    'window.doneAlready = true;\n'+ //for Safari and Opera
    'var x = window; x.resizeTo( oW + 200, oH + 200 );\n'+
    'var myW = 0, myH = 0, d = x.document.documentElement, '+
    'b = x.document.body;\n'+
    'if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }\n'+
    'else if( d && d.clientWidth ) '+
    '{ myW = d.clientWidth; myH = d.clientHeight; }\n'+
    'else if( b && b.clientWidth ) '+
    '{ myW = b.clientWidth; myH = b.clientHeight; }\n'+
    'if( window.opera && !document.childNodes ) { myW += 16; }\n'+
    'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), '+
    'oH = oH + ( (oH + 200 ) - myH ) );\n'+
    'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
    'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
    'if( !window.opera ) { x.moveTo(Math.round('+
    '(scW-oW)/2),Math.round((scH-oH)/2)); }\n'+
    '}\n'+
    '<\/script>'+
    '<\/head><body onload="resizeWinTo();"'+
    (AutoClose?' onblur="self.close();"':'')+'>'+
    (document.layers?('<layer left="0" top="0">'):(
    '<div style="position:absolute;left:0px;top:0px;display:table;">'))+
    '<img src='+imageURL+' alt="Loading image ..." title="'+
    imageTitle+'" onload="resizeWinTo();">'+
    (document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
  imgWin.document.close();
  if( imgWin.focus ) { imgWin.focus(); }
  return false;
}
function popDoc(docURL,docTitle){
  var imgWin = window.open(docURL,'_blank','left=0,top=0,width='+
    (screen.availWidth-150)+',height='+screen.availHeight+
    ',resizable=1,location=1,menubar=1,scrollbars=1,status=0,toolbar=1');
  if( !imgWin ) { return true; } //popup blockers should not cause errors
  return false;
}
</SCRIPT>

two Functions; popImage and popDoc (a Haitian term ...), anyway, here is how you code it into an href for a document:

<a href="url" onclick="return popDoc(this.href,'optional description');">optional description</a>

and here is the one for an image:

<a href="url of big picture" onclick="return popImage(this.href,'optional description');"><img style="border:1px solid #000000; margin:1px 10px 1px 1px" src="url of thumbnail" align=left></a>

for the record it was almost three hours to make this entry, nevermind ... now, I would like to have zoom up and down buttons, and a means of placing a caption. if anyone has a notion I would appreciate hearing about it.


why did they have to make it so HARD, the bungling incompetents


ESTÚPIDO !!!


December 25, 2005
slowly i am getting control of this, but %$@!! it is an uphill slog, and you never really get there either because the process is so counter-intuitive that you have forgotten (or i have at least) by the time i realize some partial achievment

horrid! HORRID!

the colour for links has suddenly disappeared! just in one post, the rest are ok, tried debugging it but can't get anywhere with it

i got two popups, one for images and one for documents, not bad, thanks to Mark 'Tarquin' Wilton-Jones at http://www.howtocreate.co.uk/

but still these are not even close really, if you are viewing images you want zoom, pan etc. as well, and the technique he uses for the pop-up, which involves a couple of layers of reverse polish is too much for me so far

November 2, 2005
the fact that the www has gotten as huge as it is, based mostly on HTML which is simply abysmally awful, shows you something about what an idea actually is,and about the power of such things as ideas

October 15, 2005
here's a question - sometimes the Comments come up large and sometimes they come up tiny - and I have tried to force them large, and can't.

October 15, 2005
putting controls on the header and footer line of each post has been a trial, they appear and disappear according to settings of switches which i suppose are not very well controlled in the publishing program or somewhere, since i am the administrator it is now hard to know what a casual surfer is seeing, could be that surfers have access to the posts, dunno

this is becoming a standard problem in all kinds of software development - the guy who writes it is categorically different from those who use it

only policy is to religiously save copies of the code each time anything changes, but this hedge is both time-consuming and not guaranteed

must look for that scientific american article on the impossibility of maintaining code over a certain number of lines

October 13, 2005
a house of cards, a glass jaw, stupid html!!! hahahaha managed to get more-or-less back to something, but it is straight uphill all the time, dumb!

October 13, 2005
I managed to get the footer to show up, then I (thought I) managed to get the so called `permanent link` into the top as well as the bottom, so you could see comments without having to scroll to the bottom, and that .... works ... but now the links dont work???

October 9, 2005
ok, I can get the test to the left of the picture with an align=right in the pic, but I am diddled if I can get the test to the right of the pic ???

all of a sudden my posts have all fallen apart, the formatting is all gone, line feeds do not show up but i have the setting set to keep them

October 9, 2005
getting things just the way you want them with html is rather tricky, and very much of a house of cards for the inexperienced coder like myself - easy enough to lose track of what it was you were trying to do - I wanted a map to show where these rivers come together and instead I have spent an hour or so just getting them to show up in something like 'order'

September 27, 2005
can anyone show me how to put text beside pictures in html instead of underneath?

September 21, 2005
ai ai ai let's face it - alla this software is ... junk

if anyone sees this and knows what is happening i would sure like to know

update - aha!! got it! the old counter-intuitive combination-of-effects trick, there are two settings in blogger, one to convert line feeds and one to manage float, and the correct combo is ... convert line feeds to yes, and float to yes also, and it is a good idea to stash away a copy of your template html for future reference


Down
Posted outubro 05, 2005 8:21 AM by Blogger AndreMoraes /  

Still want this help?