Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 7th, 2007, 01:39 PM
CLEM_C_ROCK CLEM_C_ROCK is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 174 CLEM_C_ROCK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 27 m 11 sec
Reputation Power: 11
Help w/ feeds in Windows IE 6 and 7

Help w/ feeds in Windows IE 6 and 7


Hello,

I'm trying to get my feeds working in Windows IE 6 and 7. I'm using the template method and my rss feeds don't respond at all when I click the feeds link and my Atom feeds only show the raw xml code.

Here's an example of my code:

The feeds template partial:

Code:
render :partial => 'shared/feed/news_page', :layout => false

And the Rss Feed template code
Code:
 xml.instruct! :xml, :version=>"1.0" 
  xml.rss(:version=>"2.0"){
    xml.channel{
      xml.title("flavor: #{@flavor} *title1: " + @feed.title)
      xml.link('url: ' + @feed.guid) if @feed.guid
      xml.description('*description 1: ' + @feed.description) if @feed.description
      xml.language('en-us')
  
      for entity in @entities
        xml.item do
          xml.title('title 2' + entity.title)
          xml.category(entity.title)           
          xml.description(entity.body) if entity.body  
          
          case @this_controller
            when 'news', 'task'
              @id_key = :id 
              @id_val = entity.id
            when 'wiki'
              @id_key = :title 
              @id_val = entity.title
          end
          
          logger.warn("(*logger_warn*) this_controller-->>#{@this_controller} || news pg id_key-->>#{@id_key}")
                   
          xml.link url_for :only_path => false, :controller => @this_controller, :action => @this_action, @id_key => @id_val  
          
        end
      end
    }
  }

And the Atom Feed template code
Code:
 
  xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"

  xml.feed "xml:lang" => "en-US", "xmlns" => 'http://www.w3.org/2005/Atom' do
    xml.title("flavor: #{@flavor} *title1: " + @feed.title)
    xml.id( "tag:#{request.host},#{Time.now.utc.year}:#{@feed.title}/#{@feed.title.downcase}" )
    xml.link('url: ' + @feed.guid) if @feed.guid
    xml.author { xml.name "Author Name" }
    
    if @entities && @entities.any?
      @entities.each do |entity|
        render(:partial => "shared/feed/entity", :locals => {:entity => entity, :xm => xml})
      end
    end
  end

And the partial template code
Code:
xm.entry 'xmlns' => 'http://www.w3.org/2005/Atom' do
    xm.title ( entity.title )
    xm.author  { xm.name "Author Name" } 
    xm.link("rel" => "alternate", "href" => url_for(url_for :only_path => false, :controller => @this_controller, :action => @this_action, @id_key => @id_val))
    xm.content(render_body(entity), :type => 'html')
end

And the RSS link:
Code:
<img alt="Meta_feed" src="/images/space/meta_feed.gif?1169575771?1169575771" />

And the Atom link:
Code:
<a href="/page/news/rss">Syndicate</a><a href="/clem-rock-inc/news/atom">Atom</a>

Does anyone see any reason why this wouldn't work in these browsers?


Thanks,
Clem

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > Help w/ feeds in Windows IE 6 and 7

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap