Page 1 of 2

The CSS Story continues...

Posted: Thu 15. Jul 2004, 02:12
by pixelpeter
As mentioned before in this thread I've started to rebuild the contenttypes to be rendered using CSS.

For a better understanding I've set up a little Test site where you can have a look at the work (in progress).

Please visit: http://phpwcms.pixelpeter.de

Posted: Thu 15. Jul 2004, 16:08
by tyr
Great work! Keep it up.

Posted: Thu 15. Jul 2004, 16:33
by marco
This is absolutely great!
Nice work!

Posted: Thu 15. Jul 2004, 17:16
by pepe
Hallo pixelpeter,

heute habe ich zum ersten mal verstanden, warum CSS zukunftsträchtig ist.
Wenn man deine gut und verständlich gemachte Site ansieht, stolpert man ja förmlich darüber, wie kompakten und übersichtlich der Programmcode mit CSS werden kann.

Wenn ich die Änderungen in den letzten phpwcms-Upgrades richtig beurteile, ist aber auch OG auf diesen Zug nicht nur aufgesprungen, sondern mit Hochdruch bei der Umprogrammierung.

Ich habe deine Site in meinen Favoriten ganz nach oben gesetzt.
Danke für dieses Highlight für Internet-Freunde :lol:

Posted: Sat 17. Jul 2004, 10:11
by bertalizer
Hi Pixelpeter,

Great work!
But why not make the code semantically correct (more info) at the same time?

I' ve taken a look at your site. For example, your reworked version of plain text looks like this:

Code: Select all

<div class="articleHead">HTML</div>
<div class="contentHead">Content Title</div>
<div class="contentSubHead">Subtitle</div>
<div class="articleText">Lorem ipsum dolor <b>sit</b> 
amet,...</div>
But using html semantically correct it should look like this:

Code: Select all

<h1>HTML</h2>
<h2>Content Title</h2>
<h3>Subtitle</h3>
<p class="articleText">Lorem ipsum dolor <strong>sit</strong> 
amet,...</p>
just my 2 cents
B.

Posted: Sat 17. Jul 2004, 20:03
by stevenlyons
I think you meant:

Code: Select all

<h1>HTML</h1>
:shock:

With the exception of the <b> tag, his use of divs with ids is not semantically incorrect, just more verbose. There may be times when its advantageous to have the flexibility of ids. Its funny how these CSS discussions always devolve into questions of semantic purity. :lol:

Posted: Sun 18. Jul 2004, 13:38
by pixelpeter
Well, you're right with the term of semantic html

Problem is/was that rendering is implemented different. Sometimes using the div_class function givin the css-classname as a argument and (you guessed it) rendnering a div, sometimes using the headline function sourounded by different $template_default['xxx_before'] and $template_default['xxx_after'] vars.

Looking at the code it seems that Oliver is working on this topic.

I've did changes to my code using only the term of before-var+content-var+after-var so everybody can decide if he wants to use a div or h* and the conf.template_default.inc.php file gets mor tidy :lol:

Code: Select all

// article default
$template_default["article"]["title_before"]			= '<div class="articleHead">';
$template_default["article"]["title_after"]				= '</div>'.NL;

$template_default["article"]["subtitle_before"]			= '<div class="articleSubHead">';
$template_default["article"]["subtitle_after"]			= '</div>'.NL;

$template_default["article"]["summary_before"]			= '<div class="articleSummary">';
$template_default["article"]["summary_after"]			= '</div>'.NL;

$template_default["article"]["content_head_before"]		= '<div class="contentHead">';
$template_default["article"]["content_head_after"]		= '</div>'.NL;

$template_default["article"]["content_subhead_before"]	= '<div class="contentSubHead">';
$template_default["article"]["content_subhead_after"]	= '</div>'.NL;

$template_default["article"]["text_before"]				= '<div class="articleText">';
$template_default["article"]["text_after"]				= '</div>'.NL;

$template_default["article"]["code_before"]				= '<div class="articleCode">';
$template_default["article"]["code_after"]				= '</div>'.NL;
"NL" is only a PHP-Constant holding a linebreak "\n" for easier debugging of the generated source code. On live systems I simple set it to an empty string ""

Posted: Fri 13. Aug 2004, 23:24
by rookie
Hi

I love the idea of a fully CSS driven site.

However, your site is not compatible with Firefox/Mozilla. If you browse with Firefox, you'll see that the whole layout is messed up ...

Otherwise a very nice idea. :D

Posted: Sat 14. Aug 2004, 16:20
by marco
Great work, keep it up! Hopefully these changes will be incorporated into an official release.

CSS

Posted: Tue 24. Aug 2004, 09:40
by C
Hey guys, building a phpwcms based site for a client and a fully CSS driven layout is required. I've been having a go at and it seems to be working. I don't really see the need to hack the php to get this to work so far.

The far from finished site is at http://hospitality.got.net/index.php

I found this article http://alistapart.com/articles/negativemargins/ to be very useful while having a go at it.

Posted: Wed 25. Aug 2004, 03:29
by LANtastic
I really don't want to start a discussion about the combination of tables, css and valid html code, but as far as I can see, you didn't understand the sense of pixelpeter's site.

What you did, C, is quite correct. The code validated and uses CSS, but at the end you use tables+css for formatting the content.

He wants to create short and semantical HTML Code, without unnecessary tables to format the content.

Posted: Wed 25. Aug 2004, 09:45
by C
Nope its a fully liquid css layout, the only place where there are tables left is in the standard navigation widget in the left bar which hasn't been switched out yet.

Posted: Thu 26. Aug 2004, 05:12
by LANtastic
Ouch ... no I see it ... sorry my fault

Posted: Sun 24. Oct 2004, 01:49
by psych0
So what sort of tweaking does it take to make the layout totally liquid? I want to start using a CMS which is more than just a simple blog (my site - http://urbanplexus.net ) is it just a case of creating a XHTML+CSS template jacking in the right PHP tags and that's it... or is there actual CMS hacking involved?

Blogs and phpwcms

Posted: Sun 24. Oct 2004, 23:55
by ionrock
Making a fluid layout in phpwcms is simply a matter of how you create the template. There is no real hacking to do other than that. If you want to be sur e your site validates xhtml then you have a bit more to deal with. Much of the cms is valid html 4.01 but it is not xhtml compatible. I have found this is near impossible with any content management system that uses a rich text editor. I also think that for the vast majority of situations it really doesn't cause a problem.

With regard to blogs, phpwcms does not use a blog or post based paradigm. Phpwcms is a great tool for making web pages and web sites and not for publishing on a web platform. IMHO I think this is a strength since most sites are informational and not focused on a consistant stream of content. With that said you can easily use tools such as blogger and strip out the template info and just include the stripped out blogger file to an article in phpwcms to get a blog. You don't get as nice of archives and things but it definitly works. I hope this might help out a bit. I have been using phpwcms for a while now and consistantly it is the cms of choice. There is nothing that is impossible to do with it.