NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Cutting my XHTML page up and use a PHP Include??

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-13-2006, 10:42 AM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Apr 2006
Location: ۖG£ÂñÃ
Posts: 135
xxll_martin_llxx will become famous soon enoughxxll_martin_llxx will become famous soon enough
 



Cutting my XHTML page up and use a PHP Include??


Hey!

Basically I have a valid XHTML 1.1 page with valid CSS (www.rbashots.hostmatrix.org)

I want to cut my page up into a few parts and use a php include so that if I want to change/edit my links or on one page have a different logo then I only have to change my file.

How do I determine how big each php include will be?

I've got a link to a picture of my site I've drawn on to show more clearly what I mean (Just follow the black lines)

http://www.rbashots.hostmatrix.org/andreas.PNG
????: NamePros.com http://www.namepros.com/programming/246927-cutting-my-xhtml-page-up-use.html

If I was to do this does it mean my page becomes unvalidated, or is there a way to do this and keep the validation?
xxll_martin_llxx is offline  
Old 10-13-2006, 10:52 AM   #2 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




I'm not sure what your asking, but php wont effect the validity of the pages.
Barrucadu is offline  
Old 10-13-2006, 11:09 AM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Apr 2006
Location: ۖG£ÂñÃ
Posts: 135
xxll_martin_llxx will become famous soon enoughxxll_martin_llxx will become famous soon enough
 



OK That's good it won't effect the validity of it.

What I'm trying to say is that if I made 50 pages with the code I have now on my index.html then I added all my information in each of the 50 pages and I wanted to add another link to the menu I would then have to go through 50 pages and add it manually. WELL I don't want to.

I want to cut the menu bar out, and use a php include to add it in so that if I wanted to add another link I could add it to 'that' file (where the php include links to) and it would update on every page.

How do I customize how the include goes? What code to keep my page the same do I use so it doesn't get all mucked up. Do I just take the bits of code I want in the include and place it in the .php file and then it will work JUST LIKE THAT?

Thanks
xxll_martin_llxx is offline  
Old 10-13-2006, 11:59 AM   #4 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Yep, just put the bit of code you want in the include file
Barrucadu is offline  
Old 10-13-2006, 01:20 PM THREAD STARTER               #5 (permalink)
NamePros Member
Join Date: Apr 2006
Location: ۖG£ÂñÃ
Posts: 135
xxll_martin_llxx will become famous soon enoughxxll_martin_llxx will become famous soon enough
 



AHa!!

It actually worked flaw-lessly for me!

I do need one bit of help though.

My title/logo area is made up of CSS and I want to cut that up also so that I can have the "Page Title" and "Second Title" on the left (how it is now) and then if I want to add a logo or a google ad or something in to the RIGHT HANDSIDE (Where all the space is) at a later time using the php include how do I edit the CSS so that I can do this??
????: NamePros.com http://www.namepros.com/showthread.php?t=246927

CSS: www.rbashots.hostmatrix.org/stylesheet.css
PAGE: www.rbashots.hostmatrix.org/index.php
xxll_martin_llxx is offline  
Old 10-13-2006, 01:35 PM   #6 (permalink)
Senior Member
 
nasaboy007's Avatar
Join Date: Jul 2005
Location: NJ
Posts: 1,219
nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of
 



well this part:

HTML Code:
<h2>Favorite Links</h2>

<ul class="menublock">

<li><a href="http://www.redbluearmy.com">Red Blue Army </a></li>
<li><a href="http://www.shotsweb.co.uk">Shots Web </a></li>
<li><a href="http://www.theshots.co.uk">The Shots.co.uk</a> 

<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" /></a> 
<a href="http://jigsaw.w3.org/css-validator/">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a>

</li>

</ul>

<div class="small box">&nbsp;</div>


</div>
should be somewhere in your php include files (assuming you sliced/included it correctly/smartly) so just add in the right <div>s in there with the classes in the css.
nasaboy007 is offline  
Old 10-13-2006, 01:45 PM THREAD STARTER               #7 (permalink)
NamePros Member
Join Date: Apr 2006
Location: ۖG£ÂñÃ
Posts: 135
xxll_martin_llxx will become famous soon enoughxxll_martin_llxx will become famous soon enough
 



Originally Posted by nasaboy007
well this part:

HTML Code:
<h2>Favorite Links</h2>

<ul class="menublock">

<li><a href="http://www.redbluearmy.com">Red Blue Army </a></li>
<li><a href="http://www.shotsweb.co.uk">Shots Web </a></li>
<li><a href="http://www.theshots.co.uk">The Shots.co.uk</a> 

<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" /></a> 
<a href="http://jigsaw.w3.org/css-validator/">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a>

</li>

</ul>

<div class="small box">&nbsp;</div>


</div>
should be somewhere in your php include files (assuming you sliced/included it correctly/smartly) so just add in the right <div>s in there with the classes in the css.
Do you mean add the <div>s into my index.php or into each include file? At the moment I have the div's in my index.php and then placed the php include between the div's and it's working fine.
????: NamePros.com http://www.namepros.com/showthread.php?t=246927

I just need help on doing the top area with my CSS and doing the right hand side bit of it...
xxll_martin_llxx is offline  
Old 10-13-2006, 02:59 PM   #8 (permalink)
New Member
Join Date: Oct 2006
Posts: 14
profilepeep is an unknown quantity at this point
 



i do this on all my sites, it makes editing so much easier
profilepeep is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:52 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger