/*
* Hello Brandley, tonight I've tried to figure out how to do proper
* JSON POSTs using "Content-type: application/json" and serialized JSON
* data in the content portion (body) of my HTTP requests. This is
* specified in the Twitter API for status updates and Identica JSON
* webservices (found via Mark Pilgrim).
* After some tests, I had to recognize that jQuery does not support JSON
* encoding in the core distribution and aside of $.getJSON(), there
* is no $.postJSON().
* Below is an proposed update. As it relies on your json plugin, I'd ask
* you to add it to your code base so that other jQuery users can benefit
* of it.
*/
$.postJSON = function(url, data, callback) {
return jQuery.ajax({
'type': 'POST',
'url': url,
'contentType': 'application/json',
'data': $.toJSON(data),
'dataType': 'json',
'success': callback
});
};
Posts Tagged ‘plugin’
jQuery.postJSON()
Published October 18th, 2009.Wiki Plugin for Vim Editor
Published April 18th, 2007, updated March 7th, 2008.This is a wiki plugin for the Unix editor Vim. It enables you to use syntax highlighting, hyperlinking etc. within your favourite text editor. Based upon Tim Hemel’s original wiked, the code perceived many changes to fit the needs at sickos.org.
We use it here (sickos.org) for server documentation, notes, logbooks, howtos and many other tasks where we savor syntax highlighting and hyperlinking. In contrast to Tim Timewaster’s original wiked, we have found that many wiki-like syntax highlightings are useless within a text environment. So, we have limited on these features:
**bold** //italic// __underline__ [[link]]
Words within brackets are interpreted as hyperlinks and automagically added to the tags file. You can jump to the target using Vim’s tag feature (as in ctags/etags). This is achieved by either entering
:tag <link>
into the ex status line or by the keyboard combination <ctrl>-<+>. (This is <strg>-<alt-gr>-<9> on German keyboard layouts, see the vim manual for details on tagging).

To install this wiked release, simply copy .vim/ and .vimrc/ to your home directory. If you understand what you do, you can also integrate it with your existing configuration; you need at leat “syntax on” and “filetype plugin on” in your vimrc and the Perl scripts and .vim files at the appropriate places.
Wordpress Flickr Sidebar Plugin
Published October 5th, 2005, updated February 29th, 2008.Preface
wp_flickr_sidebar is a plugin that shows a moblog in a WordPress sidebar. It can be configured to display any Flickr feed with a specified width and number of pictures. The plugin supports caching and resolution-dependent fetching.

Installation
Shorts steps for the impatient:
- extract the files to the plugin directory (currently one file)
- drop a copy of magpierss in /magpierss (or symlink it or fix the constants)
- ensure that you have libgd2 and the php bindings installed
- activate the plugin somewhere on the WordPress setup page
- configure the plugin using the WordPress options dialog from within the admin menu
- add <?php wp_flickr_sidebar_feed() ?> to your template/sidebar
Troubleshooting
After installation, the plugin should
- fetch your feed using magpie
- print a bunch of images which link to the plugin itself
and when called as an image, it should
- fetch your images
- convert them using gd
- display them
If something went wrong (missing libs, wrong permissions, typos), you should see an error message as long as the bug is in stage 1. To see error messages in the standalone jpeg section, set this line as a comment:
// (header("Content-type: image/jpeg");)
When you’ve fixed your problem, come back here end tell us, please.
q: after commenting the header line, i see an error message that says there is no imagecreatefromjpeg()
a: install/update the gd graphics library and php bindings q: it does not work anymore a: flickr changed the uri schema, update to version 0.2
