1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Easy Site Updating

Discussion in 'HTML & Website Design' started by cabrell, May 21, 2005.

  1. #1
    Hello, this is my first post here. I need some help with a couple of sidebars that I have on my site.

    My site uses basic HTML and CSS. I have two sidebars on every one of my pages - on the left and on the right - and as I add pages to my site, and add them to one of the sidebars, I have to go into every existing page and add them to the sidebar as well... things like this are very tedious and I usually end up having a non-uniform layout. Is there any alternative, perferrably a way so that I only have to edit it once? I saw somethings about PHP but I do not know any PHP yet. If someone knows a way to do it in PHP, let me know and I'll just try to do that.

    If it would help, my site is http://gamers.homeftp.net/

    Thnx -______-^^
     
    cabrell, May 21, 2005 IP
  2. e10

    e10 Well-Known Member

    Messages:
    2,250
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    185
    #2
    Hi Cabrell,

    Well this is the type of question I´d normally leave to those who know what the hell they are talking about but you haven´t had an answer yet so maybe this is worth something, maybe not...

    My first real site was built in FP ... page by page. After a while I figured out how to use includes for footers and headers - okay! That was a bit better. But there are still a whole bunch of black sheep pages out there that i have never got round to bringing into the fold.

    Later I discovered Dreamweaver and the beauty of templates, library items and all that jazz. Much, much easier.

    But you know what, even though all the new sites I do for anyone else are done on DW,and I still couldn´t tell you what PHP code was if it jumped up and bit me on the backside, the old FP site is still the one that pays my rent.

    I´ll watch this thread with interest and learn from the answers you get. Welcome to DP :)
     
    e10, May 21, 2005 IP
  3. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #3
    Both Dreamweaver and FrontPage have the ability to do client side includes. There is also the option of server side includes available. You definitely need to use some type of include for your work.

    I like you e10 have only dabbled in client side includes since my host gave my partner a cease and desist on all the server side includes he was using.

    How are you coding your pages?

    Shannon
     
    Smyrl, May 21, 2005 IP
  4. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #4
    You add a command to the .htaccess file that tells the system to treat .html files as php and you change your side bars to sb1.html and sb2.html and use a php include to replace the actual html is each file.

    Then there is one file for each side to update that fixes all pages at once.

    It can be tedious to convert, but worth it in the end.
     
    noppid, May 21, 2005 IP
  5. cabrell

    cabrell Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    :confused: noppid that is a great response but I somewhat lack the technical proficiency in the area of PHP that would be necessary to modify my pages the proper way so as to implement the include file ability of PHP that you describe.
     
    cabrell, May 21, 2005 IP
  6. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
  7. Padawan

    Padawan Peon

    Messages:
    1,085
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I was clueless how to do this too so I got a designer at the forum where I am a mod to do it for me for $10 :)

    You can find him here if interested.
     
    Padawan, May 21, 2005 IP
  8. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #8
    That's the ticket, hire someone to do the first page and you take over.

    I can do it, but not for 10$. I'll be reasonable, but there are factors to consider that are unknown at this point.
     
    noppid, May 21, 2005 IP
  9. cabrell

    cabrell Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I can do it too (the grunt work of trucking the raw data from my existing files to my new sidebar pages)... all I need to know is what code to include, probably only a line or so, and the steps that it would take to recognize html files as php files using .htaccess.

    I would actually prefer to do it myself, so that I can manage my files better and know what is going on in there :)
     
    cabrell, May 21, 2005 IP
  10. Padawan

    Padawan Peon

    Messages:
    1,085
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Too right, but heck it ain't half boring converting a couple of hundred pages - I'm doing it right now and I'm beginning to get a headache, but I'm sure it is going to save me far more time in the future :)
     
    Padawan, May 21, 2005 IP
  11. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #11
    Exactly, that's what the other poster paid to learn. :)

    If you can do the grunt work, the answer is on DP many times over. However it will assume some things and what your code looks like is not one of them.
     
    noppid, May 21, 2005 IP
  12. cabrell

    cabrell Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    huh...? DP? What is DP?
     
    cabrell, May 21, 2005 IP
  13. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #13
    DP = DigitalPoint the name of this forum.

    Shannon
     
    Smyrl, May 21, 2005 IP
  14. cabrell

    cabrell Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    So I've come to this forum to seek help in a small facet of understanding PHP, and I'm going to be charged for it?

    Talk about cheapskates...
     
    cabrell, May 21, 2005 IP
  15. Netizen

    Netizen Peon

    Messages:
    148
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Short tutorial on php includes:

    On apache, create a .htaccess file with the following lines:

    RemoveHandler .html .htm
    AddHandler application/x-httpd-php .php .htm .html
    Code (markup):
    and place it in your site root folder.

    Create header.php or whatever you want with nothing in it except the html coding. No <doctype>, <html>, etc. Nothing but your html coding for your menu or whatever you want to be able to use on multiple pages.

    In your page.html, use the following line:

    <?php include('header.php'); ?>
    Code (markup):
    and your page will be served with the coding inserted.
     
    Netizen, May 21, 2005 IP
  16. cabrell

    cabrell Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    i don't have apache i have abyss web server... and its not working. here's what i did:

    made new file beside index.html, called it ".htaccess". added what you said.

    made new file beside index.html, called it "sb1.php". added what you said.

    made new file beside index.html, called it "sb2.php". added what you said.

    opened file called index.html. removed what i added to sb1 and added what you said for it.

    result: sb1 is (visually) gone from my index.html.

    what is the problem?
     
    cabrell, May 22, 2005 IP
  17. Netizen

    Netizen Peon

    Messages:
    148
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Abyss? I doubt you'll find anyone with any knowledge of abyss here. Almost everyone uses apache or IIS.

    Visit the abyss help pages:

    http://www.aprelium .com/ abyssws/ php.html

    (remove the spaces in the URL)

    I can't tell if php includes will work, but it does say SSI works, so maybe...
     
    Netizen, May 22, 2005 IP
  18. cabrell

    cabrell Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    :confused:? I didn't know you had to install PHP... to me that sounds like installing HTML.... lol.... well I guess that is probably the problem x_X
     
    cabrell, May 22, 2005 IP
  19. YianG

    YianG Peon

    Messages:
    181
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Why does it ask me to download the page when I try to see it? I can see the site fine if I manually open it with my browsers... am I missing something here?

    The question you ask in your first post look really simple, sound like something even I can solve... Here are a few options I can think of now:

    1) Use PHP. I know that you want to use PHP, but doesn't sound like you know how. It's easy if you have Dreamweaver. Make a new PHP page, and just include a php component and use the php code tell where each page will go.

    Take my blooaag for an example: http://www.yianthegreat.com You see i have a sidebar on the left as a menu? I click on it, my page at the main page changes, thanks to PHP. But if I ever need to add something to that menu, say, a new banner, a new link, I never have to go through every page, because that's the basic HTML way.

    It gets long if you want to know what PHP code you need, though. I guess you can just look at my source code and see what I have in there... don't make fun at my stylesheets, though. I know it is a mess.

    2) Use frames. This is really a lame solution, but it does fulfill your purpose...? Use Frontpage is lame enough, and now I'm telling you to use frames. Oh, I have a better one, even lamer... use iframe!

    Seriously though, I think PHP is just what you need.
     
    YianG, May 22, 2005 IP
  20. Dreamshop

    Dreamshop Peon

    Messages:
    1,026
    Likes Received:
    84
    Best Answers:
    0
    Trophy Points:
    0
    #20
    If you have Dreamweaver you can also use DW templates. I would keep your current pages as is (unless you have time to go back and change all of them). Then new ones can be added via the template.

    Just take a blank site page and do "save as template". Then add editable region where you want page content to go. Your nav bar becomes would be a fixed element that can only be edited in the template. When you save changes in the template it updates ALL pages that use that template.
     
    Dreamshop, May 22, 2005 IP