eXceem

Go Back   eXceem > Websites > Website Discussion

Claim your amazing £1,000 slots booster bonus now!


what a useful piece of coding!

This is a discussion on what a useful piece of coding! within the Website Discussion forums, part of the Websites category; I imagine this is something that you heavy coders will find ever so basic, but for those of you that ...

Reply
 
Thread Tools
Old 13-03-10, 03:15 AM   #1
iPod 60gb
 
williamblah's Avatar
 
Join Date: Sep 2009
Location: Colchester, Essex
Posts: 1,635
williamblah is just really nicewilliamblah is just really nice
Send a message via twitter to williamblah

what a useful piece of coding!


I imagine this is something that you heavy coders will find ever so basic, but for those of you that have pieced together a very basic knowledge of html, take a look at this: Digital Web Magazine - Easy-peasy PHP 2

It allows you to have one file that is, for example, a footer.

You then put a piece of code on every page you want the footer in.

This way, if you find later down the line you want to change the footer, it's easy!
 
Reply With Quote
Old 13-03-10, 09:12 AM   #2
Super Moderator
 
MJ10's Avatar
 
Join Date: Nov 2008
Location: Thatcham, Reading
Posts: 14,584
MJ10 is a splendid one to beholdMJ10 is a splendid one to beholdMJ10 is a splendid one to beholdMJ10 is a splendid one to beholdMJ10 is a splendid one to behold
Send a message via twitter to MJ10

Re: what a useful piece of coding!


Nice, I'll have a look when on the computer.

So am I right in saying (coz can't see it on phone) that if you edit, eg the footer, it changes it on every page? Also is it a simple piece of HTML or is it something only WP and DW users can use?

Thanks! (rep when on comp, tapatalk is so limited, can't rep or thank!)
__________________
2011 Winner of Best Site Award and Grammanazi Award. Runner up for Member of the Year 2011

Spoiler
^^ See what I have received and how I'm doing ^^

Free iPhone | Free iPhone | Free iPhone 4S | Sign Define App | Freebie Proof Photo Blog


Total Received: £4,218.94 plus Current Stats: 117 green 21 pending



 
Reply With Quote
Old 13-03-10, 09:18 AM   #3
Mini Mac
 
ndev2k's Avatar
 
Join Date: Jun 2008
Location: St Helens
Posts: 4,220
ndev2k is a name known to allndev2k is a name known to allndev2k is a name known to allndev2k is a name known to all
Send a message via MSN to ndev2k Send a message via twitter to ndev2k
Basically it is the way most php based CMS programs such as wordpress work.

You have individual files such as header.php, footer.php, mainbody.php then your basic page layout in the actual pages files will just have references to those files. If you need to change your header on every page you simply edit the header.php if you want to change the footer you edit the footer.php and so on
__________________
Free Stuff |Free iPhone 3GS | Free Nintendo Wii | Free PS3 | Free Stuff
Spoiler

 
Reply With Quote
Old 13-03-10, 10:00 AM   #4
iPod 60gb
 
eonbar's Avatar
 
Join Date: Nov 2007
Location: Reading
Posts: 1,701
eonbar is just really niceeonbar is just really nice
This will be useful. Ta pal
 
Reply With Quote
Old 13-03-10, 02:08 PM   #5
iPod 60gb
 
williamblah's Avatar
 
Join Date: Sep 2009
Location: Colchester, Essex
Posts: 1,635
williamblah is just really nicewilliamblah is just really nice
Send a message via twitter to williamblah
No problem guys! I had a couple hiccups getting it totally working, so if any of you guys decides you want to use it and are stuggling, don't hesitate to hit me up.
 
Reply With Quote
Old 17-03-10, 09:14 AM   #6
iBook
 
messyhead's Avatar
 
Join Date: Oct 2007
Location: Glasgow
Posts: 2,266
messyhead is a glorious beacon of lightmessyhead is a glorious beacon of lightmessyhead is a glorious beacon of light
Thanks for pointing this out, it'll be useful for those that haven't tried it yet. I use this method on quite a few of my sites, as it means you can do things like header, footer, and sidebar just the once, and then you don't need them in every page file.

You can also use it for menus in some cases
__________________
Received about £1600 worth so far!
Spoiler
 
Reply With Quote
Old 17-03-10, 10:14 AM   #7
iPod 20gb
 
saulyx's Avatar
 
Join Date: Jun 2008
Posts: 401
saulyx has a spectacular aura about
php all the way
 
Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off





All times are GMT. The time now is 01:09 AM.
All trademarks and copyrights held by respective owners. Forum posts are owned by the poster.

Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO
no new posts