SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Threaded View

  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    NC
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Last edited by redemption; Feb 9, 2007 at 03:45. Reason: fix broken [ code ] tags


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •