Need some Help...

Discussion in 'HTML & Website Design' started by Cbrackett, Mar 27, 2009.

  1. #1
    I am currently working on a site for my work.. This will be the largest site I have built interms on number of pages that will be included... What I want to know is if any of you know of a tutorial or something that will help me so I can make it so that If i need to make chances to either my side bar or my top bar... that it can change on ever page... so that I don t have to go through them all each one by one and make the change...

    Does anyone have any thoughts?

    [​IMG]

    So basically what you see i want to me able to open and change in one file and it will change over all my pages... Then whats in the white area will be my content for each page
     
    Cbrackett, Mar 27, 2009 IP
  2. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you are well brushed up on your languages then you can use php includes to do this.

    1. Save your header as a separate php file and assign it to a variable.
    2. Repeat this for your sub menu.
    3. Include these files in every page for your site and call the variable that your header is stored in and variable your menu is stored in.
    4. Display the contents of your page by echoing these variables.

    If you know php this is easily done, if not, i suggest you read up on how includes can be used. Very powerful and efficient ;)
    Even though im new here, hope this helps.
     
    Oxi, Mar 27, 2009 IP
  3. Cbrackett

    Cbrackett Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you... I will look into that....

    Do you know any good places for me to brush up on my php :D
     
    Cbrackett, Mar 27, 2009 IP
  4. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try w3schools.com It has a section explaining the php include statement there as well as many others. There you should be able to see how its used and combining that with how to create simple php files (and including html within php expressions) it should be a walk in the park for you ;)
    If you have any other questions about it feel free to pm me.
     
    Oxi, Mar 27, 2009 IP
  5. truivia

    truivia Active Member

    Messages:
    467
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Oxi is correct - w3 is great
     
    truivia, Mar 27, 2009 IP
  6. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #6
    Also php.net can help you.
     
    ExtremeData, Mar 28, 2009 IP
  7. diwebdesign uk

    diwebdesign uk Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I agree with Oxi, definitely using php includes is the way forward.
    killerphp.com is quite a good place to get some decent tutorials on php.
     
    diwebdesign uk, Mar 28, 2009 IP
  8. Cbrackett

    Cbrackett Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks guys... You have all beena huge help... I will let you know who it went...
     
    Cbrackett, Mar 30, 2009 IP
  9. LDews

    LDews Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You can also simply save your header and footer in PHP files and then use
    <?php

    include(your_header_or_footer_file);

    ?>
     
    LDews, Mar 30, 2009 IP
  10. tim.berners

    tim.berners Peon

    Messages:
    81
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hi
    Looks fine,i will get back to you once i analyze your site.
    Cheers
     
    tim.berners, Apr 1, 2009 IP
  11. ByteCoder

    ByteCoder Active Member

    Messages:
    239
    Likes Received:
    2
    Best Answers:
    2
    Trophy Points:
    65
    #11
    Yeah, make your bars as saparate files and use the include function.
    Good luck!
     
    ByteCoder, Apr 1, 2009 IP
  12. Cbrackett

    Cbrackett Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Here another question for you fine gentlemen :)

    Everytime i build a site with any sort of flash... I get that bar at the top when I open it in explorer... Is there a way for me to build it so I dont get that message?? I know there are site all over the place that use falsh and dont have that problem.... I get the same message when I build my interative buttons as well....:confused:


    [​IMG]

    Thanks again guys...
     
    Cbrackett, Apr 1, 2009 IP
  13. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #13
    You get this message only when the files are on your pc (localhost) due to flash security.
    When you will put the website live you will not see this message.
     
    ExtremeData, Apr 1, 2009 IP
  14. traian13

    traian13 Peon

    Messages:
    203
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You should not use flash for navigational buttons, because google can't follow them...
     
    traian13, Apr 2, 2009 IP
  15. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #15
    It's ok to use flash buttons.Google can get links from flash if the flash is optimized for that.But the easiest way is to have the buttons in flash and into the footer to add a html version of website menu.
     
    ExtremeData, Apr 2, 2009 IP
  16. traian13

    traian13 Peon

    Messages:
    203
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I'm not a flash expert... and i didn't know u can optimize flash for that. Nice to know if i ever run into that ... hope it never happens.

    It's ok to put the links into the footer ... but doesn't google give more importance to them if they are placed before or near the content?
     
    traian13, Apr 2, 2009 IP
  17. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #17
    The idea is just to let google know there are more pages to be indexed.
    You can also make a non-flash (html) version of websie.Is very easy to do that with swfobject.Also that will help users whitch don't have flash player to know that to see the website correctly you must install flash player.
     
    ExtremeData, Apr 2, 2009 IP
  18. traian13

    traian13 Peon

    Messages:
    203
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I agree. The non-flash version of the site is a good solution and it's not blackhat if you respect the html version.
     
    traian13, Apr 3, 2009 IP
  19. Cbrackett

    Cbrackett Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Do I write the code in the .PHP file the same way I would a HTML but just save it as a .php?
     
    Cbrackett, Apr 14, 2009 IP
  20. imranzia

    imranzia Well-Known Member

    Messages:
    146
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #20
    Hi Tim,
    Are you the same one who invented WWW?:D
     
    imranzia, Apr 14, 2009 IP