Click to See Complete Forum and Search --> : Rss
tims15
05-16-2005, 11:10 AM
I think this is the right forum for RSS, but sorry if its not. I am a complete newbie to RSS and just wanted a code so that I could update the horizontal navigation bar on my site by changing one bit, rather than trawling through all the pages changing it. If anyone could help I wuld be very greatful. :)
tims15
05-16-2005, 04:47 PM
Is there another way I could achieve the same thing without RSS? Its just that I read RSS is quite new, and can be abit wierd in some browsers?
AdamGundry
05-18-2005, 10:00 AM
I believe you are thinking about server-side includes (SSI) rather than RSS, which is a syndication format designed to provide news feeds and such. Since SSI runs on the server, it doesn't depend on the browser being used, but it does require your web server to be set up to allow it.
You can also get the same effect with a more advanced server-side programming language such as PHP. For example code in both languages, check our webdevfaqs.com (http://webdevfaqs.com/php.php#include).
Adam
tims15
05-18-2005, 12:05 PM
Thanks for that,
I was a bit confused by the stuff in the links- which code do I need to set it up?
AdamGundry
05-21-2005, 05:21 AM
You need to find out if your web server supports either SSI or another server-side programming language, your web host should be able to help you. You will then need to create a page that contains code in the appropriate language - let me know which it is and I can give you more information.
Adam
tims15
05-21-2005, 11:27 AM
Thanks very much for your help,
Its supports SSI, PHP and Perl. I have no preference to any (or know which ones will work!)
NogDog
05-21-2005, 12:52 PM
Well, PHP solution is pretty easy. Put the marked up navigation text in a file, let's call it "nav.txt". This should contain just the HTML that you would want to appear in each page where your navigation would go - you don't want the opening/closing HTML tags and such. Then in each file where you want the navigation to appear:
<?php include "nav.txt"; ?>
The only other thing you then have to do is rename your main files with a ".php" suffix instead of ".html", for example "index.php", so that the web server knows it need to run it through the PHP parser. (Or, possibly, your web server is configured to parse ".html" files for PHP code, but this is not usually the case.)
tims15
05-22-2005, 08:48 AM
Thanks very much, it works perfectly!
tims15
05-22-2005, 08:59 AM
Actually it doesn't!-
On one page, when you load it in Internet Explorer, it comes up with this message
Parse error: parse error, unexpected T_STRING in /home/tims15/public_html/join.php on line 1
Line 1 is
<?xml version="1.0" encoding="iso-8859-1"?>
which is the same as on all the other pages, but they work for some reason.
How do I make it work?!
BeachSide
05-23-2005, 03:17 AM
try...
<?php include("nav.txt"); ?>
but without seeing what you got for the rest of the php code it will be darn near impossible to troubleshoot it
tims15
05-23-2005, 03:52 AM
It works fine now
Thanks very much for all your help