ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've just recently started up a web page. All I have to guide me is the few weeks I spent learning HTML in a high school course and google. The main problem I'm having is keeping all pages up to date if I make one change to the format of one (like adding a menu item that needs to be on all pages), I want all to be updated likewise.
Now, I'm sure this is where a scripting language or some sort of application comes into play, but I don't know where to go for help. Perhaps someone could point me towards some sort of resource for help, like a book, webpage, etc. or an application that makes something like this easy.
I know a little about PHP, but I don't think my server space supports it. Thanks in advance for any help you guys can give.
you *could* use xslt to generate pages based on xml files, but that won't mix very well with non-xml (not with the tool I used at least). Generally I wouldn't recommend this.
PHP is probably a *lot* better. Google for tutorials.
You could also look into python or perl. JavaScript is not a good idea: people are advised not to run it (but by security experts, so they don't listen).
Hey thanks for your quick reply. I don't host my own page just because at this point I'm not ready to deal with the installing/configuring/security problems that come with web page hosting. Plus my internet connection is very slow.
I just talked with someone from the support department and she told me that support is very limited, but this is what is available (as it says on the website):
CGI (Perl) Support
Server Side Includes (SSI)
Not exactly sure about what these are, any thoughts?
The main problem I'm having is keeping all pages up to date if I make one change to the format of one (like adding a menu item that needs to be on all pages), I want all to be updated likewise.
Not sure if you know this or not, but css (cascading style sheets) help with this
a lot. If you're doing a web page, you'll eventually want to go to the
tutorials at www.w3schools.com
Also my own 2 cents on the language, IMO php is better than perl for
web development. It's a more readable language (so it's easier to
maintain), it's easier to write, and it's usually a little easier to
configure with the web server. Couldn't hurt to ask your host
about offering it in the future.
As far as perl, www.perlmonks.org is a sight that might
help you, but some of their stuff is kinda advanced though.
I agree with jonaskoelker. You don't need to script unless you want to have dynamic html that accept input, store things in your website, allow you to search contents and that kind of things. If you have common menus and styles, you can do that with HTML (using a frame for the menu, for instance) and CSS (for all the appareance, like colors and fonts). You can learn all this stuff (and a lot more) in http://www.w3schools.com , which contains excellent tutorials with interactive examples.
Thanks for the great links, looks like I'm on my way!
You're welcome (on my part, at least)
You may also want to have a look at http://jonaskoelker.homeunix.org/ (that's my blog & misc. crap) for some real-life (but none the less lame ) web page sources.
The main problem I'm having is keeping all pages up to date if I make one change to the format of one (like adding a menu item that needs to be on all pages), I want all to be updated likewise.
dubya,
Learn to use .css files (style sheets). It's very easy. Find some good info here: http://www.w3schools.com/
What you want to do (as quoted above my reply) has nothing to do with scripting or CGI.
That said, the next thing you'll probably want to learn is either Perl or Python, and then how to make those Perl/Python scripts run on behalf of your ISP's web server (this is what "CGI scripts" are -- you write some Perl/Python/Ruby/PHP/C/whatever code that spits out some html when you point your browser at them).
Thanks for the help, and I like your page design, jonaskoelker.
One more thing I want to know that I haven't found in the CSS tutorial; can you keep recurring menus uptodate with this stuff? For example, jonaskoelker, on your page, you have a menu on the right that appears on all the pages I looked at. If you wanted to add an item to that menu, would you have to manually edit each one of those pages to include that new item?
Type of inclusion | Specific element | Generic element
...
Another HTML document | IFRAME | OBJECT
...
For instance, the following line embeds the contents of embed_me.html
at the location where the OBJECT definition occurs.
...text before...
<OBJECT data="embed_me.html">
Warning: embed_me.html could not be embedded.
</OBJECT>
...text after...
Recall that the contents of OBJECT must only be rendered if the file
specified by the data attribute cannot be loaded.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.