Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 2 [3] 4

Author Topic: sNews goes HTML5  (Read 11135 times)

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews goes HTML5
« Reply #30 on: October 06, 2009, 03:34:03 PM »

Nicely done Fred. Can you also get it to display properly in IE 6 & up? In IE7, no styling applies at all.

Blasted, blasted bioborgs! (to quote a favorite book of mine)
I keep forgetting that IE wants stuff served literally... see if it might work better with this url? (apparently the lack of "www." does things in IE, I guess?)

In IE6 I don't know if it'll get much better but styling should appear (in IE7 as well of course).[/silver]

Ah, wait, it's that other thing. (See poppoli's comment.)

I haven't included any IE bits as this is a plaything, not "real". Firefox-latest, Safari-latest, Chrome, Opera-latest, Konqueror-latest, all should have no problems (or only minor problems) with the build.
« Last Edit: October 06, 2009, 03:47:48 PM by Fred K (agentsmith) »
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews goes HTML5
« Reply #31 on: October 06, 2009, 03:35:34 PM »

Well done Fred. Bravo!
Hi Doug.
Nicely done Fred. Can you also get it to display properly in IE 6 & up? In IE7, no styling applies at all.
It's a real pain in the a** (as usual) to make it work under IE (see # 2. The markup @http://www.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/)

Fred, do you plan to use some HTML5 and microformats (such as <address class="vcard author"><a class="url fn">, <time>, <datetime>, ...)?

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews goes HTML5
« Reply #32 on: October 06, 2009, 03:43:14 PM »

Fred,
To have the hidden div change from More to less when open add this:
Change to your needs..
This is my html:
Code: [Select]
<p class="footer_toggler"><a href="#" id="footer-toggle">Show Footer</a></p>The script:
Code: [Select]
//show hide footer
$(document).ready(function() {
 // hides the footer as soon as the DOM is ready
 // (a little sooner than page load)
  $('#footer').hide();
 // shows the footer on clicking the noted link
  //$('a#footer-show').click(function() {
 //$('#footer').show('slow');
 //return false;
  //});
 // hides the footer on clicking the noted link
 // $('a#footer-hide').click(function() {
 //$('#footer').hide('fast');
 //return false;
  //});
 // toggles the footer on clicking the noted link
  $('a#footer-toggle').click(function() {
 $('#footer').toggle(400);
 $(this).text($(this).text() == 'Show Footer' ? 'Hide Footer' : 'Show Footer');
 return false;
  });
});
// end show hide footer
You can remove the lines starting with //
PP
PS I think you forgot the html5.js script in the ifIE part


Thanks Paul. Useful!
html5.js - what html5.js? :D
(I know what it is and what it's supposed to be for, I just don't intend to use it for playthings. Once I get to doing "real" HTML5 sites, then it's another matter. Thanks for the reminder though.) (Besides, if we need javascript to get *some* browsers to understand the new stuff, we'll never get rid of *those* browsers and will "never" be able to move on... I think I don't like the idea of using html5 shiv, even if completely understand the need for it. Just my 2 cents, nothing noteworthy. ;))
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews goes HTML5
« Reply #33 on: October 06, 2009, 03:45:39 PM »

Well done Fred. Bravo!
Hi Doug.
Nicely done Fred. Can you also get it to display properly in IE 6 & up? In IE7, no styling applies at all.
It's a real pain in the a** (as usual) to make it work under IE (see # 2. The markup @http://www.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/)

Fred, do you plan to use some HTML5 and microformats (such as <address class="vcard author"><a class="url fn">, <time>, <datetime>, ...)?



Thanks! microformats is something I'm looking at but haven't implemented anywhere yet. It takes a while for this old head to bend itself around newfangled stuff... ;) However, I am trying a couple new things in the comment form... (there's one of the test articles that has comments enabled, see if you can spot the new thing...)
« Last Edit: October 06, 2009, 03:51:09 PM by Fred K (agentsmith) »
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews goes HTML5
« Reply #34 on: October 08, 2009, 10:14:15 AM »

However, I am trying a couple new things in the comment form... (there's one of the test articles that has comments enabled, see if you can spot the new thing...)
I go have a large mug of very strong coffee since I'm not awakened.
Then I might see something. :P

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews goes HTML5
« Reply #35 on: October 08, 2009, 10:30:44 AM »

I go have a large mug of very strong coffee since I'm not awakened.
Then I might see something. :P
Had my coffee and a cigar.
And saw a major issue with Opera: "show more" script is off the wall.
But still dont' see microformat in comments. ???

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews goes HTML5
« Reply #36 on: October 08, 2009, 02:33:30 PM »

Had my coffee and a cigar.
And saw a major issue with Opera: "show more" script is off the wall.
But still dont' see microformat in comments. ???

Aha. Perhaps try it without the cigar? All that blue smoke... ;)
To be honest, the "show more" thing failing isn't a major issue. Interesting though.
There are a number of strange things going on, on the category index page, but a) only in Opera of the good browsers and b) it doesn't happen in the full article view (although the "show more" issue happens on all pages of course.)
Not sure why Opera is failing to be honest. I'll take a look at the construction.

