[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 10-13-2006, 09:42 AM   #1 (permalink)
NamePros Member
 
Join Date: Apr 2006
Location: €ñG£ÂñÐ
Posts: 135
64.00 NP$ (Donate)

xxll_martin_llxx will become famous soon enoughxxll_martin_llxx will become famous soon enough


Arrow 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

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, 09:52 AM   #2 (permalink)
Barru.
 
Barrucadu's Avatar
 
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,731
78.50 NP$ (Donate)

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, 10:09 AM   #3 (permalink)
NamePros Member
 
Join Date: Apr 2006
Location: €ñG£ÂñÐ
Posts: 135
64.00 NP$ (Donate)

xxll_martin_llxx will become famous soon enoughxxll_martin_llxx will become famous soon enough


Arrow

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, 10:59 AM   #4 (permalink)
Barru.
 
Barrucadu's Avatar
 
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,731
78.50 NP$ (Donate)

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, 12:20 PM   #5 (permalink)
NamePros Member
 
Join Date: Apr 2006
Location: €ñG£ÂñÐ
Posts: 135
64.00 NP$ (Donate)

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??

CSS: www.rbashots.hostmatrix.org/stylesheet.css
PAGE: www.rbashots.hostmatrix.org/index.php
xxll_martin_llxx is offline  
Old 10-13-2006, 12:35 PM   #6 (permalink)
Senior Member
 
nasaboy007's Avatar
 
Join Date: Jul 2005
Location: NJ
Posts: 1,112
1,454.30 NP$ (Donate)

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 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, 12:45 PM   #7 (permalink)
NamePros Member
 
Join Date: Apr 2006
Location: €ñG£ÂñÐ
Posts: 135
64.00 NP$ (Donate)

xxll_martin_llxx will become famous soon enoughxxll_martin_llxx will become famous soon enough


Quote:
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.

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, 01:59 PM   #8 (permalink)
New Member
 
Join Date: Oct 2006
Posts: 14
0.00 NP$ (Donate)

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

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 On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 11:36 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85