Re: [PHP] read the last line in a file?
Tom Worster wrote: >> 1) the inotify interface will alert you when a file or directory >> changes. > > do you mean the pecl inotify extension? Not specifically, but if that's how inotify is available in PHP, then yes. > that would eliminate the polling and the associated lag. but the php > manual says it requires linux. if that's the case then it's not going > to work for me. the app i'm working with runs on os x. inotify comes with linux, yes. >> 2) run tail -f logfile | and read from stdin. (not >> tested). > > i thought of this but i couldn't see much difference between reading > from stdin and opening the log file itself and reading from that > (reading and tesing for eof periodically in both cases i suppose). but > i may be missing something in your suggestion. With the above, your code can just keep reading from stdi, no need to check for eof etc. >> 3) if you can change the logfile to a fifo, you're all set. > > i don't have any control over the app that writes the log file. if > there were a utility like tail -f that opens a fifo for output rather > than outputting to sdtout... Once piped to your script, reading from stdout will be just like reading from a fifo. /Per -- Per Jessen, Zürich (16.2°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] read the last line in a file?
Tom Worster wrote: do you mean the pecl inotify extension? that would eliminate the polling and the associated lag. but the php manual says it requires linux. Yup - and it's kernel, so I don't think it could easily be ported to OS X. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
Ashley Sheridan wrote: On Sat, 2009-05-16 at 09:15 -0400, Robert Cummings wrote: On Sat, 2009-05-16 at 10:48 +0100, Ashley Sheridan wrote: On Sat, 2009-05-16 at 02:25 -0400, Paul M Foster wrote: On Fri, May 15, 2009 at 01:25:42PM -0400, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise. I've managed to do some pages with CSS, but I feel like I am shooting myself in the foot or somewhere... Perhaps I am too demanding. I know that with tables, the formatting is ridiculously fast. Any thoughts, observations or recommendations? I think it's pretty telling that on a list of professionals who create websites constantly, the overwhelming concensus is that for forms, tables are the preferred solution. I liken this sort of discussion to the dichotomy between movie critics and people who actually go and see movies. The critics inevitably have all sorts of snobby things to say about the movies which are best attended. I'm not sure why anyone listens to any critic on any subject. Paul -- Paul M. Foster I think the argument of tables vs css can go a little deeper too. These days, sites should not only be developed with good clean code that validates, but semantic markup. If your client doesn't like/know what this is, just give it to them in terms of seo! FWIW, everything I've read indicates that tables don't affect SEO. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP SEO is not the be and end all. Accessibility is a legal thing in many countries; UK and Australia especially (they are the two most prominent I know) so there's no excuse for shoddy coding. I'm not saying that using tables inevitably leads to that, but more often than not, tables are used in such a way that the reading of a page is wrong because the elements appear in the code in the wrong order, even though they visually appear correct. It's not the responsibility of the speech/Braille browsers to interpret code designed for a seeing user. They should only have to interpret semantics. Rob; sorry, this isn't a pop at you, I just wanted to explain to anyone who got hooked too much onto the SEO line you mentioned. I agree with you in that respect though, I've never seen any evidence for tables having any impact on SEO, and I've done a lot of SEO research! Ash www.ashleysheridan.co.uk here's what I do.. I open the page in firefox, using chris pederick web developer toolbar I hit ctrl+shift+s (to disable css); and if the page doesn't look and read like a well formatted general document then I consider it to be made incorrectly. ash's site is a good example of it done properly, the only think he's missing is either a space between his navigation elements at the top of the page, or they could be popped in a ul. Really there is no excuse, I've never seen a layout yet that can't be created without tables, and haven't for many years - and the old "I don't have the time / resources" doesn't really float either, as once you've done it 2 or 3 times you can make table-less layouts at the same speed if not faster, not only this but they are far lighter (as less html). It's the equivalent of somebody coming here with ancient PHP 3 and advocating that they use it because they don't have time to learn or change to a newer version - only difference is that table based layouts are older than php 3 :p nath -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SQL help?
Hey all, I have a SQL requirement I'm not quite sure how to compose. I have two tables, shows, and shows_dates. It's a one to many relationship where there is a single entry in shows and multiple entries in shows_dates that list each date and time for a play production for a run of entries in shows, like I need a query that will read each record in shows, but I only want the first record from shows_dates, the first one sorted by date, so I can display all shows in order of their opening date. Not sure how to grab just the first record from shows_dates though. Hint, anyone? Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
At 2:34 PM -0400 5/15/09, Robert Cummings wrote: It is my opinion that browsers do not yet provided the necessary functionality across a large enough user spectrum to facilitate the versatility of layouts used by many sites today. That said, I place most of the blame squarely on Microsoft. Cheers, Rob. Rob: I saw your post and wanted to comment, but there are several reasons why I didn't. Some of them are: 1. I agree that the table issue is not yet resolved. I agree that M$ is the biggest problem that all technologies of the day have to overcome. First you have to solve the problem for the dumbest people on the planet and then you have to solve it so that M$ products will continue to work -- it's one of those dumber-dumbest things. With regard to css, I oscillate between being a "css purist" to a "css pragmatist". On one hand I completely agree with the purist that tables in the past have been abused and the disabled have been hurt by it -- that's more than ample foundation in my book for the purist position. On the other hand, there are the reasons you cite where tables have not been universally accepted and defined by different browser developers (M$ specifically). As such, the practicality of the css purist to provide an alternate solution for all problems goes without foundation. In other words, some things cannot be done without using tables -- or at least not easily done. My statement is not a challenge for some "css smart ass" to say "Oh really, just show me" -- because I don't want to get into that debate! However, I cite things like a calendar, and your MUD site, and other such solutions that would be very difficult to accomplish using pure css. So as a stop-gap, I often revert back to the main reason why tables are a "no-no" in the first place, which almost totally revolves around the disabled. I figure if the disabled have no problems with me using a table for certain things, then the css purist (my alter ego) can go piss up a rope. 2. Debating an issue with you, is like arguing with God -- I seldom want to do it because I usually have my ass handed back to me. However, I usually learn something in the process -- so, it's a bittersweet thing. 3. My quota for learning stuff this week has been met and thus I am reluctant to post a comment as to your use of tables. I hope you understand (as tedd runs to empty his head for the onslaught of "things to consider" this way comes). Cheers, tedd PS: Apologies in advance for any grammatical errors -- I am writing in "stream of thought". -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
On 5/15/09 6:28 PM, "Nathan Rixham" wrote: > so ultimately i guess it's a case of 3 cheers and a round of applause > for anybody who's thus far managed to create a website that works and > that the client likes! agreed. but lets hope some of the users like it too. i think of all the web sites that i used to find useful, quick and easy that got a make-over one day and wound up fancy, slow and confusing. i'm guessing the client was satisfied with the redesign... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
At 11:28 PM +0100 5/15/09, Nathan Rixham wrote: tedd wrote: However, there are occasions such as in a calendar where not using a table would be more than difficult. I haven't received a decree yet as to IF that would be considered column data or not. I'm gonna differ on this one, when you simply float each calender item to the left you're pretty much done, in many cases i find it easier than tables. Okay -- so you find them easier to use for this purpose. This is my little php calendar (not all the code is mine): http://php1.net/my-php-calendar/ and I use tables. I would not want to redo this script using pure css, but I probably will do it at some point. We all have investments into our code. Do you have a css calendar to show? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
On 5/16/09 2:25 AM, "Paul M Foster" wrote: > I liken this sort of discussion to the dichotomy between movie critics > and people who actually go and see movies. The critics inevitably have > all sorts of snobby things to say about the movies which are best > attended. I'm not sure why anyone listens to any critic on any subject. that's a good metaphor. the critic's first job (like the professional op ed writer) is to make sure he or she keeps being read. take anthony lane in the new yorker for example. actually i think he hates watching so many mainstream hollywood releases week after week. he sure sounds like it. and his opinions on which movies to watch aren't worth much. but he keeps my interest by being a great writer -- his snobbery and cleverness is so witty that's quite appealing and it helps me hone the wit of my snobbery and cleverness, or so i perhaps unconsciously hope. an opinion doesn't have to be right to be valuable. an apt metaphor indeed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
At 10:48 AM +0100 5/16/09, Ashley Sheridan wrote: Trust me, semantics are gonna be the next big thing, Semantics? What do you mean by that? And therein lies the problem -- what means something to me, may not to you. For example, if I make my header (or whatever) what makes it the same as yours? I think the next big thing will be an argument over meaning. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
At 9:15 AM -0400 5/16/09, Robert Cummings wrote: FWIW, everything I've read indicates that tables don't affect SEO. Cheers, Rob. Same here -- content is different than html. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: CSS & tables
At 8:08 PM +0200 5/15/09, Daniele Grillenzoni wrote: Most of the IE bugs are due to floating and clearing, once you have learned to master overflow: auto and display: inline, you're good to go. Just don't get insane about trying to achieve pixel perfect in netscape4. Good to go -- only for simple sites. And for pixel perfect, no browser does that. Here's my write-up on the subject: http://sperling.com/four-things-clients-should-know.php Comments welcome. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
At 7:48 PM -0400 5/16/09, Stephen wrote: PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise. CSS 2.1 makes layout easy ans IE8 passes ACID2. I have some javascript that detects the browser and warns users of IE <8 that they need to upgrade. Maybe bleeding edge for commercial sites, but helping the user upgrade is going them a favour. Stephen Stephen: Browser sniffing is a losing battle. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
At 8:38 PM -0400 5/16/09, Robert Cummings wrote: On Sat, 2009-05-16 at 19:48 -0400, Stephen wrote: PJ wrote: > I know of no better place to ask. This may not be strictly a PHP issue, > but... > I am busting my hump trying to format rather large input pages with CSS > and trying to avoid tables; but it looks to me like I am wasting my time > as positioning with CSS seems an impossibly tortuous exercise. CSS 2.1 makes layout easy ans IE8 passes ACID2. I have some javascript that detects the browser and warns users of IE <8 that they need to upgrade. Maybe bleeding edge for commercial sites, but helping the user upgrade is going them a favour. Stephen Tell that to government... many, and in some departments most, are still using IE6. I'm quite sure they won't appreciate me telling them it's time to upgrade. On the plus side though, MediaWiki is breaking ground :) Cheers, Rob. -- What's interesting is that the government is behind a bunch of this section 508 and other such disability concerns. I love to point out when their sites fail and tell them that they couldn't receive a government grant if they were in the private sector. Do as I instruct, not as I do. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping Cart
At 10:37 AM +0100 5/16/09, Vernon St Croix wrote: Hi, I am pretty new to PHP and I am trying to create a shopping cart. Hi Vee: I'm new to brain surgery and every time I poke here, I see stars -- any idea of what's wrong? :-) If you are new to php, then find something simple to cut your teeth on -- shopping carts are not trivial. At best, you'll create a bunch of junk code and waste a lot of your time AND at worst, you'll create a script that ruins your client and puts you on the hook for mondo bucks. My opinion, buy a shopping cart and figure out how to install it. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
tedd wrote: At 11:28 PM +0100 5/15/09, Nathan Rixham wrote: tedd wrote: However, there are occasions such as in a calendar where not using a table would be more than difficult. I haven't received a decree yet as to IF that would be considered column data or not. I'm gonna differ on this one, when you simply float each calender item to the left you're pretty much done, in many cases i find it easier than tables. Okay -- so you find them easier to use for this purpose. This is my little php calendar (not all the code is mine): http://php1.net/my-php-calendar/ and I use tables. I would not want to redo this script using pure css, but I probably will do it at some point. We all have investments into our code. Do you have a css calendar to show? hi tedd, didn't have one to hand so quickly knocked up a basic one here: http://programphp.com/Calendar/ all sizes etc are in em so it'll fully resize - you'll see in the source anyways - all css. have to say it's not great but it's just a quick demo to show it's more than possible. many regards, nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
tedd wrote: At 10:48 AM +0100 5/16/09, Ashley Sheridan wrote: Trust me, semantics are gonna be the next big thing, Semantics? What do you mean by that? And therein lies the problem -- what means something to me, may not to you. For example, if I make my header (or whatever) what makes it the same as yours? I think the next big thing will be an argument over meaning. :-) Cheers, tedd semantics already are the next big thing and have been for a year or three. google aquired the leading semantic analysis software many years ago and have been using it ever since, likewise with yahoo and all the majors. further we've all had open access to basic scripts like the yahoo term extraction service for years, and more recently (well maybe 2+ years) we've had access to open calais from reuters which will extract some great semantics from any content. if you've never seen then the best starting point is probably http://viewer.opencalais.com/ pretty sure yahoo (and maybe google) have been parsing rdf semantic data embedded inside comments in xhtml documents for a couple of years now, even the adding of "tags" generated by semantic extraction are common place now and make a big difference to seo. If however you mean document structure semantics such as using h* tags throughout the document in the correct places, then this is even older and everybody should be doing it - hell that's what an html document is! :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
tedd wrote: At 7:48 PM -0400 5/16/09, Stephen wrote: PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise. CSS 2.1 makes layout easy ans IE8 passes ACID2. I have some javascript that detects the browser and warns users of IE <8 that they need to upgrade. Maybe bleeding edge for commercial sites, but helping the user upgrade is going them a favour. Stephen Stephen: Browser sniffing is a losing battle. Cheers, tedd agreed - complete and utter waste of time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
On 15/5/09 18:25, PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise. I've managed to do some pages with CSS, but I feel like I am shooting myself in the foot or somewhere... Perhaps I am too demanding. I know that with tables, the formatting is ridiculously fast. Any thoughts, observations or recommendations? (X)HTML is the layer for structured content. CSS - intended to replace presentational features in (X)HTML - is a layer for suggesting a presentational skin for HTML and XML structured content. In (X)HTML, tabular markup is appropriate when you need to indicate data relationships between cells and groups of cells. HTML 4.01 states: "Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables." http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.1 Separating content and presentation rather than using the same feature ("td") sometimes to imply relationships and sometimes to dictate a rendering makes it easier to radically repurpose content (for example, linearize content for display on a narrow device, extract the data tables from a page, or read a page aloud). Any implementation of the current CSS2 standard should allow you to replicate /any/ table layout using (say) "div" containers and the tabular values of "display" in place of "td" containers, but I'd add two caveats: 1. "div" elements aren't always the most appropriate containers, but you can't use tabular values of display to (say) arrange "li" elements into a grid (because a single list can occupy multiple rows on the screen, but there are no elements to style with "display: table-row;"). Having said that, generic "div" elements are still preferable to "td" elements used for the same purpose, since at least they can't be confused with data table cells. CSS3 should offer more sophisticated layout features that will make it easier to achieve whatever design you want with the most appropriate markup, rather than root through the interwebs for hacks. 2. More crucially, while current versions of all popular browsers, including IE8, support virtually all of CSS 2.1, many users are still using older browsers especially IE6 or IE7 that are not only very buggy but are missing support for key CSS2 features including the tabular values for the "display" property. Web publishers who want to produce grid layouts in legacy browsers must resort to float or negative margin-based hackery even where using such features would be more appropriate. Also email client support for CSS layout features still sucks (http://www.campaignmonitor.com/css/); so if you're creating HTML newsletters (shudder) you're probably going to have to stick to tabular markup for layout for those. Isolani offers an interesting corrective to CSS triumphalism: http://www.isolani.co.uk/blog/standards/TheShallownessOfCssEvangelism I'd always push for a change to the visual design rather than resort to using tabular markup for layout. But whether you apply a limited presentational subset of tabular markup for layout (using only the "table", "tr", and "td" elements, perhaps adding "role='presentation'" from WAI-ARIA, and trying to avoid nested tables) is significantly less important than whether you use the expected semantic markup to indicate relationships that user agents will extract and present to users. For example: 1. The relationship between a data table cell and its headers ("th", "td", "tr" elements, "scope", "headers", "id" attributes). 2. The relationship between a table and its title ("caption" element). 3. The relationship between a form field and its text label ("label" element, "for", "id" attributes). 4. The relationship between a group of form fields and their label ("fieldset" and "legend" elements). 5. The sequence of sections in the document ("h1" to "h6" elements). Sometimes people argue that certain forms involve tabular relationships. This can be a defensible position. But at least until other ways of indicating field label associations are specified and supported, you should keep using the "label" element even if you are also grouping labels and fields with the "tr" element. But stepping beyond the undying tables-versus-CSS debate towards an actual solution for your immediate problem, you might it find it productive to share: 1. A description of your goals - the content you have, the layout you want, and the minimum set of web cli
Re: [PHP] CSS & tables
Nathan Rixham wrote: tedd wrote: At 7:48 PM -0400 5/16/09, Stephen wrote: PJ wrote: I know of no better place to ask. This may not be strictly a PHP issue, but... I am busting my hump trying to format rather large input pages with CSS and trying to avoid tables; but it looks to me like I am wasting my time as positioning with CSS seems an impossibly tortuous exercise. CSS 2.1 makes layout easy ans IE8 passes ACID2. I have some javascript that detects the browser and warns users of IE <8 that they need to upgrade. Maybe bleeding edge for commercial sites, but helping the user upgrade is going them a favour. Stephen Stephen: Browser sniffing is a losing battle. Cheers, tedd agreed - complete and utter waste of time If someone wants to mask their browser, so be it. They will see a false warning, or miss a useful one. Standards exist for a reason. Web designers have wasted eons of man years accommodating Microsoft's incompetence. Finally getting things right takes some people to start, and it is those of us without a commercial need to be friendly to IE <8. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
On Sun, May 17, 2009 at 08:40:33PM +0100, Nathan Rixham wrote: > tedd wrote: >> At 11:28 PM +0100 5/15/09, Nathan Rixham wrote: >>> tedd wrote: However, there are occasions such as in a calendar where not using a table would be more than difficult. I haven't received a decree yet as to IF that would be considered column data or not. >>> >>> I'm gonna differ on this one, when you simply float each calender item >>> to the left you're pretty much done, in many cases i find it easier >>> than tables. >> >> Okay -- so you find them easier to use for this purpose. >> >> This is my little php calendar (not all the code is mine): >> >> http://php1.net/my-php-calendar/ >> >> and I use tables. >> >> I would not want to redo this script using pure css, but I probably will >> do it at some point. We all have investments into our code. >> >> Do you have a css calendar to show? >> > > hi tedd, > > didn't have one to hand so quickly knocked up a basic one here: > http://programphp.com/Calendar/ > > all sizes etc are in em so it'll fully resize - you'll see in the source > anyways - all css. > > have to say it's not great but it's just a quick demo to show it's more > than possible. It's very pretty, Nathan. *Except* in IE6, which is what probably most of the world is using. In IE6, the day labels are lined up one on top of each other, and there are no date "cells" at all. No numbers, no nothing. And therein lies the reason why people use tables. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
On 17/5/09 22:43, Paul M Foster wrote: *Except* in IE6, which is what probably most of the world is using. Probably "a lot" rather than "most". http://www.upsdell.com/BrowserNews/stat.htm --- Benjamin Hawkes-Lewis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
Paul M Foster wrote: On Sun, May 17, 2009 at 08:40:33PM +0100, Nathan Rixham wrote: tedd wrote: At 11:28 PM +0100 5/15/09, Nathan Rixham wrote: tedd wrote: However, there are occasions such as in a calendar where not using a table would be more than difficult. I haven't received a decree yet as to IF that would be considered column data or not. I'm gonna differ on this one, when you simply float each calender item to the left you're pretty much done, in many cases i find it easier than tables. Okay -- so you find them easier to use for this purpose. This is my little php calendar (not all the code is mine): http://php1.net/my-php-calendar/ and I use tables. I would not want to redo this script using pure css, but I probably will do it at some point. We all have investments into our code. Do you have a css calendar to show? hi tedd, didn't have one to hand so quickly knocked up a basic one here: http://programphp.com/Calendar/ all sizes etc are in em so it'll fully resize - you'll see in the source anyways - all css. have to say it's not great but it's just a quick demo to show it's more than possible. It's very pretty, Nathan. *Except* in IE6, which is what probably most of the world is using. In IE6, the day labels are lined up one on top of each other, and there are no date "cells" at all. No numbers, no nothing. And therein lies the reason why people use tables. Paul and if every site a user visited was screwed in IE6 because the developers had made it without tables, maybe they'd all upgrade to something newer. you never know we might be bringing it on ourselves by still coding sites to be compatible with old browsers. When I go and buy a film I don't buy a vhs or a betamax.. because I can't - that industry simply stopped making them and if I want to own a new film I buy the dvd - I don't write to paramount and complain because I only have a betamax. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: CSS & tables
On 17/05/2009 20.51, tedd wrote: At 8:08 PM +0200 5/15/09, Daniele Grillenzoni wrote: Most of the IE bugs are due to floating and clearing, once you have learned to master overflow: auto and display: inline, you're good to go. Just don't get insane about trying to achieve pixel perfect in netscape4. Good to go -- only for simple sites. And for pixel perfect, no browser does that. Here's my write-up on the subject: http://sperling.com/four-things-clients-should-know.php Comments welcome. Cheers, tedd Re-read my sentence: "most of the IE bugs" as opposed to "all IE bugs" Also: 404. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CSS & tables
-Original Message- From: Paul M Foster [mailto:pa...@quillandmouse.com] Sent: Sunday, May 17, 2009 5:44 PM To: php-general@lists.php.net Subject: Re: [PHP] CSS & tables On Sun, May 17, 2009 at 08:40:33PM +0100, Nathan Rixham wrote: > tedd wrote: >> At 11:28 PM +0100 5/15/09, Nathan Rixham wrote: >>> tedd wrote: >>>> However, there are occasions such as in a calendar where not using a >>>> table would be more than difficult. I haven't received a decree yet >>>> as to IF that would be considered column data or not. >>> >>> I'm gonna differ on this one, when you simply float each calender item >>> to the left you're pretty much done, in many cases i find it easier >>> than tables. >> >> Okay -- so you find them easier to use for this purpose. >> >> This is my little php calendar (not all the code is mine): >> >> http://php1.net/my-php-calendar/ >> >> and I use tables. >> >> I would not want to redo this script using pure css, but I probably will >> do it at some point. We all have investments into our code. >> >> Do you have a css calendar to show? >> > > hi tedd, > > didn't have one to hand so quickly knocked up a basic one here: > http://programphp.com/Calendar/ > > all sizes etc are in em so it'll fully resize - you'll see in the source > anyways - all css. > > have to say it's not great but it's just a quick demo to show it's more > than possible. Seems that CSS calendar script is only working in IE8 and the latest Firefox (didn't check it on earlier versions of FF) everything else showed layout issues. Not bad for a "quick throw together" though. As far as Semantics et al. The next 2 years the web will be shifting into newer directions, become much more robust and "intelligent". Obviously it isn't a true intelligence yet. Things like Wolfram Alpha are still to be seen. I hear a lot of hype regarding this new Google killer yet until I see it... Web 3.0 (or the true 2.0 depending on who you ask) will change how many of use view and develop for the WWW. I hope there are some serious back room discussions on the laws of robotics. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Information from ESET Smart Security, version of virus signature database 4081 (20090517) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
On Sun, May 17, 2009 at 11:20:19PM +0100, Nathan Rixham wrote: > Paul M Foster wrote: >> On Sun, May 17, 2009 at 08:40:33PM +0100, Nathan Rixham wrote: >> >>> tedd wrote: At 11:28 PM +0100 5/15/09, Nathan Rixham wrote: > tedd wrote: >> However, there are occasions such as in a calendar where not using a >> table would be more than difficult. I haven't received a decree yet >> as to IF that would be considered column data or not. > I'm gonna differ on this one, when you simply float each calender item > to the left you're pretty much done, in many cases i find it easier > than tables. Okay -- so you find them easier to use for this purpose. This is my little php calendar (not all the code is mine): http://php1.net/my-php-calendar/ and I use tables. I would not want to redo this script using pure css, but I probably will do it at some point. We all have investments into our code. Do you have a css calendar to show? >>> hi tedd, >>> >>> didn't have one to hand so quickly knocked up a basic one here: >>> http://programphp.com/Calendar/ >>> >>> all sizes etc are in em so it'll fully resize - you'll see in the source >>> anyways - all css. >>> >>> have to say it's not great but it's just a quick demo to show it's more >>> than possible. >> >> It's very pretty, Nathan. *Except* in IE6, which is what probably most >> of the world is using. In IE6, the day labels are lined up one on top of >> each other, and there are no date "cells" at all. No numbers, no >> nothing. >> >> And therein lies the reason why people use tables. >> >> Paul > > and if every site a user visited was screwed in IE6 because the > developers had made it without tables, maybe they'd all upgrade to > something newer. No, they'd simply go elsewhere for their product/service/information. Moreover, they don't know that the site is goofy because of their browsers' lack of support for CSS. In fact, the vast majority of them wouldn't even know something called "CSS" exists. And by the way, this attitude of "My code is fine; your browser sucks; upgrade" can be the worst kind of arrogance, and people react to it exactly as though it were arrogance. There used to be the same kind of attitude with regard to screen resolution. 640x480 was just so "80s", and *all* the latest monitors supported 1280x1024 or whatever. So we design for 1280x1024 and screw those Luddite users. I would agree if someone's using Netscape 4; you'd have to kindly break it to them that they really should upgrade. But beyond that, it gets gray. Telling a user to upgrade his browser because it won't display your way kewl website properly is like telling someone it's time to trade in their car. The car still runs fine, and gets them from point A to point B without a lot of maintenance issues. Why should they trade it in? And they'll react with resentment. The analogy isn't perfect. Computer/web technology moves a lot faster than car technology. But there are probably still sites out there which will sell them the doodad they want without them having to upgrade their browser. Why stay with you? To be honest, I think the reason the site didn't paint properly is because you put the "content" of the cells (the outline numbering) in the CSS. If you had inserted content for each cell into the actual HTML, it might have painted fine. Nonetheless... Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CSS & tables
Paul M Foster wrote: On Sun, May 17, 2009 at 11:20:19PM +0100, Nathan Rixham wrote: Paul M Foster wrote: On Sun, May 17, 2009 at 08:40:33PM +0100, Nathan Rixham wrote: tedd wrote: At 11:28 PM +0100 5/15/09, Nathan Rixham wrote: tedd wrote: However, there are occasions such as in a calendar where not using a table would be more than difficult. I haven't received a decree yet as to IF that would be considered column data or not. I'm gonna differ on this one, when you simply float each calender item to the left you're pretty much done, in many cases i find it easier than tables. Okay -- so you find them easier to use for this purpose. This is my little php calendar (not all the code is mine): http://php1.net/my-php-calendar/ and I use tables. I would not want to redo this script using pure css, but I probably will do it at some point. We all have investments into our code. Do you have a css calendar to show? hi tedd, didn't have one to hand so quickly knocked up a basic one here: http://programphp.com/Calendar/ all sizes etc are in em so it'll fully resize - you'll see in the source anyways - all css. have to say it's not great but it's just a quick demo to show it's more than possible. It's very pretty, Nathan. *Except* in IE6, which is what probably most of the world is using. In IE6, the day labels are lined up one on top of each other, and there are no date "cells" at all. No numbers, no nothing. And therein lies the reason why people use tables. Paul and if every site a user visited was screwed in IE6 because the developers had made it without tables, maybe they'd all upgrade to something newer. No, they'd simply go elsewhere for their product/service/information. Moreover, they don't know that the site is goofy because of their browsers' lack of support for CSS. In fact, the vast majority of them wouldn't even know something called "CSS" exists. And by the way, this attitude of "My code is fine; your browser sucks; upgrade" can be the worst kind of arrogance, and people react to it exactly as though it were arrogance. There used to be the same kind of attitude with regard to screen resolution. 640x480 was just so "80s", and *all* the latest monitors supported 1280x1024 or whatever. So we design for 1280x1024 and screw those Luddite users. I would agree if someone's using Netscape 4; you'd have to kindly break it to them that they really should upgrade. But beyond that, it gets gray. Telling a user to upgrade his browser because it won't display your way kewl website properly is like telling someone it's time to trade in their car. The car still runs fine, and gets them from point A to point B without a lot of maintenance issues. Why should they trade it in? And they'll react with resentment. The analogy isn't perfect. Computer/web technology moves a lot faster than car technology. But there are probably still sites out there which will sell them the doodad they want without them having to upgrade their browser. Why stay with you? yeah - major difference being that upgrading your web browser if free, and as we well know you can have multiple browsers installed with no problems. I understand what you are saying, but if 50%+ of the worlds web developers simply cut support for x, y & z browser (or displayed a limited site with a notice) then I think the old browsers may just go away (90%). eg if google, facebook, msn, ebay, yahoo all cut support for them.. To be honest, I think the reason the site didn't paint properly is because you put the "content" of the cells (the outline numbering) in the CSS. If you had inserted content for each cell into the actual HTML, it might have painted fine. Nonetheless... yup, and its css3 with selectors that are unsupported by ie6 + even with content it'll hit a few bugs - infact it just won't work in ie6 full stop. regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php