PDA

View Full Version : I finally figured out what i need



Cheap Bastard
December 12th, 2000, 17:11
i think i figured out how to keep a lightning fast site while still make it easy on us
i dunno if it exists, but we need a script that will:
1) take text from an existing file (or a form)
2) add header and footer
3) write the new text (with header and footer) to an html file.

(cgi-php-asp, don't matter)

any script like this or should i write my own? (doesn't sound too hard, just a couple of cut 'n paste jobs from the right scripts...)

}:8) Supermoo
December 12th, 2000, 21:01
Why not get a program to do it for you? Just use the 'library' function in Dreamweaver (I got the demo! :)) or some other editor. It would make it go faster and search-engines would be able to index all the pages.

IMHO anyways. ;)

Chicken
December 12th, 2000, 21:05
Lightning fast and cgi... hmmm... don't think so. Why wouldn't you SSI the pages again?

razor
December 12th, 2000, 21:17
store them in a database and recall them with a simple script.

Cheap Bastard
December 13th, 2000, 08:17
prob is i have no experience with databases (that's right, none whatsoever)

atlas
December 14th, 2000, 12:03
Apparently someone finally caught on to what I've been posting each time someone posts about using SSI to include static headers and footers.

Using CGI or PHP is inherently slower than just pulling up static HTML pages. Therefore, "build" your pages beforehand: keep a template and have the text somewhere else. There already is a system that does this for you, and supports quite a few things called WML.

mjk@atlascgi.com

Aaron
December 14th, 2000, 14:44
Wouldn't WWWBoard be pretty close to what he needs? With a few simple modifications, it looks to me it could be the perfect CGI script for him.

~Aaron

Cheap Bastard
December 15th, 2000, 10:20
WWWBoard... hmmm
well it sounds like a Message Boards name but i'll check it out...

Aaron
December 15th, 2000, 10:34
But it's so editable it can be customized to fit what you were asking for.

~Aaron

Chicken
December 15th, 2000, 19:18
Using *any* type of script for this seems a bit over the top. No wait, way over the top. There are quite simple and easy ways of doing what you originally asked for (as far as I can figure.

Maybe I'm reading this wrong as to what what you are trying to do. But SSI or php seems to be the usual way to accomplish this. You don't seem thrilled with SSI so I'm just going to throw out the php version of the same thing. It isn't different, so it probably won't help...

<?php include("/the/absolute/path/to/the/file.txt"); ?>

jw
December 15th, 2000, 19:23
<? require("head.html");
require("file.txt");
require("foot.txt");
?>

should do it if thats all you wanted...

atlas
December 15th, 2000, 22:04
Perhaps I'm not understanding what is wanted here, but it seems like no dynamic insertion is needed. *NO* PHP, CGI, or SSI. They want a script that generates STATIC files with a given header and footer.

Reference my previous post for ideas

mjk@atlascgi.com

jw
December 15th, 2000, 23:17
php is NOT inherently slower than static, and about a bizillion time easier to use if you want to change that layout, instead of editing every file, you just edit two and the changes are visible on every page. Have you ever used PHP? The speed difference is less than 100ms.

Koolguy
December 16th, 2000, 12:27
Also if you have a fast server it can go as low as 25ms.

atlas
December 16th, 2000, 18:05
Originally posted by jw
php is NOT inherently slower than static, and about a bizillion time easier to use if you want to change that layout, instead of editing every file, you just edit two and the changes are visible on every page. Have you ever used PHP? The speed difference is less than 100ms.

Have you ever used the WML system? No. Have I used PHP? Yes. All you change with a WML system is those same two files. Have you ever administrated any servers that have a large load? I'm meaning way more than just in the thousands of hits a day. Small changes make big differences.

Certainly PHP is a very fast option, because, yes, I know that since I use it extensively. A good programmer and/or sysadmin doesn't limit themselves to a simple set of tools when there are better options.

mjk@atlascgi.com


[Edited by atlas on 12-16-2000 at 11:21 PM]

Cheap Bastard
December 17th, 2000, 00:14
Originally posted by atlas
Perhaps I'm not understanding what is wanted here, but it seems like no dynamic insertion is needed. *NO* PHP, CGI, or SSI. They want a script that generates STATIC files with a given header and footer.

Exactly. What we need is for a simple form, with several inputs, and that the script takes those inputs, adds the stuff that's always the same, and saves it to a static .html file.

No static, no nothing...

The only reason i need this stupid script is cuz tera-byte won't allow me to make my bud an admin. Okay, they'll allow me, but they told me 6 times that it's ''highly unadvised'' or ''Really not recommended''.

What the **** for anyways... I mean he can only mess it up once... They give me back admin (oooooh all that work for them OMG) and their prob's solved...

}:8) Supermoo
December 17th, 2000, 00:33
Originally posted by }:8) Supermoo
Why not get a program to do it for you? Just use the 'library' function in Dreamweaver (I got the demo! :)) or some other editor. It would make it go faster and search-engines would be able to index all the pages.
IMHO anyways. ;)

