|
|
|
|
![]() ![]() |
Nov 6 2007, 11:53 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 247 Joined: 9-April 07 From: Nebraska Member No.: 41,342 |
I am making a website for my IT Support class and a program called "Cox Connects Kids" for my mid-term assignment. Now I have the whole layout made and I will post a screen shot down lower.
My basic problem/question is this: I have a right section of the page(A div) and it is supposed to be a global news part that shows the same on every page(I.e. home,contacts,help) and I was wondering if I can somehow edit my CSS file to have it in there and just change it the one time for all the pages. I am guessing there is some way to do this but I couldn't figure it out. If any of this was unclear please ask me to explain further on any points. A screen shot: (Right part entitled "Global News1/2") ![]() Thanks in advance for any help. |
|
|
|
Nov 7 2007, 12:03 AM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,882 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
php includes will do that.
have a read of the Tutorials at the http://w3schools.com if you need an example, I can write a Tutorial for you. |
|
|
|
Nov 7 2007, 12:08 AM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 247 Joined: 9-April 07 From: Nebraska Member No.: 41,342 |
Grrr, I was hoping that it wasn't going to come to that.
I will have a look at the tutorial though. I know quite a bit about PHP. But the problem that I was coming up with was that I was told by my adviser that the district will have to do something with the HTML file and convert it to some kind of file with "nuke" in the name, it wasn't "PhpNUKE" though, I know that. So I will have to ask him tomorrow if the server we have will be able to run any PHP. Thanks for the reply I will edit this post with more information when I get any confrimation, and looked through the tutorials. -EDIT- All right! Well it looks quite easy to do after looking through the tutorials but again I will still have to see if they can be PHP files instead of HTML. This post has been edited by Damen: Nov 7 2007, 12:11 AM |
|
|
|
Nov 7 2007, 07:26 AM
Post
#4
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,055 Joined: 28-May 05 From: Hertfordshire, England Member No.: 7,593 ![]() |
You can avoid PHP if you want. Using some clever Apache knowledge, you can get another file included in a document. All you need to do is put this line in where you want to load the external document, then rename the file with the extension .shtml
CODE <!--#include virtual="INCLUDE.html" --> I use it on this site to get the menu to appear on the left (ignore the poor CSS |
|
|
|
Nov 7 2007, 12:29 PM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 247 Joined: 9-April 07 From: Nebraska Member No.: 41,342 |
You can avoid PHP if you want. Using some clever Apache knowledge, you can get another file included in a document. All you need to do is put this line in where you want to load the external document, then rename the file with the extension .shtml CODE <!--#include virtual="INCLUDE.html" --> I use it on this site to get the menu to appear on the left (ignore the poor CSS Okay well I copied all the files to try it this way. I went into the index.html to test it out, took out the "News Part" and replaced it with CODE <!--#include virtual="globalnews.html" --> . I made a new HTML file named "globalnews.html" and put what I took out of the index in there. I then changed the extension of the index to .shtml.Went to the index.shtml and there was nothing in the news... Anything I might have done wrong, or do I need to install apache to see the effects without uploading? |
|
|
|
Nov 7 2007, 01:37 PM
Post
#6
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,882 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
check with rvalkass for the correct .htaccess file information on that method
also, I found a code snippet which might work for you using standard (?) html. Treat the menu as an Object and include the html file? CODE <object type="text/html" data="linktest.html" width="600" height="40"> <param name="BorderStyle" value="1" /> <param name="MousePointer" value="0" /> <param name="Enabled" value="1" /> </object> I have not had a chance to test this method myself, yet. Reports are that it is slow and also, IE may have some trouble with it. http://w3schools.invisionzone.com/index.php?showtopic=16231 |
|
|
|
Nov 7 2007, 03:25 PM
Post
#7
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,055 Joined: 28-May 05 From: Hertfordshire, England Member No.: 7,593 ![]() |
Went to the index.shtml and there was nothing in the news... Anything I might have done wrong, or do I need to install apache to see the effects without uploading? You need to have Apache running, and you need to view the file through Apache ( i.e by going to http://localhost/ ). You have added all the code in correctly and from the sound of it have renamed everything correctly too. The code you use is picked up by Apache as a special command it follows before it serves up the HTML. Of course if you directly open the file up in a web browser (the path will be something like file:///path/to/file/index.shtml ) then it hasn't been through Apache, so the command never gets run. If you upload it to your web hosting or use Apache on your local machine then you will be able to see the effect. check with rvalkass for the correct .htaccess file information on that method No .htaccess file is needed for this one - it works out of the box You can do some very powerful and useful stuff with these commands. One of my favourites is using it to issue different style sheets to different browsers. It avoids all the messy hacks to get IE to work right and keep the code much cleaner and easier to manage. It also allows you to send witty insults to people still using IE |
|
|
|
Nov 8 2007, 12:27 PM
Post
#8
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 247 Joined: 9-April 07 From: Nebraska Member No.: 41,342 |
Well I tried to apache one again and uploaded it here to test it out and it didn't work.
I was able to get the "OBJECT" one to work but only in firefox! I tried to look up how to use OBJECT with EMBED so it will work in both versions but I couldn't find anything. If anyone knows how to get it to work in IE also this will solve my problem. I asked my adviser about PHP yesterday and he told me he would ask the server admin, hopefully I will get a reply on that today. The file "conversion" thing I was talking about was to something called ".NET NUKE" or something of the sort. I don't think he is talking about ASP.NET but I am not sure. Again, thanks for all of your helpful solutions! |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics |
|---|---|
|
|