ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

White space at top of Atom feed

August 30, 2007 5:51pm

Subscribe [2]
  • #16 / Nov 07, 2007 11:22am

    Robin Sowell

    13255 posts

    Bugger- it may take me a while to work this out.  Part of it is that some of the characters are getting munged in the wiki.  I ran into this before- pretty much most of the dates.  And it’s got some variables I’m not sure about as well.  I’m kinda going to have to go through it in some detail to clean everything out.  But- start w/this- hard code the top.

    <?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    
    <title type="text">Reading rambles</title>
    <subtitle type="text"></subtitle>
    <link rel="alternate" type="text/html" href="http://media-cow.com/1/" />
    <link rel="self" type="application/atom+xml" href="http://media-cow.com/group/template/" />
    <updated>2006-11-28T19:47:00-05:00</updated>
    
    <rights>Copyright (c) 2007, rob1</rights>
    <generator uri="http://www.pmachine.com/" version="1.6.0">ExpressionEngine</generator>
    <id>tag:media-cow.com,2007:10:15</id>
    
    {exp:gallery:entries gallery="gallery" orderby="entry_date" rows="10" columns="1"}

    The only thing w/ need to be dynamic there will be the updated date- and using a weblog update date to denote new gallery entries doesn’t make much sense anyway.  So I figure we’ll do it w/ a query when the time comes to worry with it.  That should ditch the whitespace.  Ditch the closing rss tag as well.  Then we’ll just use the gallery tag to generate our dynamic content.  And clean up the date formating- where it is munged.  And make sure all paths are correct and no global variables that are undefined are still in there.

    Does that make sense?  Start poking on getting the top bit right- you can just reveal code as to what it’s producing, then flip out correct info.  We’ll worry about the update date later.

    Let me hit a few more threads, then I’ll hit this again.

  • #17 / Nov 07, 2007 12:27pm

    123454329

    144 posts

    @robin - tk you, robin!!

    @derek - i try to do what i can but still i am getting errors …

    and derek, do you want me to ignore the *dynamic_start=”“* parameter for now - or do i need to insert it in my weblog templates or into the atom_gallery template. where *exactly*? i am not understanding, sorry.

  • #18 / Nov 07, 2007 12:35pm

    Derek Jones

    7561 posts

    No, Thomas, you aren’t using the weblog module, so it doesn’t apply to you.

    Your validation errors are caused by trying to use variables that do not exist.  Just build the heading information part of your feed manually like you would if you weren’t using ExpressionEngine at all.  Only the <entry></entry> content will you be generating dynamically with your gallery module tag.

  • #19 / Nov 07, 2007 1:25pm

    123454329

    144 posts

    ok, derek - i try some more. tk you for everything.

  • #20 / Nov 07, 2007 4:47pm

    Robin Sowell

    13255 posts

    OK- the attached validates on my site.  There are a couple of things that made it hard- dates were munged by the wiki.  That’s part of why I’m attaching it- just so no munging happens.

    Next- it had some variables in there that won’t parse- like gmt date and such.  I mostly went with using the entry date.  If I was being picky?  I’d probably pull all the data out with a query and have whatever I want- including gmt.  Or like- author.  Author wasn’t parsing as a variable- so I just hard coded it.  If you had more than one author- you might consider a query.

    Let’s see- think those were the two big things- munged dates, variables that don’t really exist.  Wrapping it in a weblog tag was probably an attempt to get some of those variables- but I’m not sure they really made sense in terms of the gallery.  Oh- and the top is pretty much all hard coded except for the update date- which I did use a query for.  Because you want that to be accurate.  And while I was doing that- used the same date for the channel id- which I’m really not sure what the atom id tag is for- but I looked at a working weblog atom feed and guessed based on that.

    So- the below validated for me- you will want to change stuff that’s hard coded- like my name as the author.  But- look at this, look at a valid atom feed for one of your weblogs, and the bits to tweak should be fairly easy to pick out. 

    Make some sense?

  • #21 / Nov 08, 2007 3:12am

    123454329

    144 posts

    robin:
    yes, it makes all sense and fixes my issue. thank you for taking care of me - your relevant support (providing a solution) stands out.
    sincerely,
    -thomas

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases