WordPress.org

Ready to get started?Download WordPress

Forums

custom XML output (9 posts)

  1. ssdesign
    Member
    Posted 8 years ago #

    Hi,
    I wanted to create custom XML output for wordpress blog I have on my website.

    I did not want to have a HTML+CSS layout, I wanted to create a Flash Interface.

    For the same, I wrote a custom theme. At that time, I realsied that to get a complete custom output, I have to edit some files in the wp-includes folder as well.

    For example:

    in 'template_functions-general.php' file, I had to modify the 'function get_archives_link()' function by adding an extra 'if' statement:

    } elseif ('XML' == $format) {
    return "<Archive archLink=\"$url\" archTitle=\"$text\" />";
    }

    Like this, I had to change a few functins to be able to generate complete valid XML from the core code.

    My question is, can WordPress address this feature in future by adding the ability to generate XML output using custom themes?

    Thanks

  2. Joseelsantos
    Member
    Posted 8 years ago #

    This would be really, really fantastic if it was possible without altering the core files. It would then make it the only blog / pcms that supported raw xml output!

  3. sadish
    Member
    Posted 8 years ago #

    I just want to say, this is a nice feature.

    can someone post a link, where we can add the suggestion to the wordpress dev team. ?

  4. ssdesign
    Member
    Posted 8 years ago #

    Yes, I am a strong advocate of this and after writing my custom XML output, it was so easy to port wordpress to Flash.

    I am sure others will find alternative usage of haveing a raw XML output.

    Can we really add this feature? I can share my experience if people are interested.

  5. Joseelsantos
    Member
    Posted 8 years ago #

    I think I have found a way to make an XML Theme, the major issue will be that all of us have his / her own way of formatting XML, so the way I program this will most likeley not fit everyones pocket. However I have made it possible by editing existing plugins, combination of numerous of extra scripts, and made it to one plugin-file.

    Don't know when it will be finished, but I will let you know!

  6. Joseelsantos
    Member
    Posted 8 years ago #

    All of you who are interested of this, please follow my development of this "Theme" on my site. I will continuously post updates and snippets from the progress, so we all can reach somewhat a unified XML Output!

    http://www.team77.se/wp-xml/

  7. ssdesign
    Member
    Posted 7 years ago #

    Hi,
    My Flash-Wordpress project is now in a stable state.

    http://www.ssdesigninteractive.com/ssdesign/?p=97

    Sourceforge link:
    http://sourceforge.net/projects/flash-blog

    Let me know if you happen to test it.

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

    Making the blog output a custom XML format is fairly straightforward, actually. It's really just a matter of editing your theme to do whatever XML you want. You'd obviously need to clone and then edit some of the existing WordPress functions into the functions.php file for your theme (I would recommend using functions.php instead of using a plugin, because these functions are likely to be very specific to your theme).

    However, it seems like it would be better to write your Flash so as to use something more standardized, like, say, RSS. Then it could read the existing RSS feed (or any RSS feed) and display it as it sees fit.

  9. ssdesign
    Member
    Posted 7 years ago #

    RSS feeds can populate the first view, but as you navigate, I need to generate custom XML for each view. Thats why I used this approach.

    You are right about functions.php, I just put then in a plugin file, but yes that could have been in functions.php as well.

    And infact I am using the same approach as you specified and I have created a custom theme that outputs only XML.

    Thanks for your comments :)

Topic Closed

This topic has been closed to new replies.

About this Topic