Question for hand-coders

Hehe, I use SimpleText. :D

Here's the code for your template:
PHP:
<?php
function begin( $title = '' )
{
?>

(Put all of your HTML that will go before your content here.)

<?php
}

function terminate()
{
?>

(And this, of course, is the space for your HTML after the content.  Like for your </body> and </html> tags.)

<?
}
?>
 
Mr.K Yeah, I know, but I don't use the template system, I just use my own code. I don't either use those #thingees, I don't really need them.

As for PHP, I like the moethod described here. In fact, either you're geniuses, either you're copying and pasting from an old ALA article about PHP publishing. But the fact is, my website is static, hard-hand-coded, just like Zeldman, just like Owen Briggs. And I love it like that, I can read my code, I don't update my site so often (a dozen of lines per week, no more).
 
I use PHP includes for my header/footer and right-nav... vs. any sort of BBEdit HTML template... The individual pages are only the content of that page.

The right nav has a fair amount of PHP logic in it to make sure it shows the right thing.

None of that CSS or other fancy stuff on my site... It's all basic HTML circa 1999. Tables all the way baby!

;)
 
toast said:
I personally use Find & Replace in BBEdit, which has a multifile find/replace capability.

Eg: I want to change my copyright date in my whole website.

I open BBEdit, Find and Replace.
Find: (c)2002 Replace (c)2003
Multifile search checkbox: checked.
Multifile criterion: Website (which automatically searches a whole folder, incl. nested ones if precised).

You can have multiple websites. Read more: http://www.barebones.com/products/bbedit/features.shtml
I got tired if doing find/replace on my copyright years ago... That now "magically" happens for me when I update a page.

You can argue which copyright format is "correct" for the Web, but I have my copyright in the format &copy;(year my site started)-(year this page was last updated)... so any page that has not been updated in 2 years will be &copy;1995-2001

The php code I use is like this:
PHP:
// This is in my header include	
$FullUnixPath = $HTTP_SERVER_VARS['SCRIPT_FILENAME'];
.
.
.
// This is in my footer include
$FileChangeUnixTime = filectime($FullUnixPath);
$FileChangeCopyright = date("Y", $FileChangeUnixTime);	
.
.
.
// This is my HTML copyright... which is also in my footer include
&copy;1995-<?= $FileChangeCopyright ?>
:)
 
uoba said:
I suppose using the #bbinclude becomes another proprietary bit of code again though? Just as DW.
Not to mentione the fact that you still need to regenerate each/every page when this include changes.

UHG!

Don't get me wrong. I LOVE BBedit and have been using it since version 2.x in 1994. It's find/replace is amazing. I love that it can do it, but always feel like I've done something wrong when I have to.
 
I would design sites like Toast if I didn't need a uniform look across all pages, but once I start delving into the templates it becomes a MAJOR pain in the attitude to have to modify every single f*cking page to get them to look the same. Hence why I jumped on the PHP provided to me in a thread on this site, no less. ;)

Tommy, I can definitely see how you can improve your site while keeping it looking the same by using XHTML/CSS instead of tables. One thing I like about Netscape is the ability to push Cmd-E (which is View Source in IE) and open a page in Composer, which gives a visual breakdown of the layout, including showing the divisions between tables... some stuff I would keep in a table, like the picture frame, but most of that I would throw into div's and align with CSS.

But that's just me. You can make the choice to let your pages take a long time to load on other people's browsers and cause yourself more trouble to manage your layout.
 
arden said:
...Tommy, I can definitely see how you can improve your site while keeping it looking the same by using XHTML/CSS instead of tables. ...
I actually started, but quickly realized I didn't totally know what I was doing and it was taking much longer than I hoped.

I haven't really restarted this effort, but here is how far I got: http://www.jeffntom.com/accessable_index.php

(the page actually repeats twice. The top is the layers/css one, the bottom is the old table one for comparison...)

What I have so far certainly is NOT less code than the table version. Also I had MORE luck getting the table version to be stretch (i.e. %-based) than the CSS one... (Again, this might just be because of my limited time spent with CSS vs. my many years with plain ol' tables.)

...oh yeah... And the CSS one has some very serious differences in Safari, IE, and Mozilla Firebird... I never even got to the point of checking this on a PeeCee...
 
css is hard to learn, I agree. And my guess is that it's a lot harder to learn if your coming from a table mantra. A great book that I haven't read (just a few parts, I got it from the library bu never finished it) is jeffrey zeldman's designing with wen standards. He goes over everything you need to know about xhtml and css, and on top of that he shows you how to turn a table based site into a css site.
 
Well, the CSS part looks much better (and probably closer to what you want) in NS7, but in IE5 it stretches too far. This is probably from your use of "width:95%", especially with no "position:" attribute... I'd say use "margin-right: 5px" or something to line the right side of your content against the scrollbar.

I also got this PHP error in both browsers: "Fatal error: Call to undefined function: cell_background() in /Library/WebServer/Documents/includes/global_footer.php on line 9" Something to investigate.
 
Back
Top