SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    a few php design wishes...

    Well google has failed me in this matter but luckily pointed me towards these forums

    I have two things that I would like to be able to do without too much of a challenge for a newb such as myself. (btw I have tried postnuke, phpnuke, all those etc... dont like em and they are too slow to run off a p200mmx in-house server )

    Well here are the two things that I would like to be able to do with php and mysql if needed:

    1)I am currently likeing this type of design for a new site: www.rgibbs.no-ip.com/new.php I would like to create one template for the outside frames (or tabels...whatever is better) and then have that present on all pages within the site so that if I update some of the navigation frames (or tabels) the main central frame of each individual frame is simply applied to the new outer frames. Does this make any sense? Then all I need to do for each individual page is work on the one central frame that contains all the unique text and or images for that individual page. And if I were to need to update a link or something of that nature I would only have to do it once. Is there a way to do this?

    2)Also I have seen where people have news on their main site that they seem to post rather than go into the php or html file and edit in. I have tried phpnuke etc... Is there any other thing that I could integrate into my main site and then use a gui interface or program to post new news?

    thanks much for any help or links

  2. #2
    SitePoint Addict
    Join Date
    Jun 2002
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure if I have understood you correctly, but I think I might.

    1) It seems to me that you are simply wanting to have a template where you can change one item and have it apply to the rest of te pages. Here's how I have my template set up:
    PHP Code:
    <html>
    <head><title></title></head>
    <body>
    <table width=100%>
      <tr>
        <td colspan="2"><? include "header.php" ?></td>
      </tr>
      <tr>
        <td><? include "navigation.php" ?></td>
        <td><!-- Main Body Text Goes Here --></td>
      </tr>
      <tr>
        <td colspan="2"><? include "footer.php"></td>
      </
    tr>
    </
    table>
    </
    body>
    </
    html>
    Of course, this has been greatly simplified to show you the basic jist of it all, but I hope you see what I mean.

    As far as the news feed thingie, I can't help you on that one. Good luck and I hope that I have helped you somewhat.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a bunch ian that works perfectly for me

  4. #4
    SitePoint Addict
    Join Date
    Jun 2002
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad I could be of assistance.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ohh i got one question about it. Right now it looks like this: www.rgibbs.no-ip.com/test/ is there a way i could have it load them centered?

    thanks

  6. #6
    SitePoint Addict
    Join Date
    Jun 2002
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah that's easy. Just insert a align="center" tag in the table tag as seen below:
    PHP Code:

    <html>
    <head><title></title></head>
    <body>
    <table width=100% align="center">
      <tr>
        <td colspan="2"><? include "header.php" ?></td>
      </tr>
      <tr>
        <td><? include "navigation.php" ?></td>
        <td><!-- Main Body Text Goes Here --></td>
      </tr>
      <tr>
        <td colspan="2"><? include "footer.php"></td>
      </
    tr>
    </
    table>
    </
    body>
    </
    html>

  7. #7
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm its not working heres what I have:
    <html>
    <head><title></title></head>
    <body>
    <table width=100% align="center">
    <tr>
    <td colspan="2"><? include "topframe.php" ?></td>
    </tr>
    <tr>
    <td><? include "sideframe.php" ?></td>
    <td><!-- Main Body Text Goes Here --></td>
    </tr>
    <tr>
    </tr>
    </table>
    </body>
    </html>

  8. #8
    SitePoint Addict
    Join Date
    Jun 2002
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well that's odd. Is the link that you are testing this on still http://www.rgibbs.no-ip.com/test/? Also, you might want to go ahead and remove that last set of empty <tr></tr> tags at the bottom of your code.

  9. #9
    SitePoint Addict
    Join Date
    Jun 2002
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, I'm not sure if this matters, but you might want to remove the <html><head></head><body></body></html> tags from all the included PHP files since the template file will already contain these tags. Just a thought.

  10. #10
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that is the whole file that code...nothing else so for the moment I am keeping the html tags...

    file still here www.rgibbs.no-ip.com/test/index.php and i removed the two tr tags

    weird that it doesnt center

  11. #11
    SitePoint Addict
    Join Date
    Jun 2002
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is odd that it doesn't center. It really might be the fact that the topframe.php also calls <html> and <body> etc., but I'm not really sure. I only noticed it because I did a "View Source" and saw how many times <html> and the others were called.

  12. #12
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay well I got it how I want it now. The php code looks like so (for the entire page):
    <html>
    <head><title></title></head>
    <body>
    <table width=100% align="center">
    <tr>
    <td colspan="2"><? include "template.php" ?></td>
    </tr>
    <tr>
    </table>
    </body>
    </html>
    and it is here: www.rgibbs.no-ip.com/test

    now the one thing I need to figure out in order to get it to work is how to have the page I want go into the grey space below and to the right of the two nav bars.

    so how do I do this?

    thanks so much for all the help

  13. #13
    SitePoint Addict
    Join Date
    Jun 2002
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the way I did it was with the code block that I gave you earlier. I simply place the content in the area that says <!-- content goes here -->.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •