Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2009, 12:44 AM
JackThomson120 JackThomson120 is offline
 
Join Date: Jul 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Remove HTML from CNN RSS Feeds

Well I have tried editing the files which deal with the RSS.
Such as changing &lt; to < and &gt; 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:
HTML Code:
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.&lt;div class="feedflare"&gt;
&lt;a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?i=h9RrtQSNRPA:Qt7zAGctjf8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:qj6IDK7rITs"&gt;&lt;img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=h9RrtQSNRPA:Qt7zAGctjf8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds2.feedburner.com/~ff/rss/cnn_topstories?i=h9RrtQSNRPA:Qt7zAGctjf8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;

&lt;/div&gt;&lt;img src="http://feeds2.feedburner.com/~r/rss/cnn_topstories/~4/h9RrtQSNRPA" height="1" width="1"/&gt;
Thanks in advanced

--------------- Added [DATE]1236050784[/DATE] at [TIME]1236050784[/TIME] ---------------

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 Code:
<?php
$rss 
$_GET["rss"];
$rss file_get_contents($rss);
$rss preg_replace('/&lt;a href="(.*?)"&gt;/'''$rss);
$rss preg_replace('/&lt;img src="(.*?)" border="0"&gt;/'''$rss);
$rss preg_replace('/&lt;div class="feedflare"&gt;/'''$rss);
$rss preg_replace('/&lt;\/img&gt;/'''$rss);
$rss preg_replace('/&lt;\/a&gt;/'''$rss);
$rss preg_replace('/&lt;\/div&gt;/'''$rss);
$rss preg_replace('/&lt;img src="(.*?)" height="1" width="1"\/&gt;/'''$rss);

echo 
$rss;
?>
Then for the Feed URL, just simply put the following:
Code:
rss.php?rss=http://rss.cnn.com/rss/cnn_latest.rss
or
Code:
rss.php?rss=http://rss.cnn.com/rss/cnn_topstories.rss
Reply With Quote
  #2  
Old 05-31-2011, 03:08 AM
vAsia vAsia is offline
 
Join Date: Sep 2003
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I followed the instruction and created rss.php in /admincp folder. When I tried to http://mydomain.com/admincp/rss.php?...cnn_latest.rss, I got this error message:

------------------------------
Forbidden

You don't have permission to access /rss.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
-------------------------------

I then tried chmod 744, 755, 777 to the rss.php file, but that didn't work.

Any clue?
Reply With Quote
  #3  
Old 05-31-2011, 07:17 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

rss.php should probably be in your forum root directory. Also for the URL put in the full URL like:
Code:
http://yourforum.com/forum/rss.php?http://www.cnn.com/rss/
Reply With Quote
  #4  
Old 07-04-2011, 10:33 PM
weindians weindians is offline
 
Join Date: Sep 2006
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting this error when using that rss.php?rss= infront of feed url...

Code:
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in [path]/includes/class_rss_poster.php on line 98

Warning: fsockopen() [function.fsockopen]: unable to connect to rss.php?rss=http:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in [path]/includes/class_rss_poster.php on line 98

Warning: Unable to fetch RSS Feed in [path]/includes/class_rss_poster.php on line 231
mathrubhumi news Unable to open URL or no data returned
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11013 seconds
  • Memory Usage 2,203KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete