A Style Sheet Question

A

Arondelle

While I'm not a total neophyte, I'm not a hardcore webhead, either. So,
I have a question, the answer to which is probably intuitively obvious
to those who do this for a living.

I have just spent the past three days migrating my website(s) to a new
host. I hadn't realized how many pages I'd accumulated in my old
webspace -- and now I have to go through the whole shebang and reset the
URL's to the main page, and the Mailto's.

I suppose that if I had my local version set up properly, I wouldn't
have to do this (except for changing the mailto's), but it occurs to me
that there might be a way to set constants for the main URL and email
address in a style sheet. That way, the next time I have to migrate,
I'd only have to change the style sheets, and not individual links in
dozens of pages.

I've looked through the CSS reference, but don't see anything there.
Not that there isn't, mind you, but I haven't a clue where to look. I'm
new to style sheets, BTW, and it's all still baffling.

So, is there a way to put global constants in a style sheet?

(Uh, and what *is* the proper syntax for URL's pointing back up the
directory tree to the main level 2 directories away? Going down is
easy, going back up has me totally confused. That's why I put in
absolute addresses rather than relative ones, and gave myself such a
headache in the first place.)

Arondelle
 
N

Neal

I suppose that if I had my local version set up properly, I wouldn't
have to do this (except for changing the mailto's), but it occurs to me
that there might be a way to set constants for the main URL and email
address in a style sheet. That way, the next time I have to migrate,
I'd only have to change the style sheets, and not individual links in
dozens of pages.

I've looked through the CSS reference, but don't see anything there. Not
that there isn't, mind you, but I haven't a clue where to look. I'm new
to style sheets, BTW, and it's all still baffling.

So, is there a way to put global constants in a style sheet?

Not stylesheets. Look up SSI and PHP includes though.
 
A

Arondelle

Neal said:
Not stylesheets. Look up SSI and PHP includes though.

That would require me to rewrite all my pages entirely in a language I
don't know, wouldn't it? I have no clue about SSI or PHP, except what I
see in my browser address bar, and I don't know if my current host
supports it, anyway. Most low-cost hosts don't, regardless.

Really -- I'm just a hobbyist. If it's too complicated, I don't need to
go there. The world is already too full of hobbyists who think they
know stuff. :eek:)

However, if you want to discuss the joys of PHP, I'm all ears... er... eyes.

Arondelle
--
===========================================================
To email me, empty the pond with a net
Shop eBay with me: http://snipurl.com/3usr
Visit Arondelle's Dream Worlds at: http://www.arondelle.com
Read my Blog: http://www.angelfire.com/blog/arondelle/index.html
 
N

Neal

That would require me to rewrite all my pages entirely in a language I
don't know, wouldn't it? I have no clue about SSI or PHP, except what I
see in my browser address bar, and I don't know if my current host
supports it, anyway. Most low-cost hosts don't, regardless.

Many do, though. I am involved with a website which costs less than
US$100/year. SSI, PHP, MySQL and a bunch of other acronyms[1].
Really -- I'm just a hobbyist. If it's too complicated, I don't need to
go there. The world is already too full of hobbyists who think they
know stuff. :eek:)

However, if you want to discuss the joys of PHP, I'm all ears... er...
eyes.

Well, basically, it is cool, and doing includes isn't TOO tough. A little
more than I have time to get into here, especially if your host won't
support SSI.

But bottom line is that CSS doesn't do what you wish it did, there's other
things that do that.

HTH
 
A

Arondelle

Neal said:
... Most low-cost hosts don't, regardless.

Many do, though. I am involved with a website which costs less than
US$100/year. SSI, PHP, MySQL and a bunch of other acronyms[1].

Can't get much cheaper than free, but I have located one hosting outfit
that does it for $5.99 a year. Yes -- per year, not per month.
However, I'm currently parked on a buddy's home-grown server until I
have $5.99 I don't know what else to do with. :eek:)
Well, basically,
PHP:
 is cool, and doing includes isn't TOO tough. A
little more than I have time to get into here, especially if your host
won't support SSI.[/QUOTE]

