How to display the same links in every page?

D

David Dorward

However, you can create an account and use Google's site maps to ensure
that your site is properly indexed. Never been a problem here.

Other search engine indexing bots won't be looking at Google Sitemap XML
files.
 
J

JAF

On 28 Aug 2006 16:03:22 -0700, (e-mail address removed) wrote:

snip...
My webhost doesn't support server side scripting. Can i store the links
in an external file and insert them by client side scripting? Please
help.

I tried several ways to do this. The way I settled on is to use php.
If your web hosting company allows php, I would suggest using it.

It is easy to learn, and once you have learned php, you will start to
think of many ways to reuse code.

For example, I use the "include" statement in php to insert code into
multiple html files, specifically, I insert the html code for

key words

navigation links
- top nav links
- left nav links
- bottom nav links
- etc

header sections

footer sections

copyrights

ads


Here is a brief example:

let's say you html file is something like this

line of code 1

line of code 2

line of code 3

line of code 4

line of code 5

line of code 6

If you want to reuse lines 3, 4, and 5, you would have a file that
reads


line of code 1

line of code 2

<? include "php_file.txt"; ?>

line of code 6


And you "php_file.txt" would contain

line of code 3

line of code 4

line of code 5

The include would insert the code right into the line where the
include is.

Another example:

I created this text file that I call "copyright.txt". Here is the
code:

<p align="center">Copyright © 1995-2006 BSC,
Inc.&nbsp; All rights reserved.&nbsp;&nbsp;
<a href="http://www.bscinc.net/contact_us.php">Click Here To
Contact Us</a> with questions or comments about this web site.</p>

And I put this include line at the appropriate spot at the bottom of
every html page:

<? include $phpdir . "copyright.txt"; ?>

When my page is served by the web hosting server, the include reads in
and inserts the html code in the text file.

I love php. It is worth learning because you can learn little pieces
at a time and reap great rewards, i.e. savings in time. But you can
go on to learn much more complicated aspects of php, like the use of
variables and conditional programming, to do some very nice things
with it.

Php works well for the casual programmer and the expert.

The only catch is your web hosting company has to offer it. Most I
have found do.
Best regards,

JAF
http://www.bscinc.net
http://www.affordablefloridainsurance.com
http://www.discountdrivingschool.com
 
J

JAF

I forgot to add an important line to the below statements in my
previous posting:
When my page is served by the web hosting server, the include reads in
and inserts the html code in the text file.

(info I forgot to include:)
And If I need to make a change in the copyright code or if I want to
add something to the copyright.txt file, I only have to edit the
copyright.txt file, i.e. type once, then I upload the file, and,
viola!, all web pages that have the include copyright.txt statement in
them now have the new code included when viewed by a visitor to your
site..

It is great.



Here is the relevant text of my previous postint:
snip...
Another example:

I created this text file that I call "copyright.txt". Here is the
code:

<p align="center">Copyright © 1995-2006 BSC,
Inc.&nbsp; All rights reserved.&nbsp;&nbsp;
<a href="http://www.bscinc.net/contact_us.php">Click Here To
Contact Us</a> with questions or comments about this web site.</p>

And I put this include line at the appropriate spot at the bottom of
every html page:

<? include $phpdir . "copyright.txt"; ?>

When my page is served by the web hosting server, the include reads in
and inserts the html code in the text file.

I love php. It is worth learning because you can learn little pieces
at a time and reap great rewards, i.e. savings in time. But you can
go on to learn much more complicated aspects of php, like the use of
variables and conditional programming, to do some very nice things
with it.

Php works well for the casual programmer and the expert.

The only catch is your web hosting company has to offer it. Most I
have found do.
Best regards,

JAF
http://www.bscinc.net
http://www.affordablefloridainsurance.com
http://www.discountdrivingschool.com


Hope this helps.


Best regards,

JAF
http://www.bscinc.net
http://www.affordablefloridainsurance.com
http://www.discountdrivingschool.com
 
J

Jonathan N. Little

JAF said:
On 28 Aug 2006 16:03:22 -0700, (e-mail address removed) wrote:

snip...

I tried several ways to do this. The way I settled on is to use php.
If your web hosting company allows php, I would suggest using it.

Just for your information, PHP *is* server-side scripting. And the OP
states above...


To OP, as others have suggested, hosting companies are a dime-a-dozen,
find one that does support PHP and save yourself and your visitors
headaches!

<snip>
 
J

JAF

Small point, but I though server side scripting referred to specific
packages or functions like cgi scripting. I thought server side
scripting did not include php.

Again minor point.

To get back to my post, I love php. I would suggest the OP look into
php and see if his web hosting company does or does not support it.

If they don;t, and the OP likes the potential of php, then switch to a
web hosting company that supports php. As you point out, there are
many web hosting companies that do offer great prices, reliable
service, and php.

By the way unless there is some new product, language or capability
that I don't know of, there is virtually no way to reliably include,
insert, or merge files dynamically, as one way to solve the OP's
problem, without having the server do it before delivery to the web
browser. Thus a server needs to be found that can do some of the
processing when a page is called up.

Note I say reliably, meaning you get the effect you want, because I
have tried things like iframes and found them unsatisfactory in many
ways.

So I am staying with php. It is powerful, yet relatively easier to
learn. With a minimum of practice, ou can do some very efficient
things with it. you do not have to be an expert to benefit from it.

Others may disagree or have other preferences.



Best regards,

JAF
http://www.bscinc.net
http://www.affordablefloridainsurance.com
http://www.discountdrivingschool.com
 
W

wayne

dorayme said:
That sure is getting back to it. You don't mess about.

If your site supports php (and MySql), you might want to look at a
packaged cms solution. There are many good ones available, I recently
started using phpwebsite because the code at their website validates
while the code of most of the others does not. There are many modules
available, menu makers, form makers, document management, logon
management, etc.

--
Wayne
http://www.glenmeadows.us
With or without religion, you would have good people doing good things
and evil people doing evil things. But for good people to do evil
things, that takes religion.
—Steven Weinberg
 
J

Jonathan N. Little

JAF said:
Small point, but I though server side scripting referred to specific
packages or functions like cgi scripting. I thought server side
scripting did not include php.

Again minor point.


Nope, PHP is server-side scripting, as is Perl, ASP, ColdFussion and
many others....
To get back to my post, I love php. I would suggest the OP look into
php and see if his web hosting company does or does not support it.

If they don;t, and the OP likes the potential of php, then switch to a
web hosting company that supports php. As you point out, there are
many web hosting companies that do offer great prices, reliable
service, and php.

No disagreement there.
 
W

wayne

wayne said:
If your site supports php (and MySql), you might want to look at a
packaged cms solution. There are many good ones available, I recently
started using phpwebsite because the code at their website validates
while the code of most of the others does not. There are many modules
available, menu makers, form makers, document management, logon
management, etc.
Oh, I forgot to mention they are free!

--
Wayne
http://www.glenmeadows.us
With or without religion, you would have good people doing good things
and evil people doing evil things. But for good people to do evil
things, that takes religion.
—Steven Weinberg
 

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

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top