Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: [MOD] Adding id to the <body> tag (sNews 1.5)  (Read 19649 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] Adding id to the <body> tag (sNews 1.5)
« Reply #15 on: April 10, 2008, 03:45:39 AM »

My ponder in short:
How do I make it so I do not see any side col in the admin panel/area ?
How do I serve up a different page layout and/or stylesheet as per site area from which page was requested?

Welcome to sNews Funky-too. You've come to the right place... the sNews Forums that is... best place on earth to learn and cut your teeth as a new developer... if you fall into that category. We experiment with just about anything and sometimes come up with surprising results.  :)

There are several options for template, layout or theme switching... you might call sNews the McSwitchy CMS... and you'll find the latest ones by cruising the Mods & Addons Forum in the 1.6 section near the top of the main Forums page. We've got template switchers that swicth templates site-wide... a layouts system that gives the viewer a different layout for each area (category) in the site... even on a page-only basis. Then we have template switchers that work from within the Admin Panels... you choose which one to use when making a category or a page.

And... to top it off... we have a new one in the works being tested (now) with an sNews 1.7RC project that does everything you desire. It will, I believe... also be applicable to sNews 1.6... our current stable version. Stay tuned for good news coming our way soon.  ;D
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: [MOD] Adding id to the <body> tag (sNews 1.5)
« Reply #16 on: April 10, 2008, 01:40:09 PM »

Amazing what can be done with body id tag! :)
You desserve a karma for having wrtitten this Mod, Fred and Phil.

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: [MOD] Adding id to the <body> tag (sNews 1.5)
« Reply #17 on: April 10, 2008, 02:16:28 PM »

A small bug  ;D
When on the 404 page the body id is, of course, 404.
but W3org Markup Validation Service said:
Quote
I much regret Inspector Sven...
value of attribute "id" invalid: "4" cannot start a name
:-\

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [MOD] Adding id to the <body> tag (sNews 1.5)
« Reply #18 on: April 10, 2008, 06:11:22 PM »

How'd you get the validator to be so personal?! Ah, wait, it's the hat, right? ;D 8)
There's not much that can be done about that "error" of course, but thank you for reporting it. I'll just note that the error isn't critical... ;)
Logged

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: [MOD] Adding id to the <body> tag (sNews 1.5)
« Reply #19 on: April 10, 2008, 06:55:46 PM »

How'd you get the validator to be so personal?! Ah, wait, it's the hat, right? ;D 8)
There's not much that can be done about that "error" of course, but thank you for reporting it. I'll just note that the error isn't critical... ;)
Well, there's only Google who visit my 404 page. He did indexed it!
And Google Webmaster Tools said there is an error when trying to visit it.
He said http://mysite.com/404 drives to 404. :o ??? ;D
How'd you get the validator to be so personal?! Ah, wait, it's the hat, right? ;D 8)
No, the french mustache, Fred, the mustache!

d3signr

  • Newbie
  • *
  • Karma: 0
  • Posts: 1
Re: [MOD] Adding id to the <body> tag (sNews 1.5)
« Reply #20 on: December 03, 2008, 03:50:41 PM »

Can anyone confirm that this works for 1.7?

I've tried adding the changes but end up with an empty site. No page show at all.
On viewing the source for the page I see everything from the html doctype
declaration right down to where the body starts, but it doesn't complete. I get
this:

<body id="

and that's where it ends. Rest of the page is gone.

Any pointers?

Thanks in advance
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] Adding id to the <body> tag (sNews 1.5)
« Reply #21 on: December 04, 2008, 02:29:52 PM »

Can anyone confirm that this works for 1.7?

I've tried adding the changes but end up with an empty site. No page show at all. On viewing the source for the page I see everything from the html doctype declaration right down to where the body starts, but it doesn't complete. I get this:

<body id="

and that's where it ends. Rest of the page is gone. Any pointers? Thanks in advance

When display ends like this, it's because parsing (reading of the code) has stopped there so there's an error keeping it from parsing further.
This mod should work with 1.7 but I have not tried it. I did try it with 1.6 sometime last year but I'll have to dig back in project files to see what I had...
The version of this mod presented in this thread works for the old 1.5 versions of sNews. You want to use the sNews 1.6 version as your reference... as it is applied a little differently... and it should work with 1.7 as well.
« Last Edit: December 04, 2008, 03:23:48 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Pages: 1 [2]