Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 07:49:38 AM

Pages: [1]   Go Down
  Print  
Author Topic: Navigation  (Read 614 times)
hlancaster
Newbie
*
Offline Offline

Posts: 4


WWW
« on: February 16, 2002, 11:26:00 AM »

This is the layout I have on every page of my site:

http://www.lunarpages.com/akarimusha/credits.html

I would like to be able to update the link list to the left without editing every single page.  How can I do that?
Logged
TWebMan
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3112



WWW
« Reply #1 on: February 16, 2002, 02:58:00 PM »

There's a few ways.  You can use some scripting to read them off of a file.  JavaScript, php, and Perl are all good for this.  You can only use php or Perl on paysites though. Some design programs will do this for you.  What program are you using?

[ February 16, 2002: Message edited by: TWebMan ]

Logged

"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila."  - Unknown
"Liberty of any kind is seldom lost all at once." - D. Hume
Every day is an Ode to Joy
The planet will be fine... and so will your site
hlancaster
Newbie
*
Offline Offline

Posts: 4


WWW
« Reply #2 on: February 16, 2002, 11:57:00 PM »

I don't use a program.
Logged
stephan
Guest
« Reply #3 on: February 17, 2002, 05:25:00 AM »

Now that you've uploaded them, unfortunately, there is no easy way to change them.

You are better off downloading them, changing them, then uploading them again.

It is possible to create a script that would go through all the files and change them but that would be more work than downloading and reuploading them.

To avoid this problem in the future, you could make your website use PHP (http://www.php.net).

What I've done on my website is,
I have a text file that I include on every page. You could do the same thing.

To make a PHP page, rename your page from .htm to .php and put this command in where you want the text file included in the page.

<? include ('stephanisgreat.txt'); ?>

where stephanisgreat.txt is the file you want to include (make sure it's in the same directory).

Does this make sense?
If I were you, I'd just download them and upload them again. It won't be too slow.
Logged
hlancaster
Newbie
*
Offline Offline

Posts: 4


WWW
« Reply #4 on: February 17, 2002, 08:08:00 AM »

I have the trial service so I can't use PHP.  
Logged
stephan
Guest
« Reply #5 on: February 17, 2002, 10:55:00 AM »

In that case, you have no option.

You have to download the files, edit them and upload them again.
Logged
MurDoc
Galactic Royalty
*****
Offline Offline

Posts: 321


WWW
« Reply #6 on: February 18, 2002, 02:22:00 PM »

No need for downloading just keep a back up on your computer, edit the files from your computer and upload them, when it asks if you want to replace say yes.

But the best way is using PHP/.txt method.
Logged
Rowan
hamburglar
Über Jedi
*****
Offline Offline

Posts: 1919


I used to be Human....2.0b


WWW
« Reply #7 on: February 18, 2002, 02:33:00 PM »

ssi is also a nice option, but you need a paid account. If anyone wants more info on ssi just ask.
Logged

kahlan
Intergalactic Superstar
*****
Offline Offline

Posts: 138


WWW
« Reply #8 on: February 19, 2002, 12:32:00 PM »

I've got a javascript code that does it... you'll have to change every page initially, but after that just change the .js file...

The code can be seen working on any of my internal pages through my website - http://www.lunarpages.com/dragongirl/

When I first wrote this code noone had done anything like this and I haven't seen any code as simple as this for dynamic menus. I hope it is of use to you. Please keep the commented lines intact in your code as credit to me. Thanks.

Here is the code...

place this where you want the menu to be displayed (ps... you can do all sorts of dynamic menus by changing this little peice of code around a bit. This will do a list of items one after the other):

<!-- menu -->
<SCRIPT LANGUAGE="JavaScript">
// Menu Generator (c) Kahlan Amnell - dragongirl@softhome.net
// Dragon Girl's Realm - http://www.lunarpages.com/dragongirl/
// This script may not be used without permission
for (x=0; x<menuitem; x++ )
   {
   document.write('<A HREF="' + link[x] + '" >' + menu[x] + '</A><BR>');
   }
// End -->
</SCRIPT>


place this inbetween your <head></head> tags:
<SCRIPT LANGUAGE="JavaScript1.2" SRC="menu.js"></SCRIPT>

and create a file called 'menu.js' and place in it the following:

// Menu Generator (c) Kahlan Amnell
// This script may not be reproduced without permission

// Menu for the root directory

var menu = new Array(
"Home",
"About Us",
"Contact Us",
"",    // creates a blank line
"etc"
);

var link = new Array(
"index.html",
"about.html",
"contact.html",
"",
"etc.html"
);

// the number of items in the menu array
var menuitem = 5;

[ February 19, 2002: Message edited by: Kahlan ]

Logged

Bright Blessings from
Dragon Girl's Realm
hlancaster
Newbie
*
Offline Offline

Posts: 4


WWW
« Reply #9 on: February 25, 2002, 11:14:00 PM »

Thank you sooooooooooooo much!
Logged
Santos
Jabba the Hutt
*****
Offline Offline

Posts: 562


WWW
« Reply #10 on: February 27, 2002, 07:52:00 AM »

NEWBIES I SAY !!!!

Just use Dreamweaver    Does it for ya  
Logged

Smile, it makes people wonder what you're up to...
Sailor Aurora
Intergalactic Cowboy
*****
Offline Offline

Posts: 59


WWW
« Reply #11 on: February 28, 2002, 06:09:00 AM »

Santos, that's not very nice..you shouldn't judge people th mintue they post.. in fact, that's my "Newbie" friend that you're talking to...she's been making webpages for four years...so believe me, she knows all there is to know, she just needed help with some few scripts that she hadn't had the hang of yet.
  me, I've been only making webpages for 3 years.
 
 dreamweaver isn't for everyone, you know...sometimes it can be more of an hassle for some people than it is an help to them.
Logged

I am the messiah of time.. for me, everything that will be, has already happened for me.. and at the same time it is happening right now. In this madness of a Time parodox, I become the timekeeper who rocks herself into a nightmare in her own cradle..
Brian
Jedi
*****
Offline Offline

Posts: 874


WWW
« Reply #12 on: February 28, 2002, 06:12:00 AM »

i think someone was just smacked... maybe we should take this over to mind collisions?
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: