1
I am currently working as a Freelance programmer with very little experience, so the client requested to put on his page a UOL news block, so I accidentally found this site.
Here you create the news block automatically via Javascript, see how it looks on the page!
The problem is that the customer requested that the news might appear along with images or image.
You have how to insert dynamic images into RSS?
This is the Javascript code:
<!-- start sw-rss-feed code -->
<script type="text/javascript">
<!--
rssfeed_url = new Array();
rssfeed_url[0]="http://feeds.folha.uol.com.br/mundo/rss091.xml";
rssfeed_frame_width="200";
rssfeed_frame_height="260";
rssfeed_scroll="on";
rssfeed_scroll_step="6";
rssfeed_scroll_bar="off";
rssfeed_target="_blank";
rssfeed_font_size="12";
rssfeed_font_face="";
rssfeed_border="on";
rssfeed_css_url="";
rssfeed_title="on";
rssfeed_title_name="";
rssfeed_title_bgcolor="#3366ff";
rssfeed_title_color="#fff";
rssfeed_title_bgimage="";
rssfeed_footer="off";
rssfeed_footer_name="rss feed";
rssfeed_footer_bgcolor="#fff";
rssfeed_footer_color="#333";
rssfeed_footer_bgimage="";
rssfeed_item_title_length="50";
rssfeed_item_title_color="#666";
rssfeed_item_bgcolor="#fff";
rssfeed_item_bgimage="";
rssfeed_item_border_bottom="on";
rssfeed_item_source_icon="off";
rssfeed_item_date="off";
rssfeed_item_description="on";
rssfeed_item_description_length="120";
rssfeed_item_description_color="#666";
rssfeed_item_description_link_color="#333";
rssfeed_item_description_tag="off";
rssfeed_no_items="0";
rssfeed_cache = "f979e78f986cddbd6c6f6f2a13d5298a";
//-->
</script>
<script type="text/javascript" src="//feed.surfing-waves.com/js/rss-feed.js"></script>
<!-- The link below helps keep this service FREE, and helps other people find the SW widget. Please be cool and keep it! Thanks. -->
<div style="text-align:right; width:200px;">powered by <a href="http://www.surfing-waves.com" rel="noopener" target="_blank" style="color:#ccc;font-size:10px">Surfing Waves</a></div>
<!-- end sw-rss-feed code -->
Using this widget you have no way to get the images. You must implement a JS solution for this purpose. I recommend jquery-rss: https://github.com/sdepold/jquery-rss
– Paulo Ramos
Your sheet XML has no images attached to the news, so you have nowhere to pull any image.
– Guilherme Nascimento
@Leocaracciolo these images were attached because of the PHP back-end ?
– wladyband
the images are already inside the tags
<description> Bla bla bla <img .... /> mais bla bla bla </description>.
rss that php processes– user60252
https://www.w3schools.com/xml/rss_tag_image.asp
– DiegoSantos
@Leocaracciolo I can put an image in the background where the title is, but I can not increase the height of the title, because the image is great, I tried to add this tag "rssfeed_title_height=100" but I was unsuccessful, would it help me in this sense? only increase the title height.
– wladyband
The title you refer to is the blue part that is written Infomoney : Exchange
– user60252
This widget doesn’t give you many options. What you can do and a picture of the frame size (200px wide and 38px high post on your server and refer to
rssfeed_title_bgimage="http://seudominio.com/seusdiretorios/suaimagem.png";
See this example done very carefully http://kithomepage.com/sos/rss-f.html– user60252