Status
Not open for further replies.

Forbairt

Teaching / Designing / Developing
bloody hell ... just saw this thread has 585 views ? ... not bad considering it was only created yesterday
 

ghost

New Member
wood and trees

Found the problem with my last Rss feeds
yes it was encoding . the site example I gave was built with html and php scripts on seperate pages , I had placed the document character encoding
on the php page instead of the html page.
I only noticed when I viewed the demo thanks forbairt .
 

Forbairt

Teaching / Designing / Developing
no problem :)

Character Encoding was the bane of my existance about 4 years ago when I started working on a multilingual website application featuring about 13 languages .. UG ... :D
 

ghost

New Member
624 and counting

bloody hell ... just saw this thread has 585 views ? ... not bad considering it was only created yesterday

624 and counting
I am not surprised This was a Good Tutorial on RSS set up and should be up graded to Sticky.
has my vote.
 

Big D

Member
encoding?

'scuse my ignorance in this, but I too am having problems with Irish newsfeeds where the letters have accents, like the `e' in RTE and `i' in Gardai.

My problem is that I don't know what you mean by the `encoding' and where I would find it - is it part of the doctype?
 

ghost

New Member
UTF Encoding

I am using last rss and if everything else is set up right placing the following code in the head of your html document should do the trick.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
if not post again and I will direct you to the rest of the code for last rss.
Mick
 

Big D

Member
xhtml

I am using Magpie and this is the line of coding i have in my header:

<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />

I swapped it with the line you suggested but to no avail.

Does my problem lie with using Magpie perhaps?
 

ghost

New Member
Sorry Big D I have not used Magpie before ,so I cant help you with that.
But heres the low down on Last RSS I use this because I find it simple to set up .
you can download from here. http://lastrss.oslab.net/lastRSS.zip this is the class file.
Here is the code to use in your page or as an include page.
I have set my cache directory to ./Temp'; change this to suit your system.
cache_time = 14000; // (4hrs)
and Items limit = 5
you will also notice I have a style for the table table class="rss_section"

PHP:
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
);
$rss_right = array(
'http://www.independent.ie/sport/hurling/rss'
);
// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = './Temp';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td><td width="50%" valign="top">';
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';

You can view mine here St Columba's Hurling Club,Renmore Galway GAA bottom of the home page.
Ghost
 

Big D

Member
Ta!

Ghost, thanks for that - I will look at last rss and your code tomorrow, but I reckon it could take me hours to figure this out whilst a wizard webmaster could sort it in seconds - I am setting up a new web page and also trying to convert Library Ireland: Irish History and Culture to the same format so I think I'll need to get some expert help to ensure I don't make some grave error - if I can get someone to check my code and css template then I'll get them to sort the feed problem as well.

Thanks again for the replies.

D.
 

Forbairt

Teaching / Designing / Developing
Its an encoding issue .. or more precisely .. you are using an older version of magpie (that includes numerous encoding issues) .. hence its throwing up issues
 

satimis

New Member
Hi folks,


I have been searching the whole World for a solution to my problem.


What I need is to integrate RSS feed news to my website which is hoisted on my own server, so that visitors while browsing my website can read news on their PCs.

What shall I do? Where shall I start? If the feeds include vedio clips can the visitors display vedio on their PCs?


Besides I have scoller/text marquee running on my website. The same is modified on;

Cross Browser marquee
Dynamic Drive DHTML Scripts- Cross Browser marquee

Cross Browser marquee II
Dynamic Drive DHTML Scripts- Cross Browser marquee II


They are written in javascript. Whether I can make use of them. If YES, then HOW? TIA


I have been searching javascript parser and I found;

Javascript Parser Combinators
Bluish Coder: Javascript Parser Combinators


Parsing JavaScript with SpiderMonkey
Parsing JavaScript with SpiderMonkey (siliconforks.com)


Cross Platform XML Parsing in JavaScript
XML for <SCRIPT> Cross Platform XML Parser in JavaScript


Which of them shall I use? Please shed me some light. TIA


B.R.
satimis
 
Status
Not open for further replies.
Top