TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-02-2010, 07:39 PM   #1 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default WP Bit.ly Short Link Generation

This is a stupid simple little script I wrote for use on my personal blog. You can download it from the Wordpress.org Extend repository here (grab trunk if you're just looking at it from the code perspective).

Basically all we're doing here is using the Bit.ly API to generate short links for all your WordPress blog posts. The links can be displayed on posts with the use of a PHP function or a WP shortcode; the plugin also conforms to the short link specification and adds HTTP header information as well as rel=shortlink to your HTML header.

It could easily be ported to work on any other CMS or custom built application, and is just one way that you can make use of custom APIs to interact between your own application and another.

It's the 0.1.0 release, so the comments are lacking at best. More than anything this shows how quick and painless writing a plugin for a CMS should be (thanks to WordPress extensive API) and how easy it is to communicate with a well built API such as Bit.lys. Comments on the code are welcome.
delayedinsanity is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a gallery class Tanax Advanced PHP Programming 25 02-19-2013 04:25 AM
adding a php link me code using an image as the link chikooo Absolute Beginners 3 03-02-2009 03:12 PM
hiding original link problem webtuto Absolute Beginners 2 10-17-2008 05:56 PM
email link validation (need hekp) kororo203 Absolute Beginners 4 04-17-2008 07:48 AM
Basic image link problem. Nor XHTML, HTML, CSS 7 03-25-2008 07:57 PM


All times are GMT. The time now is 04:20 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design