SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 15th, 1999, 11:41 AM
dchapman
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Is there a way to create many pages dynamically... say using a template? I've over 110 html pages with the same format and I'm sick and tired of creating new pages, updating old ones, with content and links. I've access to linux and unix, php, perl, and java...
Any suggestions?
Dora

Reply With Quote
  #2  
Old July 17th, 1999, 04:48 PM
dahamsta
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Dora,

Well, perl and php3 are ideally suited to your task, but it depends on how far/fast/advanced you want to go. You can use a database to generate your pages, flat-file or SQL. I've successfully used dbMan - gossamer-threads.com/scripts/dbman by Gossamer Threads to create quite a large catalogue of products, which is basically what you're looking for, using flat-file databases (a MySQL version is available aswell, although it's quite expensive) and a program that's pretty easy to work with when you get the hang of it.

And you can do the exact same thing with php3, and probably better, because php3 integrates very well with SQL databases. It takes some time, but it's worth it.

There are a few drawbacks though, which can be got around, but take time and experience to get the hang of. For a start, if you use the one template for all of your pages, they're not going to be indexable by the search engines, because there'll be a query string on the href tag, like this:

link.php3?page=number&something=somethingelse

But you can get around that with webserver trickery, for example using the mod_rewrite module, which means you can rewrite anything under, for example, /articles to be dealt with by the one page/app. I've done this with Perl, not with php3, but I know it's possible with both.

From experience, I would suggest you start with Perl and dbMan, and work with that first to give you experience with dealing with databases. Then start working with php3 and MySQL and get the hang of that, and then figure out the mod_rewrite mappings when you're done, and you'll just have to modify the resultant scripts a little to get that to work.

Of course, if you're comfortable with Perl or PHP3, you can just skip all of that and start at the end!

It may seem like a lot of work now, but the experience is invaluable if you work on the web a lot. I've just started working with MySQL and php3, after a lot of playing with Perl. This is my second time approaching it, and I can tell you now, it beats the hell out of anything else, and makes it weasy-peasy to automate nearly everything on a site. Sod ASP and microflot, this is the way to go.

When Zend comes out, I'll probably turn into a total net freak! URL

Cheers,
adam

[This message has been edited by dahamsta (edited 07-17-99).]

Reply With Quote
  #3  
Old July 22nd, 1999, 11:24 AM
jamesh
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Notwithstanding Dahamsta's reply, I have a simpler, although not as robust and more basic, answer.
I have implemented smaller sites (<1000 pages) simply using SSI and 4 templates (along with content).

All you need is ...

1. A format to stick with. I have used .txt as an extension for content pages, a standard header, sidebar and footer.

2. A script that reads the directory and generates a .shtml file with the necessary html tags for each .txt file, using a VIRTUAL INCLUDE pointing the .txt file. Stick the header, side bar, content and footer into a table. I usually make the sidebar the links bar. The sidebar gets generated from a META TAG from the content pages that you want links to.

3. Run the script.

James

Reply With Quote
  #4  
Old February 8th, 2000, 07:01 AM
Noldus Noldus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Utrecht, Netherlands
Posts: 2 Noldus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Noldus
i want to use a template as well:
template.xxx?url=yaddayaddayadda.asp

only with asp instead of php3

i can't seem to find a way to assess includes containing script dynamically, with either asp or playn (d)HTML...

can you help me?

Reply With Quote
  #5  
Old April 14th, 2000, 10:53 AM
rootdr rootdr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 8 rootdr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi James,

I know this is a long shot since you posted to this question awhile ago,
but could you let me know how exactly you use the META TAGs? I was
thinking you defined your own meta tag with a bunch of links in it
related to the "content.txt" page and then did a virtual include on
those through your script.

I need to publish a load of text documents and was hoping to do it with PHP. I know Project Midgard (http://www.midgard-project.org/) is probably too complicated for me, and I only use PHP for Virtual Includes and because a friend wrote some really cool navigational tools in PHP.

BTW, supposing your "content.txt" file contains "&" symbols for example,
what do you use to parse the .txt file to change "&" to "&"?

Would you consider e-mailing me a copy of your php script?

Cheers,

Adam

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Creating pages dynamically, without coding each one


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway