ok im used to using php to include files such as the header and footer and then using switch statements to pull the content into the middle these. this makes all the pages look alike and nice.
i was looking at sites such as www.redvsblue.com and noticed that their pages dont all stay on the same page but all look alike (they pull thier header footer and sidebars etc without staying on the same page (ex. index.php)
do they use php include() or are they using some other way to pull their other pages in? i just like the way that it can go to for example (sitename.com/members/memberlist.php) without looing like this (index.php?act=members&page=memberlist (the way mine looks))
alternative way to include header /footer etc
Started by trs21219, May 12 2007 10:26 PM
4 replies to this topic
#1
Posted 12 May 2007 - 10:26 PM
#2
Posted 13 May 2007 - 01:24 AM
well, in the case of "sitename.com/members/memberlist.php" I doubt they are doing anything with mod_rewrite, which is a possibility to make it appear as though it is going to individual pages when it isn't.
It is also possible that they are including the headers and footers on those pages as well.
It is also possible that they are including the headers and footers on those pages as well.
#3
Posted 13 May 2007 - 02:08 AM
Honestly, it would surprise me more if they were not using mod_rewrite than if they were.
When you ask for alternatives to this, and you're working with php, you'll have to keep one thing in mind. There are litterally hundreds of different ways to do this. A couple of includes and a switch() is the most basic of which and inteneded for elementary level programmers (no offense). Template class are a few steps further up the chain and by far more fun to work with. But don't expect to be able to write or even comprehend one right off the bat. I even struggled to get mine working, and am still struggling with revising a few features.
When you ask for alternatives to this, and you're working with php, you'll have to keep one thing in mind. There are litterally hundreds of different ways to do this. A couple of includes and a switch() is the most basic of which and inteneded for elementary level programmers (no offense). Template class are a few steps further up the chain and by far more fun to work with. But don't expect to be able to write or even comprehend one right off the bat. I even struggled to get mine working, and am still struggling with revising a few features.
#4
Posted 13 May 2007 - 10:46 AM
Ya, I would agree with rc, there are tons of ways to do it.
I just recently studied how php.net does it, and I rather liked it, so I 'adopted' their method.
If you can make an sense of it on your own, you can see how they build their pages here. Thats the main layout file atleast, there are tons of other files they use and such as you can see on the left panel. I really like how they built it so that they could include as many columns and wrappers as they need on any page, and its all without using a complex template system.
I just recently studied how php.net does it, and I rather liked it, so I 'adopted' their method.
If you can make an sense of it on your own, you can see how they build their pages here. Thats the main layout file atleast, there are tons of other files they use and such as you can see on the left panel. I really like how they built it so that they could include as many columns and wrappers as they need on any page, and its all without using a complex template system.
#5
Posted 13 May 2007 - 12:20 PM
rc69, on May 13 2007, 03:08 AM, said:
Honestly, it would surprise me more if they were not using mod_rewrite than if they were.
When you ask for alternatives to this, and you're working with php, you'll have to keep one thing in mind. There are litterally hundreds of different ways to do this. A couple of includes and a switch() is the most basic of which and inteneded for elementary level programmers (no offense). Template class are a few steps further up the chain and by far more fun to work with. But don't expect to be able to write or even comprehend one right off the bat. I even struggled to get mine working, and am still struggling with revising a few features.
When you ask for alternatives to this, and you're working with php, you'll have to keep one thing in mind. There are litterally hundreds of different ways to do this. A couple of includes and a switch() is the most basic of which and inteneded for elementary level programmers (no offense). Template class are a few steps further up the chain and by far more fun to work with. But don't expect to be able to write or even comprehend one right off the bat. I even struggled to get mine working, and am still struggling with revising a few features.
i take no offense by that because i am an elementry level programmer. i just got into php about 2 or 3 months ago. thank you all for your help and i will be sure to look around like at the php.net site and see what they have done.
quick question... is template class what IPB uses with IPSClass??
Edited by trs21219, 13 May 2007 - 12:36 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
