You are here: Re: For Those On The Cutting Edge Of Web Design « All PHP « IT news, forums, messages
Re: For Those On The Cutting Edge Of Web Design

Posted by Mimic on 06/29/05 03:28

Onideus Mad Hatter wrote:

> On Mon, 27 Jun 2005 23:08:20 +0100, Mimic <dev@null.net> wrote:
>
>
>>Onideus Mad Hatter wrote:
>>
>>
>>>On Sun, 26 Jun 2005 23:08:47 -0700, newcastle <dan@dan.nospam> wrote:
>>>
>>>
>>>
>>>>Onideus Mad Hatter wrote:
>>>>
>>>>
>>>>>I contributed my thoughts to the only article in existence (as far as
>>>>>Google can find) regarding liquid images:
>>>>>http://www.michelf.com/weblog/2005/liquid-image/
>>>>>
>>>>>He, he, he...it seems that once again I have made web design history.
>>>>>
>>>>>For those who aren't retarded like Starshine Moonbeam aka MORONbeam,
>>>>>here's teh actual code segments:
>>>>>
>>>>>HTML File
>>>>>:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Fuzzy" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>>>>: <html>
>>>>>: <head>
>>>>>: <title>Histology Tutorial</title>
>>>>>: <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
>>>>>: <meta http-equiv="imagetoolbar" content="no"/>
>>>>>: <meta name="keywords" content="Backwater Productions, histology, WWCC, Walla Walla"/>
>>>>>: <meta name="language" content="en-us"/>
>>>>>: <meta name="distribution" content="GLOBAL"/>
>>>>>: <meta name="copyright" content="Backwater Productions 2005"/>
>>>>>: <meta name="author" content="Backwater Productions"/>
>>>>>: </head>
>>>>>: <body style="margin-left:0; margin-top:0; margin-right:0">
>>>>>: <script language="JavaScript" type="text/javascript" src="internals.js"></script>
>>>>>: </body>
>>>>>: </html>
>>>>>
>>>>>JavaScript File
>>>>>: document.cookie = "farfoos=" + document.body.clientWidth;
>>>>>: document.write("<img src='index.php'>");
>>>>>
>>>>>PHP File
>>>>>:<?php
>>>>>:
>>>>>:$filename = 'shapes.png';
>>>>>:
>>>>>:list($width, $height) = getimagesize($filename);
>>>>>:$new_width = $HTTP_COOKIE_VARS["farfoos"];
>>>>>:$new_height = $height / $width * $new_width;
>>>>>:
>>>>>:$image_p = imagecreatetruecolor($new_width, $new_height);
>>>>>:$image = imagecreatefrompng($filename);
>>>>>:imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
>>>>>:
>>>>>:imagepng($image_p);
>>>>>:?>
>>>>>
>>>>>--
>>>>>
>>>>>Onideus Mad Hatter
>>>>>mhm ¹ x ¹
>>>>>http://www.backwater-productions.net
>>>>
>>>>Is there a way to make the image resize without refreshing the browser?
>>>
>>>
>>>The best I've come up with in the past hour is to alter the JavaScript
>>>file like this:
>>>
>>>: document.cookie = "farfoos=" + document.body.clientWidth;
>>>: document.write("<img id='shapes' src='index.php'>");
>>>:
>>>: window.setInterval("check()", 1);
>>>: var width = document.body.clientWidth;
>>>:
>>>: function check()
>>>: {
>>>: cwidth = document.body.clientWidth;
>>>: if ( width != cwidth )
>>>: {
>>>: document.cookie = "farfoos=" + cwidth;
>>>: document.getElementById("shapes").src='index.php';
>>>: setTimeout("width = cwidth;",250);
>>>: }
>>>: }
>>>
>>>The problem though is that you have to start off windowed and then
>>>make it bigger for it to work. If you go from big to small it won't
>>>resize because it just puts in a scroll bar and the clientWidth stays
>>>the same. I tried to put in a scrolling:hidden style into the main
>>>HTML file but then the whole thing didn't work at all so I'm not
>>>completely sure, it may not be possible without a refresh.
>>>
>>>Although impossible is usually just another way of saying "I don't
>>>have time". For my own purposes it works the way I want it to. The
>>>next thing I'll probably do with it is to make it so that it can
>>>handle PNG alpha transparencies as the current version does not and
>>>that's a function that I require for my next major project.
>>>
>>> --
>>>
>>>Onideus Mad Hatter
>>>mhm ¹ x ¹
>>>http://www.backwater-productions.net
>>
>>See previous - but you could forward the index to itself and include the
>>dimensions as get variables. Also, I meant to say before, but Ive just
>>forgotten again - oh yeah, add in an onresize - refresh function.
>
>
> I thought about an onresize refresh function, that'd probably be
> easiest way, but I'm trying my hardest to get it to function on the
> fly without needing to reload everything. Probably I'll try and set
> it up with iframes next...although now that I think about it...most
> everything would need to be refreshed anyway if it was
> resized...hrmmm...
>
> Before I even get back to messing with it though I need to construct a
> better primer, the one I'm going to use in the contest against
> Starshine. I'm REALLY pushing my skills in graphic art and color
> theory on this one, I hope Starshine comes up with something halfway
> decent to try and rival it, although I'm thinkin this is gonna wind up
> being a flawless victory on my part.
>

Dont worry about the refreshing parts, I have that pretty much covered.
There is one piece of my design I dont like which perhaps you could poke
out when I up the code.

Check this out also, its great: http://stylephreak.frogrun.com/cm.php

>
>>Oh and btw, before you go on about blinders - like you said, theres a
>>much easier way to killfile people without running software filters.
>
>
> I was actually referring to my Farfoos headers. Quite frankly I don't
> really give a fuck one way or another who filters me or why, I just
> find it incredibly entertaining to torment people about it. ^_^
>
> --
>
> Onideus Mad Hatter
> mhm ¹ x ¹
> http://www.backwater-productions.net

:), I dont filter anyone - not with my client anyway. Except some
spammers that are in there. Its far more effective ti just skip the
posts you dont wanna read

--
Mimic

"I can speak to people anywhere in the world, I can get any information
I want, I can goto new zealand in 0.384 seconds, why would I want to go
outside?"
Damn the day star and its rays of light beaming upon my box of moving
pictures.
ZGF0YWZsZXhAY2FubmFiaXNtYWlsLmNvbQ== [ www.hidemyemail.net ]

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация