Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 12th, 2003, 11:39 AM
Authorized User
 
Join Date: Jun 2003
Location: Glen Ellyn, Illinois, USA.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Dan Jallits Send a message via MSN to Dan Jallits Send a message via Yahoo to Dan Jallits
Default Database Driven Website w/ META tags

I am in the process of completing a web site for a friend that took it up as a project. The inital site was never completed because the original designer/developer didn't know boo about anything.

So now I am looking for a resource that explains how to add dynamic META tags to a Database Driven Website. The tags, stored in the database along with the content, need to be relevant to the page that is currently being viewed, not randomly generated.

This in theory will generate better Search results from Google, Yahoo, etc. The Keyword field will also be utilized to search the site, generating a results page that includes a linked page tile, its relevance, and the page description. Possibly even the creation/modify date and author.

I should also mention that I am using what I like to call "the three-file simple template method". That is a header file that contains the head section and the begining of the body section. A main file that contains the main content of the site. Last a footer file that contains the copyright information, and closes the body and html tags.

Any help would be greatly appreciated.

Best Regards,
Dan Jallits
__________________
Best Regards,
Dan Jallits
Reply With Quote
  #2 (permalink)  
Old June 13th, 2003, 12:39 AM
Authorized User
 
Join Date: Jun 2003
Location: San Jose, CA, USA.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

While I do not have a specific resource that explains this, I have done similar things millions of times.

My thoughts are this: For database structure, there are 3 core tables, one containing the body code forthe document, the next containing all of the unique keywords that you may use on your site (emphasis on unique, no need for dupes), and the last table for linking it all together. The body table will contain cells for the last updated date and time, as well as the author and any other relevant information you need.

Now how this all comes together is this. You make some sort of admin section that allows you to "assign" keywords to specific pages. When you assign a keyword to a page, a resord will be added to the 3rd table. That table would essentially only contain 3 columns. The first being a unique id number for that record, the second holding the id number of the body document, and the last containing the id of the keyword. Multiple records can be added for each body document with different keywords assigned to each.

Now of course comes the question of what the heck to do with all of it once it's gotten this far. Well, when you tell the page to pull the specific body document from the database, you tell it to select all of the instances of that body showing up in the linking table. This in turn will give you all of the unique id's of keywords associated with that document. Now with a while look, you have the database pull the record for each keyword based on the id number and build the meta keyword string as it goes.

As for showing the date modified and author info in the meta tags as well, just select those cells from the body document table when you select the body content. Should be pretty straight forward.

If you'r still lost, respond to this and I will try to explain it more.

----------
~cmiller
Reply With Quote
  #3 (permalink)  
Old June 16th, 2003, 11:42 AM
Authorized User
 
Join Date: Jun 2003
Location: Glen Ellyn, Illinois, USA.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Dan Jallits Send a message via MSN to Dan Jallits Send a message via Yahoo to Dan Jallits
Default

Thanks for quick synopsis. I am now in the process of taking your approach. If I run into a problem I will email. Thanks again.

Best Regards,
Dan Jallits
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using meta tags amatytfc ASP.NET 2.0 Basics 1 August 6th, 2007 05:47 PM
meta tags ferlach HTML Code Clinic 5 June 5th, 2007 04:17 PM
META tags and master pages thenoseknows ASP.NET 2.0 Professional 1 October 9th, 2006 01:02 PM
MasterPages ContentPages and Meta tags michaelcode ASP.NET 2.0 Basics 5 June 1st, 2006 04:13 PM
Meta tags Adam H-W HTML Code Clinic 2 November 19th, 2003 11:25 AM



All times are GMT -4. The time now is 04:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.