I  went and had a look at the PHP reference online.  It doesn't look any
more difficult than, say, Javascript, and I do know Pascal, C++, and
Visual Basic.

However, in order for me to do any development, I'd have to have the PHP
parser here on ol' Nellie.  I dunno if I want to take on any more
"stuff" at this time.  The Java compiler is sitting there collecting
dust as it is.
[QUOTE]
[1] Expecting the old "you can't pronounce it" malarkey from somebody.
Don't argue these are not acronyms, they count as acronyms under all
sorts of standard definitions.[/QUOTE]

Ha! Used to work for the Military-Industrial Complex.  You want
acronyms?  Time to swim in the alphabet soup.  :o)

Arondelle
 
S

Spartanicus

Arondelle said:
I have just spent the past three days migrating my website(s) to a new
host. I hadn't realized how many pages I'd accumulated in my old
webspace -- and now I have to go through the whole shebang and reset the
URL's to the main page, and the Mailto's.
[...]

(Uh, and what *is* the proper syntax for URL's pointing back up the
directory tree to the main level 2 directories away?
.../../file.html

Going down is
easy, going back up has me totally confused. That's why I put in
absolute addresses rather than relative ones, and gave myself such a
headache in the first place.)

There is no need to use absolute url's except for external links.

Assume index.html links to a document in a sub-folder called "example",
reference it like so: example/file.html , link back to index.html from
that file by writing: ../index.html

Do that consistently and you can move to another host without changing a
single link.

A special case is a link that uses the root as base: /file.html or
/example/file.html , usage of this is restricted to sites hosted on a
(sub)domain, it cannot be used on http://host.com/~user/ style urls as
"/" refers to http://host.com/ and not http://host.com/~user/
 
L

Lois

:
: >> So, is there a way to put global constants in a style sheet?

: Neal wrote::
: > Not stylesheets. Look up SSI and PHP includes though.

: That would require me to rewrite all my pages entirely in a language I
: don't know, wouldn't it? I have no clue about SSI or PHP, except what I
: see in my browser address bar, and I don't know if my current host
: supports it, anyway. Most low-cost hosts don't, regardless.
:
: Really -- I'm just a hobbyist. If it's too complicated, I don't need to
: go there. The world is already too full of hobbyists who think they
: know stuff. :eek:)

It isn't complicated at all. I don't know PHP or SSI except how to use
includes. If I could learn that fast, so can you.

For PHP, put something like <?php include './menu.txt'; ?> where the menu
goes, and create one file called menu.txt (or whatever). If PHP is set up,
it'll call that file for each page that has the include, and then you need
to change only one file every time you change something in the menu.

SSI is similar. The include code just looks a little different.

If your pages have an .html extension, you'll need to set up an .htaccess
file, but that's easy too.

Why not find out if your web host supports PHP or SSI. I've seen a lot of
budget ones that do.

(A min. later) I just saw your latest post. You might want to consider a
budget host that supports PHP to save yourself some future headaches.

Lois
 
A

Arondelle

Thank you all. :)

If I'd had half a brain 5 years ago, I would have set up my local
directory structure so that I could have used relative URL's across the
board, and the point would be moot.

However, I didn't, and have been too busy/lazy to go back and straighten
it all out. In fact, it wasn't even an issue until I started hosting at
Angelfire and couldn't get the relative URL's I originally had to work
properly when going from directory to directory.

(I've just bailed out of Angelfire; they just pissed me off once too
often. I have no patience with a host that not only slathers my site
with advertising (which is evil, but acceptable,), but also buries it
with sidebars and other content-obscuring "enhancements.")

I was just hoping that there would be an elegant way to deal with global
changes -- without having to acquire new software to do it.

Arondelle
 
J

Jeff Thies

I was just hoping that there would be an elegant way to deal with global
changes -- without having to acquire new software to do it.

You have all the pages local. Just use any decent text editor (many are
free), open all the pages, and do a search and replace. Then reupload.

Cheers,
Jeff
 
A

Arondelle

Jeff said:
You have all the pages local. Just use any decent text editor (many are
free), open all the pages, and do a search and replace. Then reupload.

Well, there is that. :)

Arondelle
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top