Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
  1. #1
    Junior Member
    Join Date
    Nov 2006
    Posts
    20
    Member #
    14246
    I have been working on a new menu for my site. Since I don't really know about all the codes and such it took me 3 days to get it right. Now I have a problem.
    I want to be able to work on it in an external file.
    I have 245 pages in my site and I want to add more as neewed without having to upload each page in my iste everytime I add something new. So I know I have to do something externally.
    Here is the site I got the code from. http://www.dynamicdrive.com/dynamicindex1/popit.htm
    I have made little buttons and did all the code stuff.
    Here is a sample page of what I did with it
    http://www.colonialzone-dr.com/temp.html
    I just need detailed info on how to make it external. I am revamping all my pages now and really need to get this done.
    Please help this html,java,css challenged gal out.
    Oh..the basic main menu does not change just the internal pages so I would'nt have to change the button part. That could just stay on the page..

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    whew ...

    A site with a lot of information ....
    I won't get into anything about look, layout or content.

    But I can give you something to experiment with.
    Make sure your webhost allows PHP scripting (most allow it).

    Start with one page (this page? temp.html)
    Change the extension from .html to .php
    So now you have "temp.php"

    Now ... take all of this part, (your menu) and cut it out of
    your web page, save it as "menu.txt" and upload that
    text file into the same directory as "temp.php".

    Code:
    /***********************************************
    * Pop-it menu-  Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    var defaultMenuWidth="150px" //set default menu width.
    
    var linkset=new Array()
    //SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
    
    linkset[0]='<a href="http://www.colonialzone-dr.com"><b>HOME</b></a>'
    linkset[1]='<a href="http://www.colonialzone-dr.com/calendar.html">Calendar 2007</a>'
    linkset[1]+='<a href="http://www.colonialzone-dr.com/calendar_2006.html">Calendar 2006</a>'
    linkset[2]='<a href="http://www.colonialzone-dr.com/events-miscellaneous.html">Misc Events</a>'
    linkset[2]+='<a href="http://www.colonialzone-dr.com/events-casandra_awards.html">Casandra Awards 2006</a>'
    linkset[2]+='<a href="http://www.colonialzone-dr.com/events-DIH2.html">DIH2 2006</a>'
    
    .
    .  I took out some to make small for example
    .
    
    ////No need to edit beyond here

    Then, in "temp.php", where the menu used to appear,
    add this line:

    <?php include('menu.txt'); ?>

    Upload your changes and then go to your new web page:
    w w w .colonialzone-dr.com/temp.php


    What's happening is, when the page is viewed, whatever is in the file "menu.txt"
    is replaced into the page. If you make the extension on every page .php,
    you can use the same "php include" .... when you change one file ("menu.txt"),
    it will automatically change on every page.

    You can use PHP includes for content, graphics, anything you want.


  4. #3
    Junior Member
    Join Date
    Nov 2006
    Posts
    20
    Member #
    14246
    Ok. Heres the deal. I don't know if my server allowes php. A friend gave me the space for free so I have no control with any of that.
    Is there a menu thingy that I can use that would work with what I have instead of going through all those changes?
    I have the menu scroll thing and it didn't need all that changing.
    All I want is for people to see what is on the site easily. Since there are so many pages its hard for people to see what all the content is. I just figured this way was the best.
    I know the site doesn't look the best but when I started making it a year ago this month I had no idea what I was doing of what I was going to be having on the site. I just kept adding stuff as I needed.
    There has to be an easier way.
    So...is there an easier way to make a decent menu for the site?

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    OK ...

    I'm now having a hard time determining what you want to change.
    I originally thought you have that menu on every page and that's what
    you want to change.

    I think now you are using some sort of web page editor and when you change
    one thing, it loads up every page? Is that what you mean? So, in fact, you
    only want to change one page and only upload that one page?

    Let us know if that's what you're talking about.




    Meanwhile ... for future use ...
    Try this ... having the abiltiy to use PHP will help you in the future.

    1) Use notepad to create a text file.

    2) Type (or copy and paste) this in and save it as "test.php"

    <?php
    $count=1 + 2;
    echo "This is a test. And the count is: $count";
    ?>


    3) Upload your test page (test.php) and
    go to the web page with your browser.

    4) If you see a screen that says,
    This is a test. And the count is: 3

    Then your PHP is working OK.


  6. #5
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times
    Sorry to butt in, but I did what you say above, I thought I'd test the space on my friends server that he gives me. Instead of opening a web page it asked me whether I want to download the php file, and on his sever the php file doesn't have a particular icon. I assume this means that his server doesn't support php?:cry:

  7. #6
    Junior Member
    Join Date
    Nov 2006
    Posts
    20
    Member #
    14246
    I do use a Web Page editor. It does upload each page seperate or I can upload all at once (which usually freezes this old computer because the site is too large). I am not really ready to change to php for now. I'm still trying to understand the basics so someday I do not have to use this web page maker program. I want to use a real html editor. But this will come in time after I start making some money and get all the information I want on my site. Then I can take the time to study a bit.

    In the meantime. This new menu is only on 1 page. I'm trying it out before I add it to all my pages. After I made it I realized that if I add a new page later in time that I will need to edit every page to put the new addition on the mouse over menu thingy. I like the idea of people seeing what is in each section easily instead of having to go to that. Example the Dominicansmo heading has Dominican Spanish, Sayings, Animal Talk, Food and so on. This menu I found lets a person see all the ..would you call them sub sections? easily. I want to have an external file of the sub sections so when I need to add a new page I do not have to upload it onto each page.
    If this menu I have build cannot do this then there had to be some meun that is in the same form that will. Like my scrolling information box on the top of each page has an external file that when I add to that file then it shows on each page where I have the code entered.
    I do not know all this codeing stuff well. It took me three 9 hour days to get that menu to be what it is now becuase I had no idea what I was doing.

    So if this menu will not do what I want it to do is there another one that someone knows of that will? It is not on every page yet. I am just trying it out and am doing a little tweeking on my site so I thought I could add something to make it easier to get around my site while I was tweeking.

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    Ferro ... if the file extension is .php and you get a dialog box to open the file,
    then yes, your webhost doesn't have PHP enabled.


  9. #8
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    RD_Gringa ...

    Your menu system is like just about any other Javascript menu system.
    It lets you create sub-menus that pop-up with another variety of links.
    The menu system is just for creating links, it has no control over the
    content of the pages.

    So, if you add pages, you'll have to edit your menu, which appears
    on every page. That will be the same with any other menu script.

    The main problem you end up with, is so much content.

    I mention this because another person ended up with the same
    situation. They want to add pages, but not edit every page to
    adjust the navigation menu. So, I directed them to a PHP method
    where each page is a text file instead of a webpage, and the PHP
    script inserts the text file. There is only one file that has the menu,
    so when a new page is added, only two files need to be changed,
    the navigation menu and the text file (the web page that is added).

    Here's the example of what their site ended up with:

    http://www.palosantodesigns.com

    Navigate around and you'll see that each page is actually a "page code".
    example ... ?p=3 ?p=4 ?p=5 .... etc.

    The whole site has about 25 pages, but there are only 2 actual web pages.
    The main page, and the page that displays the navigation menu and text file.

    I think what you're doing now is going to be a disaster, but since you already
    have so many pages and so much content, I don't know what you should do.

    If it were me, I would start all over from the beginning. Because you're sort
    of learning as you go, I think it's a matter of having too big of a site for your
    current experience. I just wish you a lot of luck and am afraid I can't provide
    any more advice other than using PHP instead of static web pages.


  10. #9
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    You should be able to stick Javascript in a separate file. If your entire menu is in Javascript (i.e., between <script> tags), you can pull that entire part out, put it in a file like `menu.js', and then change the script tag to read:
    HTML Code:
    <script type="text/javascript" src="menu.js"></script>
    Where `menu.js' is the path to the file where you put the original JS code. Since it's in an external file, you just have to include that one line.

    If there are parts of the menu in plain HTML, however, this won't work.

  11. #10
    Junior Member
    Join Date
    Nov 2006
    Posts
    20
    Member #
    14246
    This is the problem. The script seems to say java and css. I already am using a java script that has an external file . If you look of the top left corner of everypage it is there scrolling all the new things I have added to my site.
    it is on http://www.colonialzone-dr.com
    I have tried uploading the pages of this new menu seperatly. Both a java page and a css page and linking to it in the head of my site. But I must be missing something. I have read alot of info today on how to do this. I have tried every combination and angle I can think of ad uploaded it at least 15 times today and it still won't work.
    So I guess I won;t use it even after I spent 3 days making it right and the last 4 days trying to make it work. At least I learned a little.
    I have some other menus that I'll try making that say they have external files and see how they work. I just wish I thought about the external file before I spent all the time working on it.
    The menu I made is here http://www.colonialzone-dr.com/temp.html

    I have to stop playing with it for now because I have too much new things to add to the site.

    But if anyone knows a decent external file menu let me know please. I want to make all the pages able to be seen easily. Because theres alot of good junk in there..LOL!


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:18 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com