The CSS Story continues...

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
pixelpeter
Posts: 45
Joined: Fri 27. Feb 2004, 16:00

The CSS Story continues...

Post 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
tyr
Posts: 31
Joined: Tue 9. Dec 2003, 04:36
Location: Pennsylvania, USA

Post by tyr »

Great work! Keep it up.
marco

Post by marco »

This is absolutely great!
Nice work!
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post 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:
bertalizer
Posts: 47
Joined: Sat 21. Feb 2004, 14:24
Location: Belgium

Post 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.
stevenlyons
Posts: 69
Joined: Fri 2. Jul 2004, 01:46
Contact:

Post 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:
pixelpeter
Posts: 45
Joined: Fri 27. Feb 2004, 16:00

Post 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 ""
rookie
Posts: 109
Joined: Mon 31. May 2004, 22:01
Location: Hamburg, Germany

Post 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
marco

Post by marco »

Great work, keep it up! Hopefully these changes will be incorporated into an official release.
C
Posts: 3
Joined: Thu 22. Jan 2004, 22:57

CSS

Post 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.
LANtastic
Posts: 73
Joined: Sun 22. Feb 2004, 13:11
Location: Germany

Post 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.
C
Posts: 3
Joined: Thu 22. Jan 2004, 22:57

Post 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.
LANtastic
Posts: 73
Joined: Sun 22. Feb 2004, 13:11
Location: Germany

Post by LANtastic »

Ouch ... no I see it ... sorry my fault
psych0
Posts: 4
Joined: Sun 24. Oct 2004, 01:37

Post 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?
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Blogs and phpwcms

Post 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.
Post Reply