WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] custom RSS- attachment tag? (10 posts)

  1. johnstonphilip
    Member
    Posted 7 years ago #

    Hey,
    Im wondering if it is possible to embed a direct link to the attachement of a post in it's own tag rather than having it embedded into the body of a post.
    Right now my body tag looks something like this:
    -----

    POST TEXT<img alt="picture.jpg" id="image26" src="picture.thumbnail.jpg" />

    -----
    *what i want it to look like is:
    -----

    POST TEXT

    <postattachment>
    picture.jpg
    </postattachment>

    -----
    I guess Im wondering if there is any variable that link directly to the attachment of a post.

    Thanks,

  2. johnstonphilip
    Member
    Posted 7 years ago #

    okay, for some reason the tags didn't show up right in that post...
    -----
    [actualpost](square brackets are < and >)
    POST TEXT<img alt="picture.jpg" id="image26" src="picture.thumbnail.jpg" />
    [/actualpost]

    -----
    *what i want it to look like is:
    -----
    [actualpost]
    POST TEXT
    [/actualpost]

    [postattachment]
    picture.jpg
    [/postattachment]

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    I guess I fail to see the point of doing this sort of thing. You could do it, but you couldn't make it work in RSS readers.

    Most RSS readers understand HTML. Stick to standards, that's my advice.

  4. johnstonphilip
    Member
    Posted 7 years ago #

    Hey,
    I know that RSS readers will still be able to pick up the body, title and link to the article. The thing is, I've created an RSS reader for flash and I'm converting it so that videos, pictures, and audio get played in one player rather than loading 10 or more media players on one page.

  5. johnstonphilip
    Member
    Posted 7 years ago #

    This is very close to what I'm looking for:
    http://guff.szub.net/2006/02/09/post-image/

    I want to do the same thing but with every attachment type

    ..and in the rss2 loop

    I'll keep working at it...

  6. johnstonphilip
    Member
    Posted 7 years ago #

    Is there a reason why a function can be called in "the loop" but it doesn't work when it is called in an rss tag?

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    No. The RSS code does have the loop in it.

  8. johnstonphilip
    Member
    Posted 7 years ago #

    I found another way around. In flash I wrote a script that finds and extracts the info I want from the tag.
    Thanks anyway

  9. spencerp
    Member
    Posted 7 years ago #

    Ok, glad to hear you got something working.. can the status be changed to [Resolved] now, or..?

    spencerp

  10. johnstonphilip
    Member
    Posted 7 years ago #

    hey,
    yeah - I guess my problem is resolved

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.