feed

How to use private submit to hide from feed?

与世无争的帅哥 提交于 2019-12-07 00:12:45
问题 In the valuations form there is a submit button and a <%= f.submit :private %> button. If private submit is clicked the submitted info will be hidden to other user's who view the profile. How can we also use <%= f.submit :private %> to hide submitted info from showing on the feed? activities/index.html.erb <h1>Feed</h1> <% @activities.each do |activity| %> <% if current_user == @user %> <%= render_activity activity %> <% else %> <%= render_activity activity %> #We'd need to make .public

Php Rss feed use img in CDATA -> content:encoded

半世苍凉 提交于 2019-12-06 16:36:41
I need to display only the image from the CDATA content. <item> <title>... </title> <link>... </link> <description>... </description> <category>... </category> <pubDate>... </pubDate> <guid>... </guid> <content:encoded><![CDATA[<a href="..."><img alt="" src="..."/></a>...]]></content:encoded> <enclosure url="..." type="image/jpeg" length="171228"></enclosure> </item> my code i tried looks like this an works fine for the part <?php $html = ""; $url = "http://www...."; $xml = simplexml_load_file($url); for($i = 0; $i < 1; $i++){ //works fine with <description> part $description = $xml->channel-

What is the difference between <pubDate> and <lastBuildDate> in RSS?

风格不统一 提交于 2019-12-06 16:32:48
问题 I have the feeling, in every RSS.xml file, both the pubDate and the lastBuildDate match. I am sure that this one, is not always true... So firstly, what is the difference between those two above? Secondly, the RSS readers, sort the content by Date, based on the pubDate or the lastBuildDate? 回答1: pubDate: The original publication date for the channel or item. (optional) lastBuildDate: The most recent time the content of the channel was modified. (optional) Here are some docs for the optional

RSS feed display

霸气de小男生 提交于 2019-12-06 12:18:10
I have created a news RSS feed for my website but want to display is in a format similar to http://www.apple.com/hotnews/ How would I put code onto my HTML page which would take the items from my RSS? You could use XSLT and CSS. If you didn't care about links working, etc., then just use CSS. For instance, here is how I style one of the RSS feeds on one of my sites: channel link, channel language, channel copyright, channel managingEditor, channel webMaster, channel docs, channel lastBuildDate, channel item pubDate {display:none;} rss {font-family:Arial, Helvetica, sans-serif;} channel title

Facebook Graph API /me/Feed V2.4 vs V2.3

元气小坏坏 提交于 2019-12-06 09:36:58
I'm trying to access all feeds a facebook user using the Graph API . However I'm getting quite different responses from V2.3 to V2.4 . In version 2.4 using the instruction / me / Feed not receive complete information of the posts just returns some fields , while in the previous version had access to all the information. As can be seen the difference in the following answers. V2.4 { "data": [ { "message": "A brincar com o Xico Zé.. ;)", "created_time": "2015-07-11T18:23:59+0000", "id": "10153293007088673_120153297333223673" }, { "message": "Ana Simões e Pedro Simões este é que é bom para a

Yahoo Pipes clone script?

余生长醉 提交于 2019-12-06 09:20:04
问题 Yahoo Pipes lack of processing power and cannot works well with website from far east. I need to process complex regex from far multiple locations, hundreds of posts every minutes, which Yahoo Pipes fail to generate the result. Is there any codes or script act like Yahoo Pipes which I can use it in my own server? 回答1: Pipe2py is a compiler script that will generate a Python equivalent of a Yahoo Pipe given the URL of the pipe: https://github.com/ggaughan/pipe2py/ (Note that not all Pipes

How to disable autoescape in django feeds?

做~自己de王妃 提交于 2019-12-06 07:41:55
I use django feed framework to organize rss feeds for my website. I need to put some hyperlinks to feed items, but al of them are autoescaped ( "<" is replaced with "<" and so on). Is it possible to keep tags in my feed (as I understand, I can't use {% autoescape off %} tag in feed templates)? Thanks. Read up on Automatic HTML escaping in Django and try the following syntax. Where data is the variable which holds your link {{ data|safe }} As jitter mentioned you can use "safe" filter, but it's annoying if you want to disable autoescaping often. Django also supports {% autoescape off %} {%

Output RSS feed as html?

自闭症网瘾萝莉.ら 提交于 2019-12-06 07:25:22
Are there any free php/javascript libraries out there which would help in displaying an RSS feed as html? In my Opinion Simplepie is one of the Best RSS parsers. Here is an example: require_once('simplepie.inc'); $feed = new SimplePie(); $feed->set_feed_url('http://simplepie.org/blog/feed/'); $feed->init(); $feed->handle_content_type(); <?php foreach ($feed->get_items(0, 5) as $item): ?> <div class="item"> <h2 class="title"><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></h2> <?php echo $item->get_description(); ?> <p><small>Posted on <?php echo $item->get

Consume RSS feed XML and display information

混江龙づ霸主 提交于 2019-12-06 05:31:22
问题 I have to consume a feed XML (RSS) in my Windows Phone 7 application and display those information in a ListBox . Following way I tried to read the content in XML feed: private void button1_Click(object sender, RoutedEventArgs e) { client.DownloadStringAsync(new Uri("http://earthquake.usgs.gov/eqcenter/recenteqsww/catalogs/eqs7day-M2.5.xml"), "usgs"); } Can someone please guide me how to proceed to get the XML info and to display them as ListBox items? 回答1: You have to do two things: Download

reading a XML feed with '-' in some of the element names

半城伤御伤魂 提交于 2019-12-06 04:08:23
I am trying to read an xml feed that has '-' in the element names. The feed can be found here. http://forecast.weather.gov/MapClick.php?lat=42.19774&lon=-121.81797&FcstType=dwml I am new to php, so I am likely over looking something basic. I am using SimpleXML to read the feed. Here is some basic code that I am using to figure out my problem. I read the wordedForecast and min tempature with no problems. When I try to read the conditions-icon the php does not work(it is the part that I commented out at the bottom) <?php $feed_url = 'http://forecast.weather.gov/MapClick.php?lat=42.19774&lon=-121