Re: templates and user "built" sites
| From: | Lewis Bergman | Date: | Sat, 06 Jan 2001 00:33:22 +0000 |
| Subject: | Re: templates and user "built" sites | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32983@lists.php.net to get a copy of this message | ||
> I don't know of anything off-hand. Try starting here:
>
>
> http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/File_Management/
>
> And poke around. There's one there at the bottom called 'Personal
> Webspace' that sounds close.
Thanks Brian,
There wasn't anything there close to what I want. Let me try to explain one
more time and maybe it will ring a bell with someone.
User goes to website
Fills out form including username and pass
Pick from a couple of basic layouts.
fills out form that would include things like:
What title do you want for your web page?
What keywords best describe your site?
What is a description of your web page?
Do you want a color for the background?
What would you like in the first paragraph?
Do You want links to other pages on here?
next page
What title do you want for your web page?
......
.......
After all that form filling crap I ideally would write an XML file (but I'll
take anything if it is already done) that might look like this:
<site user="username">
<template>basic_1.tpl</template>
<headers>
<title>My web Page</title>
<keywords>bla, blah, blahbla</keywords>
<description>My great web page</description>
</headers>
<body bgcolor="DCDCDC">
<main_heading>My Web Page</main_heading>
<text1>This is a bunch of text</text1>
<text2> </text2>
<link1>About Me</link1>
<link2> </link2>
</body>
.......
.......
Keep in mind the above info could be stored in a db, an XML file, A flat file
that lists plain vars, associative arrays, or plain arrays. XML just seems an
organized way to lay things out. At any rate that is off the top of my head.
Once all this is saved in the user's $home dir in whatever format along with an
index.php file I would then go to step two.
Step two is that the original index.php (remember way back there in the first
email) script that was already in the user's $home dir is looking for the above
named file whenever it is called. Now it finds it, grabs the associated
template (which only exists once) and parses the two together.
Obviously not something that would make a true web "designer" ooooh and ahhhh
but for a novice who doesn't know what an ftp client is it would be pretty
handy.
At any rate that is what I had in mind.
--
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602
915-695-6962