| Poster | Thread |
Metalheart
|  |
Need HTML help Posted on 4-Mar-2011 15:52:45
| | [ #1 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| Hi all,
I'm very busy creating a website by writing the code by hand, and was wondering if anyone can recoment an Amiga utility or program that might make it easier for me.
Right now I'm strugling with the following. I have created a menu that consists of some external CSS script and HTML code inside the webpage itself. Since a have lots (over 30 and growing) pages and the menu has to be in every one of them, AND is subject to change later on, I was wondering if there is a way to make the HTML menu part also external. I would be nice if it could be called from inside the main html page, just like one would call a css or java script.
So effectively I want the smaller ecternal menu HTML code to be included in the main code and executed as if it was INSIDE the main code.
for examle: (code has been snipped to avoid a long post, but ofcourse is complete in reality)
main: (index.html)
--snip---
font size=2>Hello, underneath is the menu link rel="menucode" href="menu.html" type="text/css" /> font size=2>and this text is underneath the menu
---snip---
external code: (menu.html)
----snip----
ul> li>menu ul> li>page 3 li>page 2 li>page 3 /ul> /li> /ul>
--snip---
I want it to work like this would:
--snip---
font size=2>Hello, underneath is the menu
ul> li>menu ul> li>page 3 li>page 2 li>page 3 /ul> /li> /ul>
font size=2>and this text is underneath the menu
--snip--
Thanks, hope anyone can help.
ps, I hope you get the idea... I mangled the code to make the tags visible over here.. Last edited by Metalheart on 04-Mar-2011 at 03:59 PM. Last edited by Metalheart on 04-Mar-2011 at 03:58 PM. Last edited by Metalheart on 04-Mar-2011 at 03:57 PM. Last edited by Metalheart on 04-Mar-2011 at 03:55 PM. Last edited by Metalheart on 04-Mar-2011 at 03:54 PM. Last edited by Metalheart on 04-Mar-2011 at 03:53 PM.
_________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
AlexC
|  |
Re: Need HTML help Posted on 4-Mar-2011 16:48:57
| | [ #2 ] |
|
|
 |
Super Member  |
Joined: 22-Jan-2004 Posts: 1301
From: City of Lost Angels, California. | | |
|
| @Metalheart
With cygnix you can use Amaya to create/edit html page (and possibly abiword too if it allows exporting to html)
What you're trying to do menu-wise is most easily accomplished with a Perl server-side includde, something like:
<!--#exec cgi="/cgi-bin/menu.cgi" --> in the page and then a little script in menu.cgi which generates the menu from a database, directory listing or pre-made html file as you see fit.
Note that the server may need a .htaccess file to override the default if you want it to allow using includes without renaming the files to .shtml
(google should help you fill in the blanks)
If you use php you might find it even easier to accomplish with a tag like: <?php include("menu.php"); ?>
BTW to include < tags > in brackets on your posts, just type < tag > and use the back button after hitting preview as the bracket codes aren't preserved in the editor on the preview page. _________________ AlexC's free OS4 software collection
 AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
| Status: Offline |
|
|
g_kraszewski
|  |
Re: Need HTML help Posted on 4-Mar-2011 16:51:00
| | [ #3 ] |
|
|
 |
Regular Member  |
Joined: 3-Sep-2010 Posts: 343
From: Unknown | | |
|
| @Metalheart
I use PHP on the server for it:
File "menu.php":
<? function menu() { ?> Any HTML code here <? } ?>
File "index.php", anywhere in the code...
<? require("menu.php"); menu(); ?>
I use this technique for all repeating parts of the page, like header and footer. _________________ RastPort |
|
| Status: Offline |
|
|
Metalheart
|  |
Re: Need HTML help Posted on 4-Mar-2011 16:54:58
| | [ #4 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| WOW !
Seems easy I'll give it a try !
Thanks,
_________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
AlexC
|  |
Re: Need HTML help Posted on 4-Mar-2011 17:07:57
| | [ #5 ] |
|
|
 |
Super Member  |
Joined: 22-Jan-2004 Posts: 1301
From: City of Lost Angels, California. | | |
|
| @g_kraszewski
Wouldn't it be better to use include() rather than require() for the menu though?
Using require() causes the whole page to fail from loading if for any reason the menu.php file can't be accessed at that moment. When loading a script or data it's better to get an error than some unexpected side-effect but in the case of an html page it's probably preferable to allow the rest of the page to load even if doesn't look as good. _________________ AlexC's free OS4 software collection
 AmigaOne XE/X1000/X5000/UAE-PPC OS4 laptop/X-10 Home Automation |
|
| Status: Offline |
|
|
Metalheart
|  |
Re: Need HTML help Posted on 4-Mar-2011 17:38:54
| | [ #6 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| @g_kraszewski
Index,php ? do you mean index.HTML ?
If no, what else needs to be in index.PHP _________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
Amiga_3k
|  |
Re: Need HTML help Posted on 4-Mar-2011 17:47:09
| | [ #7 ] |
|
|
 |
Cult Member  |
Joined: 17-Jun-2006 Posts: 836
From: Ohrid, Macedonia | | |
|
| @Metalheart
With a site growing that big you should be using a CMS system to keep track of everything. I must admit that I'm not aware of an Amiga CMS, if available.
When I didn't use CMS and did only use the Amiga, I used Javascript to handle the pages and menus. This is an acceptable way for up to 10 pages or so, but for 30ish.... _________________ Back home... |
|
| Status: Offline |
|
|
Metalheart
|  |
Re: Need HTML help Posted on 4-Mar-2011 18:05:35
| | [ #8 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| @Amiga_3k
Well, it's not that all pages have to be maintained. Ones a certain page is finished it doesn't have to change anyomre, ever.... But in every page there is the same menu, and that menu could need several overhauls (changing menu items)
I had a separated frame for the menu, and that worked great. Only one HTML file for the menu, because that frame stayed always. Ans another frame (with the actual page content changed)
But this is no more, I had to get rid of it because we wanted to let the content scroll underneath the menu. So I put th emenu in every page and used CSS to keep the menu on top. Works great, but with mentioned drawback...
Never wanted to be a site builder, but I kinda volunteered to do it Women..... sigh....
Thanks,
Martin _________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
Amiga_3k
|  |
Re: Need HTML help Posted on 4-Mar-2011 18:27:27
| | [ #9 ] |
|
|
 |
Cult Member  |
Joined: 17-Jun-2006 Posts: 836
From: Ohrid, Macedonia | | |
|
| @Metalheart
That scrolling underneath-trick you could have pulled off using an iframe instead of the frame . But I know... Since Web 2.0 (or how do these fast internet guys calling it) frames are not done.... Naggers... 
Are you using a CMS or PHP now or what? Is (part) of the site available on the net? Makes it easier to see what you're trying to pull-off here and makes it easier to give some hints. _________________ Back home... |
|
| Status: Offline |
|
|
itix
|  |
Re: Need HTML help Posted on 4-Mar-2011 18:39:29
| | [ #10 ] |
|
|
 |
Elite Member  |
Joined: 22-Dec-2004 Posts: 3398
From: Freedom world | | |
|
| @Metalheart
You can use server side includes:
<!--#include file="header.html" -->
(Edit: stupid preview was broken)
Last edited by itix on 04-Mar-2011 at 08:00 PM.
_________________ Amiga Developer Amiga 500, Efika, Mac Mini and PowerBook |
|
| Status: Offline |
|
|
Metalheart
|  |
Re: Need HTML help Posted on 4-Mar-2011 19:12:18
| | [ #11 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| @Amiga_3k
I used CSS div's (nit sure what they are officialy called 
CMS ?? I think the webserver uses PHP...
Yes the site is online, but not publicaly available. And in Dutch.... And only 2 pages work right now. I have to be sure that the menu wont need any drastic changes anytime soon. So I only integrated the menu system in two pages yet.
You can try it here: http://www.miek-vormgeving.nl/index-normal.html
Only 'HOME' and the smaller brown painting on the left work for now....
The idea is that the paintings and stuff, scroll underneath the menu, to maximise the vertical space of the screen. (for people who for god knows what reason only have a 640x480 or 800x600 screen)
Keep in mind it is NOT finished yet and there are some ugly colors and tests on the site that have to go, but they are there because I'm trying some stuff.
btw, all critisism is welcome, but please keep it constructive  _________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
Amiga_3k
|  |
Re: Need HTML help Posted on 4-Mar-2011 19:32:08
| | [ #12 ] |
|
|
 |
Cult Member  |
Joined: 17-Jun-2006 Posts: 836
From: Ohrid, Macedonia | | |
|
| @Metalheart
First, the site being Dutch is not a problem. Dongen is not that far away (30-ish km )...
CMS is a abbreviation for Content Management System. Example of free ones are Joomla (rather high entrance treshold) and WebsiteBaker (my favorite, use it for my own site). What you do with a CMS is design a template once and use the back-end to create your pages. The CMS then populates the menu's, keeps track of the pages, enable to easily implement search-options and stuff like that. You're free to style the menus in the way you want.
The vertical limitation is not that weird. Got me a new laptop which has a vertical resolution of only 768 lines (which saves me money for getting reading glasses, I'm Dutch ).
In your case, I would probably put up a finger to the 'fast internet guys' and take the easy route. I mean, you still use frames so why not take advantage of it and get the 'scroll-underneath' part done with an IFRAME with a fixed position using an external menu.html.
<IFRAME style="position: fixed; top: 0px; width: 100%; text-align: center;" src="menu.html" id="Menu" />
Is there a downside? Yes there is. If you intend on having the menu highlighting the current page you will need some way to detect what page is active and render the menu according. If you don't need that than even that point is no real problem.
Not too much critisism? Last edited by Amiga_3k on 04-Mar-2011 at 08:15 PM. Last edited by Amiga_3k on 04-Mar-2011 at 08:13 PM. Last edited by Amiga_3k on 04-Mar-2011 at 07:45 PM.
_________________ Back home... |
|
| Status: Offline |
|
|
Metalheart
|  |
Re: Need HTML help Posted on 4-Mar-2011 19:42:24
| | [ #13 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| @Amiga_3k
Thanks ! Small world isn't it 
I'm not realy familiar with Iframes. Is it hard to do ? And can I get it to work the same as it does now ?
I take it that mentioned programs are WIndows programs ?
Another thing... Do you think this site is good enough for a profesional site ? Keep in mind it has to be as simple as possible, wilst maintaining functionality, clean look and accesablility.
You should have seen the first incarnation Boy, have I grown 
_________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
nimrod7
|  |
Re: Need HTML help Posted on 4-Mar-2011 19:45:20
| | [ #14 ] |
|
|
 |
Regular Member  |
Joined: 4-Jan-2010 Posts: 285
From: Poland | | |
|
| to add (some basics): 1. Be sure to frequently test the site using World Wide Web Consortium (W3C) validator: http://validator.w3.org/, your site contains 13 Errors and 4 warning(s). 2. Switch from HTML 4.01 Transitional to HTML 4.01 Strict, because the latter is the web standard. 3. Stay away from Frames.
EDIT: I'm sorry to say that, but you have a lot of hard work ahead of you. The site is nowhere near the so-called Web 2.0 standard (usability, clean and spacious design, SEO facilities, accessibility). Last edited by nimrod7 on 04-Mar-2011 at 07:52 PM.
_________________ "Marxism must abhor nothing so much as the possibility that it becomes congealed in its current form. It is at its best when butting heads in self-criticism, and in historical thunder and lightning, it retains its strength" - Rosa Luxemburg. |
|
| Status: Offline |
|
|
Amiga_3k
|  |
Re: Need HTML help Posted on 4-Mar-2011 19:52:32
| | [ #15 ] |
|
|
 |
Cult Member  |
Joined: 17-Jun-2006 Posts: 836
From: Ohrid, Macedonia | | |
|
| @nimrod7
1. I'd first get the basics up and running, then worry about W3C. 2. Strict is nice, but makes men bold from pulling hairs. As soon as the site is W3C compliant then Strict should not really be needed. 3. In general, you're right, but I never came across THE explanation why not to use them. I'm a lazy guy so I like the easy solution.
I think Metalheart should first get the thing up and running and test it against the big browsers like Google Chrome, Opera, Internet Exploder, Firefox... oh... Safari, afterall it's an art related site 
Your points are valid on a proffesional note. _________________ Back home... |
|
| Status: Offline |
|
|
Metalheart
|  |
Re: Need HTML help Posted on 4-Mar-2011 19:52:51
| | [ #16 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| @nimrod7
What do those warnings mean ? All seems to work on Apple's browser, IE8 and 9 and OWB.
What's wrong with frames ?
How do I know what version HTML I'm using ? _________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
Amiga_3k
|  |
Re: Need HTML help Posted on 4-Mar-2011 20:00:25
| | [ #17 ] |
|
|
 |
Cult Member  |
Joined: 17-Jun-2006 Posts: 836
From: Ohrid, Macedonia | | |
|
| @Metalheart
It is. Lived in Tilburg for years, now in Veldhoven.
I edited my last post to include an example for IFRAME. It is not difficult and acts like a DIV with the added advantage of being able to read an external HTML file.
They are not strictly Windows programs. It is installed on your homepage at the homepage-provider. You do, however, need a rather modern browser to use it, I'm not too sure if OWB likes it.
Making a site looking professional is not too dificult. It's a matter of eye-candy. I think the basics are good enough and has enough potential to turn into a neat site.
I can put up a test site so you can see if your systems are capable of using Websitebaker. I'm willing to help you and translate your site-configuration to that platform. If you're interested, let me know then I'll put up a thing you can play with. _________________ Back home... |
|
| Status: Offline |
|
|
nimrod7
|  |
Re: Need HTML help Posted on 4-Mar-2011 20:28:56
| | [ #18 ] |
|
|
 |
Regular Member  |
Joined: 4-Jan-2010 Posts: 285
From: Poland | | |
|
| @Amiga_3k
I completely disagree with you, we should make sure the web pages are created with standards in mind, it is the only way not to transform the Internet into an unaccessible rubbish dump. A. Why Transitional is EVIL: http://en.wikipedia.org/wiki/HTML#Transitional_versus_strict B. Separate structure ((X)HTML) from presentation (CSS, e.g. remove all style="..." form HTML tags) and behavior (JavaScript, e.g. remove all onClick, onMouseover etc. etc. from HTML tags) C. Frames? SEO problems, bookmarking problems, accessibility problems. "In general, frames do nothing but add complexity and subtract usability" htmldog.com D. another htmldog.com quote: "1) If the tag or attribute name even so much as whispers anything suggesting presentation, don't use it. That's CSS's job. And CSS does the job better. 2) Use the tag to do what its name implies. Tables are for tabular data. Headings are for headings. Etcetera etcetera. 3) When you've got specific content, use the appropriate tags. Lists for lists, headings for headings yada yada yada"
_________________ "Marxism must abhor nothing so much as the possibility that it becomes congealed in its current form. It is at its best when butting heads in self-criticism, and in historical thunder and lightning, it retains its strength" - Rosa Luxemburg. |
|
| Status: Offline |
|
|
Metalheart
|  |
Re: Need HTML help Posted on 4-Mar-2011 20:30:40
| | [ #19 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2969
From: Somewhere in the Dutch mountains.... | | |
|
| @nimrod7
I know its very very far from done Working on it...
So far I've been working on getting the site upto our expectations (layout, content, colors and stuff) Now I'm concentrating on getting it fully functional one page at a time.... After that, all content should be made up to date and correct (but that is not upto me. I must implement it in the site but my girl needs to provide it)
Then... beta testing by friends and people who have no emotional ties to us (objectivity )
Where did you get that 2.0 standard from ?
@all
Please keep in mind that compliancy, 2.0, 4.01, strict, no frames, no mouseovers and so on, all sound very nice and you are probably right, BUT I'm NOT a webdesigner..... just a lowly elctrical engineer with some HTML knowledge And all og that could be a bit over my head.
Indeed, first get the site up and running, get it working on all of the important browsers and then worry about everything else.
btw, should I make sure it works fine on IE6 for example ? Or asume it has gone the way of the dinosaurs ? Aswel as low screen resolution ?
You all are realy helping me out here ! Thanks ! Very much apriciated ! Last edited by Metalheart on 04-Mar-2011 at 08:40 PM. Last edited by Metalheart on 04-Mar-2011 at 08:38 PM.
_________________ Theres a time to live and a time to die When its time to meet the maker Theres a time to live but isnt it strange That as soon as you're born you're dying |
|
| Status: Offline |
|
|
broadblues
 |  |
Re: Need HTML help Posted on 4-Mar-2011 20:31:40
| | [ #20 ] |
|
|
 |
Amiga Developer Team  |
Joined: 20-Jul-2004 Posts: 4456
From: Portsmouth England | | |
|
| @Metalheart
Quote:
What do those warnings mean ? All seems to work on Apple's browser, IE8 and 9 and OWB.
|
They mean you have not strcitly adhered to the thml standrad, this is not always a problem, but it's a good idea to get as close as possible, however adhere to standrads doesn't mean that the site will work as expected as MSIA and Firefox will likely disagrre over the interpretation  Quote:
What's wrong with frames ?
|
Nothing they are perfectly legit. It depends what you need to do. I use Iframes to add some content on my site from other domains under my control, and for the main menu, though I'm considering moving away from that appoach and using ajax instead in some cases.
Quote:
How do I know what version HTML I'm using ?
|
You specify it in the Doc tag . Dispite what nimrod says I would use transitional not strict as it's just as "standard" as strict. And it allows you to do some things more quickly. Quote:
Metalheart wrote: @nimrod7
What do those warnings mean ? All seems to work on Apple's browser, IE8 and 9 and OWB.
What's wrong with frames ?
How do I know what version HTML I'm using ? |
_________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
| Status: Offline |
|
|