Shup Wordpress Plugin

27 03 2008

Since Shup and Wordpress concerns many Users worldwide i’ll write this post in english.

Idea and Development

As i already mentioned in my earlier posting about Shup i was working on an integration to bring Shup and Wordpress working together. The Plugin is essentially a bridge between Shup and Wordpress. It’s not integrated in Wordpress or Shup. But it glues the interfaces of both programms together. I started with the custom_uploader_example.phps which is shipped with Shup since it is the only way to write something Shup can interact with. Then i had three ideas to interact with Wordpress:

  1. Copy a new Image directly to Wordpress’es Content Dir
    1. The Problem is that a Image might do not pass Wordpress rules and will not be accepted or shown in the Writing View
    2. Operating in an alien softwares directorys is not an good idea at all
  2. Using Wordpress Library Function wp_upload_image
    1. Might be better because we are using an interface for what we plan to do
    2. Internal APIs change from revision to revision

And finally 3. Using Wordpress XML Interface

Using an external api is a good idea because it is a fixed implementation and will not change as long as the interface is widespread used. Wordpress supports the metaWeblog.newMediaObject Method which perfectly matches our conception.

All to do was to receive an image via http post, read its content and send it to Wordpress as an newMediaObject.

Download and Setup

  • First of all get a copy of the current version at shup.php.
  • Open it and modfiy username, password and wordpressUsername, wordpressPassword
    • Username & Password are used for identify your Shup Client
    • wordpressUsername & wordpressPassword are your Wordpress Login Information
  • shup-preferences.pngUpload shup.php to your Wordpress Root Directory to shup/shup.php
  • Open Shup and go to File -> Preferences -> File Uploading & Network
  • Doubleclick Custom-Uploader
  • shup-custom-uploader-configuration.jpgSelect “Add new Profile” and populate the fields like shown in the screenshot. Click Save Changes and activate the profile as active profil.
  • Close the Dialog.
  • I recommend to disabled shup.com url tagification unless you know what it is and would like to use it
  • Have fun populating your blog with a bunch of photos :)