JackThomson120
03-03-2009, 12:44 AM
Well I have tried editing the files which deal with the RSS.
Such as changing < to < and > to >, and then removing any HTML - I have also tried making it out put it as HTML without removing it.
But there seams to be a function within which is replacing the tags to blank space.
So does anyone know how I could do this?
Example of CNN RSS:
An American journalist reported by her father as being detained in Iran had been working there without a permit, Iran's Foreign Ministry said Monday. Saberi's father, who lives in North Dakota, told CNN that his daughter called him from jail February 10 and told him she'd bought a bottle of wine for a friend's birthday. "Authorities told her the person who sold her the wine turned her in," Reza Saberi said.<div class="feedflare">
<a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:yIl2AUoC8 zA"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:7Q72WNTAK BA"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:V_sGLiPBp WU"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?i=h9RrtQSNRPA:Qt7zAGctjf8:V_sGLiPBp WU" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:qj6IDK7rI Ts"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:gIN9vFwOq vQ"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?i=h9RrtQSNRPA:Qt7zAGctjf8:gIN9vFwOq vQ" border="0"></img></a>
</div><img src="http://feeds2.feedburner.com/~r/rss/cnn_topstories/~4/h9RrtQSNRPA" height="1" width="1"/>
Thanks in advanced :)
--------------- Added 1236050784 at 1236050784 ---------------
I found one way around it, instead of editing vBulletin files, create a PHP file which edits the RSS file before imported to vBulletin.
rss.php
<?php
$rss = $_GET["rss"];
$rss = file_get_contents($rss);
$rss = preg_replace('/<a href="(.*?)">/', '', $rss);
$rss = preg_replace('/<img src="(.*?)" border="0">/', '', $rss);
$rss = preg_replace('/<div class="feedflare">/', '', $rss);
$rss = preg_replace('/<\/img>/', '', $rss);
$rss = preg_replace('/<\/a>/', '', $rss);
$rss = preg_replace('/<\/div>/', '', $rss);
$rss = preg_replace('/<img src="(.*?)" height="1" width="1"\/>/', '', $rss);
echo $rss;
?>
Then for the Feed URL, just simply put the following:
rss.php?rss=http://rss.cnn.com/rss/cnn_latest.rss
or
rss.php?rss=http://rss.cnn.com/rss/cnn_topstories.rss
Such as changing < to < and > to >, and then removing any HTML - I have also tried making it out put it as HTML without removing it.
But there seams to be a function within which is replacing the tags to blank space.
So does anyone know how I could do this?
Example of CNN RSS:
An American journalist reported by her father as being detained in Iran had been working there without a permit, Iran's Foreign Ministry said Monday. Saberi's father, who lives in North Dakota, told CNN that his daughter called him from jail February 10 and told him she'd bought a bottle of wine for a friend's birthday. "Authorities told her the person who sold her the wine turned her in," Reza Saberi said.<div class="feedflare">
<a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:yIl2AUoC8 zA"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:7Q72WNTAK BA"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:V_sGLiPBp WU"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?i=h9RrtQSNRPA:Qt7zAGctjf8:V_sGLiPBp WU" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:qj6IDK7rI Ts"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:gIN9vFwOq vQ"><img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?i=h9RrtQSNRPA:Qt7zAGctjf8:gIN9vFwOq vQ" border="0"></img></a>
</div><img src="http://feeds2.feedburner.com/~r/rss/cnn_topstories/~4/h9RrtQSNRPA" height="1" width="1"/>
Thanks in advanced :)
--------------- Added 1236050784 at 1236050784 ---------------
I found one way around it, instead of editing vBulletin files, create a PHP file which edits the RSS file before imported to vBulletin.
rss.php
<?php
$rss = $_GET["rss"];
$rss = file_get_contents($rss);
$rss = preg_replace('/<a href="(.*?)">/', '', $rss);
$rss = preg_replace('/<img src="(.*?)" border="0">/', '', $rss);
$rss = preg_replace('/<div class="feedflare">/', '', $rss);
$rss = preg_replace('/<\/img>/', '', $rss);
$rss = preg_replace('/<\/a>/', '', $rss);
$rss = preg_replace('/<\/div>/', '', $rss);
$rss = preg_replace('/<img src="(.*?)" height="1" width="1"\/>/', '', $rss);
echo $rss;
?>
Then for the Feed URL, just simply put the following:
rss.php?rss=http://rss.cnn.com/rss/cnn_latest.rss
or
rss.php?rss=http://rss.cnn.com/rss/cnn_topstories.rss