homepage Welcome to WebmasterWorld Guest from 54.196.196.72
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
Reverse engineer a static stite
To make it partially dynamic
ideavirus




msg:664341
 7:34 am on Aug 6, 2005 (gmt 0)

Hi,

I have a pure content site which i have kept it purely static deliberately.
However...whenever i want toc hange something sitewide, i will have to modify all the 500+ pages which is time consuming.

Is there was a to use PHP and Mysql and make it partially dynamic? I want the header and footer to be dynamic and the right hand column also to be dynamic.

What i really want to do is...whenever i want to modify the header/footer or right column..i make the changes in one place and a piece of php code inseted in all the templates will parse and display the actual content on all the pages when loaded.

Is it possible to do that? If so what is the best way to achieve that.

Thank you for any help and directions.

Cheers

 

jamie




msg:664342
 8:44 am on Aug 6, 2005 (gmt 0)

ideavirus,

of course that's possible. probably the most important thing to be aware of:

to allow php code in a page to be parsed (carried out), the page needs to be recognised as a php page. this is normally achieved by naming it .php - however, i suspect in your case the endings are .htm. in order not to have to rename all your pages to .php and potentially lose all your SE rankings, you can set your server to "parse html pages as php pages" - search for that phrase in these forums and you'll find lots of info.

otherwise it is simply a matter of searching and replacing your header and footer html code with the appropriate php code. see this post for guidance: [webmasterworld.com...]

once you have started down this road, you will never look back ;)

Reflect




msg:664343
 3:02 pm on Aug 6, 2005 (gmt 0)

Maybe I am over looking things but take a few minutes up front to use server side includes (SSI). The inital setup will be a pain to go through but once done it will help. Want to change the footer? Edit one file and your done.

All my pages are only a block of content. The header, footer, left ahnd side, and right hand side are all includes.

Take care,

Brian

ideavirus




msg:664344
 3:50 am on Aug 7, 2005 (gmt 0)

Jaime ... Thank you soo much for the inputs and the directions/pointers. they will be so very helpful. Yes I did think of the issue you emntioned that there should be no need to change the file extensions from .html to .php so that i do not lose the SE indexed pages. I will do the search and use the pointers you gave me.

Brian ... I always wanted to know more about possibly using SSI...can you give me some pointers available either within this forum or sticky me with some external pointers if they cannot be posted in the thread?

Thank you soo much again.
Cheers

kjs50




msg:664345
 5:30 pm on Aug 8, 2005 (gmt 0)

Another way to do the same which I utilize is to have all your page information and content in a database. I then use a php script and smarty templates (optional) to generate each page and the write to a file as .html

So, I manage all my data dynamically, but publish it static.

oddsod




msg:664346
 5:34 pm on Aug 8, 2005 (gmt 0)

>> I always wanted to know more about possibly using SSI

Double check with your host. You may need the file extensions to be renamed to something like shtml. Or... back to the previous suggestion about parsing.

PatrickDeese




msg:664347
 5:40 pm on Aug 8, 2005 (gmt 0)

I use php to create includes - and all my older sites with .htm/.html extensions have been modified to parse php through the html extension - works great.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved