Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 07:09 am EST
Geeklog Forums
Stylesheets and an RSS feed
I am setting up a server for my workplace, and my goal for using Geeklog was to use it as a "news" engine, and then push an rss (in an xml document) feed into an iframe on the main page on my website. It would work fine, but without a stylesheet specification, it will only load the code for the xml document unless i manually insert a stylesheet specification at the start of the geeklog.xml (the one generated by geeklog). This wouldn't be such a big deal, but the geeklog.xml is written over with every change, so its a nuisance to have to add it every time. Is there a workaround, or a way to fix this that I may have missed? Thank you very much for your time.
14
12
Quote
timesscar
Anonymous
That statement confuses me... Both firefox and IE can parse xml by default. You just have to give it a stylesheet specification. I am just looking for a way to insert the stylesheet line at the start of the xml doc. Other details are mostly irrelevant.
Is there a line I could add to whatever script generates the feed?
Thanks again.
Is there a line I could add to whatever script generates the feed?
Thanks again.
14
11
Quote
timesscar
Anonymous
Here is an example of a stylesheet line;
14
11
Quote
timesscar
Anonymous
<?xml-stylesheet href="http://commtech/wiki/lib/rss/rss-style.css" type="text/css"?>
11
12
Quote
Status: offline
THEMike
Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
There are two things I can think you could do.
Firstly, rather than using an iFrame, you could use some very simple code to read the rss feed from geeklog in, prepend/insert the CSS line into the XML and render that to the browser.
Or, you could amend geeklog to include that line. The place to do this would be in the /path/to/geeklog/system/classes/syndication/rss.feed.class.php (hmm not sure if it's feed or feedparser or something else, but that should be enough information for you to find the actual file).
The class has a _writeheader or similar method that outputs the header of the XML file, just amend that to include the XML CSS code.
Firstly, rather than using an iFrame, you could use some very simple code to read the rss feed from geeklog in, prepend/insert the CSS line into the XML and render that to the browser.
Or, you could amend geeklog to include that line. The place to do this would be in the /path/to/geeklog/system/classes/syndication/rss.feed.class.php (hmm not sure if it's feed or feedparser or something else, but that should be enough information for you to find the actual file).
The class has a _writeheader or similar method that outputs the header of the XML file, just amend that to include the XML CSS code.
10
12
Quote
timesscar
Anonymous
Excellent, thank you mike.
18
13
Quote
Status: offline
waltnjulie
Forum User
Newbie
Registered: 06/11/06
Posts: 7
I solved that problem by getting rid of the iframe so the page would use the style sheets I was already using. Turned out to be easier to use a simple table. See http://www.rhoadsart/blogframe.html to see the result.
Now, if I could just solve the date format problem....
--Julie
Now, if I could just solve the date format problem....
--Julie
13
13
Quote
All times are EST. The time is now 07:09 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content