The first reply in this topic and still holding it's ground! Use a 'library' or 'template' function in one of your favourite editors...

Chicken
December 17th, 2000, 01:21
Originally posted by Cheap Bastard
[QUOTE]Originally posted by atlas
[B]The only reason i need this stupid script is cuz tera-byte won't allow me to make my bud an admin. Okay, they'll allow me, but they told me 6 times that it's ''highly unadvised'' or ''Really not recommended''.

What the **** for anyways... I mean he can only mess it up once... They give me back admin (oooooh all that work for them OMG) and their prob's solved...

I don't get this, but if you do, I suppose that's all that matters. :)

atlas
December 17th, 2000, 11:16
Uh, yeah.. Chicken why did you quote it as being from me? I don't get it either.

I don't think people should be made admins just so they can fix things or they are friends -- hire new help if you can't do it. Unless the person is an employee of the company they shouldn't be an admin. And what is this about only being able to mess things up once?

Supermoo: It's a good and valid way of doing it, but some people, like me, use solaris and linux as one of the development platforms for a project and they generally provide easier or just as easy tools at no cost.

mjk@atlascgi.com

jw
December 17th, 2000, 12:25
Originally posted by atlas
Have you ever used the WML system?
Yes

Have you ever administrated any servers that have a large load? I'm meaning way more than just in the thousands of hits a day. Small changes make big differences.
Actually I have, try a over a million hits a day, and those dang hackers....pffff...Small changes like not allowing persistent connections to databases, certain tweeks to httpd.conf, yes i know all about that.

Certainly PHP is a very fast option, because, yes, I know that since I use it extensively. A good programmer and/or sysadmin doesn't limit themselves to a simple set of tools when there are better options.
Such as...? Seems to me you are limiting making use of only static html files. How can you have such a popular website without any dynamic content? I'd hate to see it when you have to change a line in your layout, good luck.

mjk@atlascgi.com


[Edited by atlas on 12-16-2000 at 11:21 PM] [/B][/QUOTE]

Nick
December 17th, 2000, 17:05
Here's an idea:

Make a CGI script that opens all of your HTML files and looks for a start and end message like this:




<!-- start header -->


<!-- end header -->


and


<!-- start footer -->


<!-- end footer -->


and then replaces everything between that with updated text files.

Does that make sense?

atlas
December 17th, 2000, 17:52
Originally posted by jw

Originally posted by atlas
Have you ever used the WML system?
Yes

Such as...? Seems to me you are limiting making use of only static html files. How can you have such a popular website without any dynamic content? I'd hate to see it when you have to change a line in your layout, good luck.


1. How is it that if you've used the WML system you still fail to realize that you only change one file to change your layout? -- a template file, header, footer, etc.

2. Using static files doesn't mean your website doesn't change. Certainly login scripts, message boards, member areas, etc should be CGI, PHP, or ASP. Other pages that don't change more than once a day and are the same for each visitor are better off being static. How is it that all of Yahoo's directory pages are HTML files? They built it from their database into the HTML pages nightly (or weekly, I think).

mjk@atlascgi.com

}:8) Supermoo
December 17th, 2000, 22:39
Originally posted by atlas
Supermoo: It's a good and valid way of doing it, but some people, like me, use solaris and linux as one of the development platforms for a project and they generally provide easier or just as easy tools at no cost.

mjk@atlascgi.com


As you've probaly noticed I'm a fan of free stuff as well! You can get 1st page to do it (freeware) or you can use a Macromedia Dreamwaver (free demo for 30days).

I think seeing that this is useable in the develpoment process I find it much easier along with it's advantages;

Fast static HTML pages
Search engines can index all content


I think for Cheap Bastard's requirements, that's all he needs.

top
December 25th, 2000, 16:57
I would really like to know how much will using ssi to include headers and footers slow down my pages? In reality...is it so much slower? Or is this just theoretical.
(I'm redesigning one site and never used ssi for this)

Chicken
December 26th, 2000, 10:08
You won't notice a difference.

atlas
December 26th, 2000, 10:52
Originally posted by Chicken
You won't notice a difference.

....unless your site is *extremely* popular or you have *really* slow server -- or a combination of the two.