/*Edit: Opera needs a specific height value on the "show more" containers (and probably overflow:hidden on the parent) for it to work. Since this was a quick, "fun" experiment, I didn't bother with that when it worked just fine in Safari and Firefox. And the layout isn't supposed to be implemented anyway, it's just an ... experiment. ;) */

As for microformats -- perhaps another cup of coffee is needed?
Quote from: me, myself and I
microformats is something I'm looking at but haven't implemented anywhere yet

There are the added things "autofocus" and "required" in the comments form. Although, I now realize that (a) autofocus isn't new, it just hasn't been used much before -- perhaps for a good reason -- and (b) "required" doesn't seem to be recognized yet by any browser. Certainly not the ones I've tested the page in (Safari, Firefox, Stainless, Opera 10).
« Last Edit: October 08, 2009, 02:53:28 PM by Fred K (agentsmith) »
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews goes HTML5
« Reply #37 on: October 08, 2009, 04:27:42 PM »

Okey.
I'm awake now.
Too much of that green smoke yesterday night I think... ;D

poppoll

  • Full Member
  • ***
  • Karma: 47
  • Posts: 199
    • Poppoll's sNews playground
Re: sNews goes HTML5
« Reply #38 on: October 09, 2009, 01:36:45 AM »

The Show More issue
Fred, the div extraslot is not closed the ">" is missing.
IMO this causes the problem in IE and Opera.
Paul
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews goes HTML5
« Reply #39 on: October 09, 2009, 09:42:37 AM »

Hey Paul. Thanks. I found that one as well after *a lot* of digging. I really didn't see it at first. but when the showhide thing worked fine on snewsshowcase.com I realised I'd f***ed up on the other one. Which I had.
Appreciated.
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews goes HTML5
« Reply #40 on: October 19, 2009, 09:33:53 AM »

Haven't pee'd a line as I was away. :-[
As sNews goes 2.0 -or 1.8, depends- what could be listed as required in this new version to be be able to talk modern.
I'm thinking of microformats inclusion, date formats and avoiding DIV soup.

Over.

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews goes HTML5
« Reply #41 on: October 19, 2009, 04:44:03 PM »

Dumb question: ;D
I'ld like to surround my article with a div class="entry-content": found where to open my <div> but still looking where to close it. :-[
EDIT REASON: drank 3 or 4 beers (can't remember) and found.
HIP!
« Last Edit: October 19, 2009, 05:54:18 PM by Sven »
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews goes HTML5
« Reply #42 on: October 19, 2009, 06:05:29 PM »

Philippe,

It depends a little bit on the layout (I think I have 3 different 'standard' layouts and the position of the div tags varies), but looking at the vanilla snews.php the opening <div> should be somewhere around line 708, following this bit that starts on ~
705:

Quote
705    } else {
706      $link = '<a href="'._SITE;
707      while ($r = mysql_fetch_array($result)) {
708                <div>

The closing </div> again depends  a little on the layout, how much extra stuff you include or what kind of layout variation you do, but -again- in the vanilla snews.php, it should probably be after the brace on ~line 799, e.g. before the two last closing braces in articles(). Something like this:

Quote
796    } else if ($commentable == 'FREEZ') {
797            comment('freezed');
798         }
799      } </div> <!-- Closes the article div, both for shortened text and for full text
800       }
801    }
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: sNews goes HTML5
« Reply #43 on: October 19, 2009, 06:06:09 PM »

Dumb question: ;D
I'ld like to surround my article with a div class="entry-content": found where to open my <div> but still looking where to close it. :-[
EDIT REASON: drank 3 or 4 beers (can't remember) and found.
HIP!


Ah, ok, beer usually helps... :D
Well, someone else might need it...
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: sNews goes HTML5
« Reply #44 on: October 20, 2009, 11:05:41 AM »

 :P
Need to clean up the core in order to make it work with the HTML5 template.
By the moment I'm having a div soup difficult to digest. :-\
Pages: 1 2 [3] 4