How to make navigation buttons appear on all pages?

M

mbstevens

I am designing a web site and would like to know how to make my navigation
buttons appear on every page of the site. Currently, I select the buttons
and I paste them on every single page, but this is getting annoying, since I
always have do changes to the buttons. I am using Web Page Maker V2. Thank
you very much.

Can we say, "Preprocessor."
http://www.htmlhelp.com/links/preprocessors.html

Or, can we say, "Generate server side.
Learn a bit of Perl or PHP?

Forget Web Page Maker V2, or V. any_damn_number.
Learn some (X)HTML.
 
T

Toby A Inkster

Ed said:
But, using server-side solutions is not an option. For instance, I get
175 Mb of hosting space included in my basic ISP's plan (Comcast). They
don't provide any server-side solutions (PHP etc.) and it really doesn't
make any sense for me to toss that freebie away and pay for hosting when
my site(s) are simply a hobby and not a business.

http://www.110mb.com/
Apache 2, PHP 5.1, MySQL 5.0, 2000 MB space, 100 GB transfer.
Total cost: 0.

(The catches: ".htaccess" is disabled; Perl and Python are "coming soon",
advertising on your 404 pages; PHP seems to be "locked down", with no
mail() function or sockets, which is probably quite a wise precaution for a
free hosting provider, but if you provide proof of ID, they'll open it up.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
 
B

BigDaddyBS

Talal Itani said:
Why did I come here? I came here expecting to find a magic answer, but I
did not find one. I am not guilty. I tried. You tried. Thanks a bunch.


You came for the same reason many others of us came to these groups... To
LEARN.

It's hard to listen to the pros (as most believe themselves to be) slap you
down, but if you learn a little bit from those actually trying to help
(without the slap), and ignore the slappers (unless they actually give some
help), you can make your site better and easier to manage. I found that some
newsgroup people can be quite ... nasty ... to newbies and those they
believe are wrong.

Give any of the methods offered a try. The first time you have to make a
change TO ONLY ONE FILE rather than all the pages on your site, no matter
how few they are, and it works, you will know why.

And remember, elitists, not all people know or find it easy to learn the
things you've been doing for years. From 25 years of programming, I know you
never know it all. Many people don't have the time or money to take classes,
and it seems few read books any more (it's easier to find answers on the
'net). There will always be rookies. If you want to make the web
"standard-compliant", quit calling people names on their first few posts. I
know many people have very satirical and biting humor. Wait until you get to
know whether they really are dumb-sh-ts, a--holes, or some of the more
sophisticated names I've seen, before you call them on it. And, make sure
they know if you're joking. Try being a little lighter for a while.

BigDaddyBS
 
S

Spartanicus

Toby A Inkster said:
http://www.110mb.com/
Apache 2, PHP 5.1, MySQL 5.0, 2000 MB space, 100 GB transfer.
Total cost: 0.

(The catches: ".htaccess" is disabled; Perl and Python are "coming soon",
advertising on your 404 pages; PHP seems to be "locked down", with no
mail() function or sockets, which is probably quite a wise precaution for a
free hosting provider, but if you provide proof of ID, they'll open it up.)

Looks to good to be true, any comments from anyone who has used this
freebee package?

Having created a test account my initial experience is that FTP access
may not be available for prolonged periods due to being limited to 50
users and prone to disconnections when you do get in. It is currently
producing a 403 (Forbidden You don't have permission to access / on this
server.) on my test account.

I might feel more comfortable about this offer if I could figure out
their commercial model. 404 advertising won't cover anywhere near the
cost of this service, and @ 100GB/Month allowed bandwidth I'd guess that
few hobby sites would go over that limit requiring a payware upgrade
package.

Btw, I'm still looking for the reason why hosting providers such as this
one are unwilling to enable .htaccess. 110mb.com only cite a potential
for "abuse", I don't get that since afaics what can and cannot be
changed via .htaccess files can be configured in httpd.conf fairly
precisely.
 
T

Terry

BigDaddyBS said:
You came for the same reason many others of us came to these groups... To
LEARN.

[snip a lot of good stuff]

What a breath of fresh air! Very well said.
 
J

Jonathan N. Little

BigDaddyBS said:
You came for the same reason many others of us came to these groups... To
LEARN.

It's hard to listen to the pros (as most believe themselves to be) slap you
down, but if you learn a little bit from those actually trying to help
(without the slap), and ignore the slappers (unless they actually give some
help), you can make your site better and easier to manage. I found that some
newsgroup people can be quite ... nasty ... to newbies and those they
believe are wrong.

Okay, I reread the thread and I cannot see where anyone slapped this OP.
The only 'slightest' slap was when OP complained that he did not get
the 'magic answer' he expected. Even that was gentle.

To OP: using some sort of include is very easy and makes managing
changes a snap whether your have 10 pages on 1000 pages. You have many
options depending on what your server is running. SSI, PHP, ASP ... If
you have common bits to every page, just save the parts as separate
files and assemble with any of the include methods offered. In PHP it
could be as simple as...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Page Title</title>
</head>
<body>

<?php
include('banner.php');
include('navbar.php');
?>

<h1>My Page</h1>
<p>
The rest of my page...
</p>

<?php include('footer.php' ?>
</body>
</html>

Could not be simpler!
 
D

David Segall

To OP: using some sort of include is very easy... You have many
options depending on what your server is running. SSI, PHP, ASP ...
It is not "very easy" for the OP. It is highly unlikely that he knows
any more than the username, password and URL of his web page. He said
he was using Web Page Maker <http://www.webpage-maker.com/> "an
easy-to-use web page editor that allows you to create and upload web
pages in minutes without knowing HTML". In order to use server-side
includes it is necessary to understand the concept of server-side
processing and sort through your "many options" plus several more
related TLAs. Just uploading the code you kindly provided to the
server is probably beyond the OP's current knowledge since his HTML
editor handles the FTP.
 
T

Toby A Inkster

Spartanicus said:
Btw, I'm still looking for the reason why hosting providers such as this
one are unwilling to enable .htaccess. 110mb.com only cite a potential
for "abuse"

Examples:

1. Via site-wide httpd.conf they block third-party linking to images.
Via .htaccess you enable it and start using their server as a repository
for images linked to from your "real" hosts.

2. They lock down PHP in php.ini. You over-ride their settings using
php_value and php_flag directives in .htaccess.

Also, there's the factor of .htaccess files placing more load onto the
server than httpd.conf settings.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
 
S

Spartanicus

Toby A Inkster said:
Examples:

1. Via site-wide httpd.conf they block third-party linking to images.
Via .htaccess you enable it and start using their server as a repository
for images linked to from your "real" hosts.

httpd.conf is the master file, disable something there and don't allow
it to be overridden and there's no way it can be enabled again by user's
..htaccess files. Also 110mb.com don't currently employ hotlink
protection.
2. They lock down PHP in php.ini. You over-ride their settings using
php_value and php_flag directives in .htaccess.

Every AllowOverride Options directive can be individually controlled,
don't allow an Options directive to be overridden via httpd.conf and
there is no way to undo it via .htaccess
Also, there's the factor of .htaccess files placing more load onto the
server than httpd.conf settings.

Unlike some other free webhosts like portland.co.uk, 110mb.com currently
do not restrict users from running any of the popular scripts which
place a high load on the server. The server load that might be caused by
the use of Apache .htaccess files should pale into insignificance in
comparison.
 
J

Jonathan N. Little

David said:
It is not "very easy" for the OP. It is highly unlikely that he knows
any more than the username, password and URL of his web page. He said
he was using Web Page Maker <http://www.webpage-maker.com/> "an
easy-to-use web page editor that allows you to create and upload web
pages in minutes without knowing HTML". In order to use server-side
includes it is necessary to understand the concept of server-side
processing and sort through your "many options" plus several more
related TLAs. Just uploading the code you kindly provided to the
server is probably beyond the OP's current knowledge since his HTML
editor handles the FTP.

No real excuse, this is not rocket-science, but will take a little
effort on his part. If it is a really simple site the "parts" can be
only the static HTML that his is now using split up into separate files
and names something like in my example and their insertion would be
just as simple as in my example. If OP is unwilling to try, do a teencie
bit a research then he can hire someone to do it for him.

I'm sorry but to me "I want to build my own website but I do not want to
learn anything about HTML" is a akin to "I want to build my house but I
do not want to learn anything about carpentry". If that is the case,
hire a carpenter!
 
T

Toby A Inkster

Toby said:

PS: meant to add that these are examples of why "hosting providers" might
be unwilling to enable .htaccess. They might not apply directly to
110mb.com.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
 
D

dorayme

Judgements of what is easy are invariably due to hindsight,
something OP has not got.
 
J

Jonathan N. Little

dorayme said:
Judgements of what is easy are invariably due to hindsight,
something OP has not got.

I sorry, basic HTML is just not that difficult. Doing elaborate styling
and effects is another matter. But most little personal sites that folks
bang out with these junk WYSIWYG editors is

picture
text
picture
text
picture
text
....
scroll of doom

all shoved into a table.

Maybe a quick hour tutorial, familiarize with the 1/2 dozen or so basic
markup elements

HTML, HEAD, TITLE, BODY, A, P, UL, LI, IMG, DIV, H1, H2, maybe H3...

Plenty of decent templates about, and always folks willing to answer
questions...

Granted PHP is easy but not that ease for newbie, but just for including
parts of the document, well it pretty simple.

Yes, it is not a 'no-fail' endeavor of finger-painting and macaroni-art
of kindergarten, but will a little effort one can easily turnout a basic
HTML page.
 
D

dorayme

Judgements of what is easy are invariably due to hindsight,
something OP has not got.

I sorry, basic HTML is just not that difficult. Doing elaborate styling
and effects is another matter. But most little personal sites that folks
bang out with these junk WYSIWYG editors is

picture
text
[/QUOTE]


What is simple or not is best understood in relation to
background conditions. You would be surprised how easily stuck
some folks can get over server issues, paths, url endings. The
html bits are simple enough for includes, setting the whole thing
up and seeing it working without a good guiding hand can be a
little tricky because one so easily comes across forks the
branches of which are not obviously decidable given the naive
background of the poor mug that has to do the choosing.

I do it this way:

1. Curse the poor schmuck in spite of his free tutorial.
2. Try various options in turn like a monkey on a typewriter till
I hit bingo.
3. I go back and think nicer things of the schmuck, even refer to
him as a mensch, because success has mellowed me.
 
J

John Hosking

Jonathan N. Little wrote:
[...]
<body>

<?php
include('banner.php');
include('navbar.php');
?>

<h1>My Page</h1>
<p>
The rest of my page...
</p>

<?php include('footer.php' ?>

If the OP or any other folk try to use this, they should know that there
is a parenthesis missing above. I think it should be
<?php include('footer.php') ?>

I'm also thinking that the included pages (like footer.php) don't really
need to be .php pages, but could be .htm files instead, as in
<?php include('footer.htm') ?>

Is that true? (Maybe it's obvious I'm not a php user...)
 
D

dorayme

John Hosking said:
I'm also thinking that the included pages (like footer.php) don't really
need to be .php pages, but could be .htm files instead, as in
<?php include('footer.htm') ?>

Is that true? (Maybe it's obvious I'm not a php user...)

The includes can be almost anything is my impression. I use .inc
and is information for my eyes on my machine in searches...
 
R

Rik

John Hosking said:
If the OP or any other folk try to use this, they should know that there
is a parenthesis missing above. I think it should be
<?php include('footer.php') ?>

I'm also thinking that the included pages (like footer.php) don't really
need to be .php pages, but could be .htm files instead, as in
<?php include('footer.htm') ?>
Is that true? (Maybe it's obvious I'm not a php user...)

Both true indeed. Allthough it really doesn't matter what the extension is
when it's included. It will all be treated as either raw output (html in
most cases, but offcourse thing like css or javascript are also possible),
or php between php tags.

In other words: even if the server isn't set up to normally parse .htm
files for php this will work:

---test.php---
<?php include('test.htm'); ?>
--------------

---test.htm---
hello
<?php echo 'world'; ?>
----------------

Looking at test.php you'd see 'hello world', looking at test.htm directly
you'll normally see the unprocessed php.

So no performance benefits to naming the files .htm, only a possible
security risk exposing code that's there. Offcourse, one should never put
php code like this in .htm files, unless one's willing to bug the server
by forcing it to parse .htm files for php too, which would mean a
noticable performance decrease for straight .htm files.
 
J

Jonathan N. Little

John said:
Jonathan N. Little wrote:
[...]
<body>

<?php
include('banner.php');
include('navbar.php');
?>

<h1>My Page</h1>
<p>
The rest of my page...
</p>

<?php include('footer.php' ?>

If the OP or any other folk try to use this, they should know that there
is a parenthesis missing above. I think it should be
<?php include('footer.php') ?>

Yep a typo.
I'm also thinking that the included pages (like footer.php) don't really
need to be .php pages, but could be .htm files instead, as in
<?php include('footer.htm') ?>

Yes, can be, If the include is just static HTML it would be ok, but if
there is any scripting one should use PHP to prevent looking at PHP
source and only have the result visible. '.inc' many times is not
registered on server could be accessed directly as plain text. Would be
a bad thing if the include was the setup for accessing site's database, eh?

-- database.inc --
<?php
$user='admin';
$password='verysecret';
...

Is that true? (Maybe it's obvious I'm not a php user...)

So bottom line is if just plain HTML, sure call the include
'something.html', but if has anything sensitive, better to use
'something.php'
 
A

al jones

I sorry, basic HTML is just not that difficult. Doing elaborate styling
and effects is another matter. But most little personal sites that folks
bang out with these junk WYSIWYG editors is

picture
text

What is simple or not is best understood in relation to
background conditions. You would be surprised how easily stuck
some folks can get over server issues, paths, url endings. The
html bits are simple enough for includes, setting the whole thing
up and seeing it working without a good guiding hand can be a
little tricky because one so easily comes across forks the
branches of which are not obviously decidable given the naive
background of the poor mug that has to do the choosing.

I do it this way:

1. Curse the poor schmuck in spite of his free tutorial.
2. Try various options in turn like a monkey on a typewriter till
I hit bingo.
3. I go back and think nicer things of the schmuck, even refer to
him as a mensch, because success has mellowed me.[/QUOTE]

What is simple or not, also depends on the persons interest and background.
While I did program (as late as the late '80s) in COBOL and business
BASIC's I'm now a truck driver so really have virtually no profesional
intercourse with the 'computing field'. Personally I don't want to have to
know more than I need to to make my site work - I have no plans on
competing with any of you guys professionally.

I'd note that there are often seem to be two trains of constructive answers
given IMHO; the one which provides specific answers to specific
(hopefully) questions (this is me, I would like to think) and those which
tend to be general topical discussions (reserved for you gurus :) ).
 
D

dorayme

al jones said:
I'm now a truck driver so really have virtually no profesional
intercourse with the 'computing field'.

I still have a license to drive very big trucks yet I sit in
front of this computer instead of having fun backing up on
mirrors. I still now and then back up my Ford sedan on mirrors to
get that old feeling...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top