Website transitioning

Discuss all aspects of programming here.

Moderator: The Mod Squad

Website transitioning

Postby Toby B. » Mon Jul 19, 2004 10:49 pm

I am looking to rework my site so that it is a static site versus a dynamic site...

I have a test server that I will be using before going live to minimize the downtime. On both servers I have php and MySQL. Right now everything is generic HTML files except for a phpBB forum.

The main portion of the site as it stands right now:
Index
Motherboard info (Compaq)
System quickspecs (in the works)
Contact Us page

On the live server I only have access to 1 database. On the test server I have access to setup multiple databases

thoughts, ideas, etc. are welcome and appreciated
Thanks
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Mon Jul 19, 2004 11:53 pm

do you mean you want to go from a static site to a dynamic site?
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Tue Jul 20, 2004 6:16 am

umm, yeah.... :oops:

integrating things into a database.
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Tue Jul 20, 2004 10:01 am

Toby B. wrote:umm, yeah.... :oops:

integrating things into a database.


ok. your question is kinda vague. I can help you but I need specifics on what you want to accomplish to offer advice.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Tue Jul 20, 2004 12:09 pm

Very sorry about the vagueness (sp?). Basically what I am attempting to do/learn is how to convert a site that is just plain old HTML and integrate it with a MySQL database with a phpBB forum. As you can tell I am a newbie at this...

If I recall correctly this site (motherboards.org) is a dynamic (i.e. database driven?) site.

I would also like to work in a banner rotator option into the site as well.

I do not know XHTML yet, but I am going to be looking into learning soon.

The scope of the site is a Compaq tech support site. With motherboard pages for boards that have been identified or at least a sustantial bit of info is known. Once I get more server space I will most likely add in more options like a download area with hacked BIOSes, manuals, etc. I (like I said) do have a phpBB forum.

hopefully this kind of clears the air a bit?
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Tue Jul 20, 2004 2:08 pm

ok, well lets break it down a bit. Here are some general comments about what I think you want to do.

Making a static page dynamic is pointless if there is no dynamic data. So you need to determine exactly what data is dynamic. Isolate this and you have some starting points.

One area to look at is the site wrapper itself if you have a lot of pages (not including the forum). What I mean by this is most sites have a consistent look and feel across their pages. You can divide your page into 3 parts. A header, content, and footer. You can then use php to load the header and footer to "wrap" the content area. This way you can maintain your site "look" from 2 pages. the header and footer. A lot more can be done with this technique but it is always good to start with the basics and work up from there.

Motherboards.org has a fairly simple header footer that I have changed very little over the past years. Even though it is quite simple it is very powerful and saves me lots of time.

So to sum up, you first need to analyze your site and decide what is dynamic and what is static.

hope this helps.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Hardware Junkie » Tue Jul 20, 2004 5:12 pm

I think the idea Toby is looking for is more modular code.

Instead of altering 100 some HTML files, just alter 1 piece of code and achive the change on all pages.

I think you need to be looking into PHP, Toby
"Imagination is the only weapon in the war against reality." -Jules de Gautier

Image
Hardware Junkie
Mobo-fu Master
Mobo-fu Master
 
Posts: 19405
Joined: Thu Jan 25, 2001 1:01 am
Location: 00000h - 0000Fh

Postby Toby B. » Tue Jul 20, 2004 6:07 pm

I think you need to be looking into PHP, Toby
I have a few books covering PHP and they have some MySQL/other database stuff included. There is no clear definition on how to migrate from a static to a dynamic site, beyond that it can be done.

The PHP bible that I have points out that you (the coder) should break down the current code into bits and pieces to make it more manageable when moving it to the database. I dont know if that means breakdown the folders containing individual files or break down the actual files.

Instead of altering 100 some HTML files, just alter 1 piece of code and achive the change on all pages.
As appealing as that sounds I dont know that it would be effective due to the quantity of info that is changed for each page (mainly pointing at the motherboard pages...

Making a static page dynamic is pointless if there is no dynamic data. So you need to determine exactly what data is dynamic. Isolate this and you have some starting points.
There is currently not a whole lot on the site. Most of the site is taken up with motherboard pages. Other then that I have an index page and a contact us page plus the forum. So what could be condered dynamic data? motherboard pics/pages?

thanks for the help..
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Tue Jul 20, 2004 8:27 pm

typically dynamic data is similar data that is displayed in the same format. Usually called from a database (or flat text file) via a key...

for example. when you are browsing the forums and view a topic. One page is called to view ALL topics. A variable is passed telling the database which topic to display and then the page shows that topics information.

So you have 1 page that can show unlimited numbers of topics. All formatted the same way.

I have two recommendations not in order of importance.

1) hire someone to do your php sql stuff.
2) start learning php. go through your php and mysql books and go through the examples and get them to work on some test pages. Once you start feeling comfortable with php and have gone through some examples you will probably be overwhelmed with ideas on what you can do with php and your site. I do not recommend that you try to migrate your site to php/mysql without at least a semi-good grasp of php. The good news is that php is easy to learn. You can ramp up quickly if you spend some time learning.

An alternate approach to learning php is the route that I took. I decided I needed to rewrite some perl code on motherboard.org and needed database stuff so I just dove in and learned enough to do exactly what I needed. I kept doing this with motherboards.org until I got to be a pretty decent php coder. To go along this route you need a specific project in mind to focus on.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Tue Jul 20, 2004 8:31 pm

ok thanks... I will dig in and start trying the examples and stuff from the books I have....
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Next

Return to Programming

Who is online

Users browsing this forum: BLEXBot [Bot] and 1 guest