Changeset 185791
- Timestamp:
- 12/21/2009 05:41:46 PM (16 years ago)
- Location:
- url-shortener
- Files:
-
- 28 added
- 7 deleted
- 4 edited
-
tags/1.6.4 (deleted)
-
tags/1.7 (added)
-
tags/1.7/fts-shortenurl.php (added)
-
tags/1.7/plugin-logo.jpg (added)
-
tags/1.7/readme.txt (added)
-
tags/1.7/req (added)
-
tags/1.7/req/JSON.php (added)
-
tags/1.7/req/display (added)
-
tags/1.7/req/display/fts_shortenurl.css (added)
-
tags/1.7/req/display/fts_shortenurl.js (added)
-
tags/1.7/req/options.php (added)
-
tags/1.7/req/services (added)
-
tags/1.7/req/services/awesm.php (added)
-
tags/1.7/req/services/snipurl.php (added)
-
tags/1.7/req/services/templateredirect.php (added)
-
tags/1.7/req/services/wprewriteredirect.php (added)
-
tags/1.7/req/urlservices.php (added)
-
tags/1.7/screenshot-1.jpg (added)
-
tags/1.7/screenshot-2.jpg (added)
-
tags/1.7/screenshot-3.jpg (added)
-
tags/1.7/uninstall.php (added)
-
trunk/fts-shortenurl.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/req/awesm.php (deleted)
-
trunk/req/display (added)
-
trunk/req/display/fts_shortenurl.css (added)
-
trunk/req/display/fts_shortenurl.js (added)
-
trunk/req/fts_shortenurl.css (deleted)
-
trunk/req/fts_shortenurl.js (deleted)
-
trunk/req/options.php (modified) (5 diffs)
-
trunk/req/services (added)
-
trunk/req/services/awesm.php (added)
-
trunk/req/services/snipurl.php (added)
-
trunk/req/services/templateredirect.php (added)
-
trunk/req/services/wprewriteredirect.php (added)
-
trunk/req/snipurl.php (deleted)
-
trunk/req/templateredirect.php (deleted)
-
trunk/req/urlservices.php (modified) (4 diffs)
-
trunk/req/wprewriteredirect.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
url-shortener/trunk/fts-shortenurl.php
r184692 r185791 1 1 <?php 2 3 2 /* 4 3 Plugin Name: URL Shortener 5 4 Plugin URI: http://fusedthought.com/downloads/url-shortener-wordpress-plugin/ 6 Description: This plugin integrates multiple URL Shortening service with your WordPress.org installation. Brings a similar functionality of WordPress.com's WP.me shortlinks feature but using 3rd partly URL Shorteners. Supports own domain URL Shortener awe.sm as well. 5 Description: This plugin integrates multiple URL Shortening service with your WordPress.org installation. Brings a similar functionality of WordPress.com's WP.me shortlinks feature but using 3rd partly URL Shorteners. Supports own domain URL Shortener awe.sm as well. <a href="http://fusedthought.com/downloads/addon-module-for-url-shortener-wordpress-plugin/">Addon module for beta-supported services available</a>. 7 6 Author: Gerald Yeo 8 7 Author URI: http://fusedthought.com 9 Version: 1. 6.310 /* 8 Version: 1.7 9 */ 11 10 12 11 /* 13 12 * Use "fts_show_shorturl($post)" to display link in a post 13 * On Demand shortening eg: "fts_shorturl('http://www.google.com', 'supr');" 14 14 */ 15 15 16 16 global $globe_fts_urlfx; 17 global $addonurl; 18 $addonurl = "http://fusedthought.com/downloads/addon-module-for-url-shortener-wordpress-plugin/"; 17 19 18 20 require_once( dirname(__FILE__) . '/req/urlservices.php' ); 19 21 require_once( dirname(__FILE__) . '/req/options.php' ); 20 require_once( dirname(__FILE__) . '/req/ wprewriteredirect.php' );21 require_once( dirname(__FILE__) . '/req/ templateredirect.php' );22 require_once( dirname(__FILE__) . '/req/services/wprewriteredirect.php' ); 23 require_once( dirname(__FILE__) . '/req/services/templateredirect.php' ); 22 24 23 25 function fts_show_shorturl($post){ … … 69 71 70 72 function fts_shortenurl_actions($links) { 71 $links[] = '<a href="options-general.php?page=shorturl" style="font-weight:bold">Settings</a>';73 $links[] = '<a href="options-general.php?page=shorturl">Settings</a>'; 72 74 return $links; 73 75 } -
url-shortener/trunk/readme.txt
r184696 r185791 2 2 Contributors: geraldyeo 3 3 Donate link: http://fusedthought.com/donate/ 4 Tags: url-shortener, short-url, url, shorten, tinyurl, is.gd, su.pr, bit.ly, tr.im, short.ie, snipurl, snurl, cl.gs, short.to, ping.fm, chilp.it, smoosh, smsh.me, u.nu, unfake.it, awe.sm, social, tweet, twitter4 Tags: url-shortener, short-url, url, shorten, shortener, tinyurl, is.gd, su.pr, bit.ly, tr.im, short.ie, snipurl, snurl, cl.gs, short.to, ping.fm, chilp.it, smoosh, smsh.me, u.nu, unfake.it, awe.sm, social, tweet, twitter, goo.gl 5 5 Requires at least: 2.7 6 6 Tested up to: 2.9 7 Stable tag: 1. 6.37 Stable tag: 1.7 8 8 9 9 Use your own URL Shortener or integrate 3rd Party Services with WordPress. Allows generating of shorturl with various services upon post/page publishing. … … 27 27 Version 1.5 also brings about an updated administration options page. 28 28 29 30 Version 1.7 now enables the inclusion of a addon module which will enable URL Shortening Services which are undergoing testing but not official supported under this main plugin. For more information, visit the [URL Shortener beta addon module information page](http://fusedthought.com/downloads/addon-module-for-url-shortener-wordpress-plugin/ "URL Shortener beta addon module information page") 31 29 32 **Current supported services are:** 30 33 … … 45 48 * awe.sm 46 49 50 47 51 **Notes on Awe.sm usage:** 48 52 49 53 * Custom domain can be configured in your Awe.sm account on the awe.sm website. 54 55 56 ** Addon Module Service list ** 57 58 * goo.gl (Google URL Shortener) 59 You can try out the following URL Shorterning services via the [URL Shortener Addon Module](http://fusedthought.com/downloads/addon-module-for-url-shortener-wordpress-plugin/ "URL Shortener Addon Module.") 50 60 51 61 … … 76 86 77 87 == Changelog == 88 89 = 1.7 = 90 * Added a beta module and option 91 * Addon functions for beta service display. 92 * Directory structure cleanup 78 93 79 94 = 1.6.3 = -
url-shortener/trunk/req/options.php
r184692 r185791 1 1 <?php 2 2 3 function fts_shortenurl_init(){ 3 4 global $globe_fts_urlfx; … … 11 12 //css JS 12 13 $plugin_url = WP_PLUGIN_URL.'/'.plugin_basename( dirname(dirname(__FILE__)) ); 13 wp_enqueue_script('fts_shortenurl_js', $plugin_url.'/req/ fts_shortenurl.js',array('jquery'),1.0);14 wp_enqueue_style('fts_shortenurl_css', $plugin_url.'/req/ fts_shortenurl.css');14 wp_enqueue_script('fts_shortenurl_js', $plugin_url.'/req/display/fts_shortenurl.js',array('jquery'),1.0); 15 wp_enqueue_style('fts_shortenurl_css', $plugin_url.'/req/display/fts_shortenurl.css'); 15 16 } 16 17 17 18 function draw_fts_shortenurl_page(){ 19 global $addonurl; 20 global $globe_fts_urlfx; 18 21 $plugin_loc = WP_PLUGIN_URL.'/'.plugin_basename( dirname(dirname(__FILE__)) ); 22 $plugin_logo = '<img src="'.$plugin_loc.'/plugin-logo.jpg" alt="" />'; 19 23 ?> 20 24 <div class="wrap"> 21 25 <h2>URL Shortener<span class="pluginbyline">by <a href="http://fusedthought.com">Gerald Yeo</a> (Fusedthought.com)</span></h2> 22 26 <div class="logo"> 23 <a href="http://fusedthought.com/downloads/url-shortener-wordpress-plugin/"><img src="<?php echo $plugin_loc; ?>/plugin-logo.jpg" alt="" /></a> 27 <a href="http://fusedthought.com/downloads/url-shortener-wordpress-plugin/"> 28 <?php if($globe_fts_urlfx['urlbetaservices'] == 'yes' && function_exists('fts_url_beta_logo')){ 29 fts_url_beta_logo(); 30 }else{echo $plugin_logo; }?> 31 </a> 24 32 </div> 25 33 <p>This plugin allows you to : … … 69 77 <option value="unfakeit" <?php selected( 'unfakeit', $fts_urlfx['urlservice'] ); ?>>unfake.it </option> 70 78 <option value="awesm" <?php selected( 'awesm', $fts_urlfx['urlservice'] ); ?>>awe.sm </option> 79 <?php if ($fts_urlfx['urlbetaservices'] == 'yes' && function_exists('fts_url_beta_list')){ 80 echo fts_url_beta_list(); 81 }?> 71 82 </select> 72 83 … … 197 208 </div> 198 209 210 <?php if ($fts_urlfx['urlbetaservices'] == 'yes' && function_exists('fts_url_beta_listinfo')){ 211 echo fts_url_beta_listinfo(); 212 }?> 199 213 </fieldset> 200 214 <fieldset> … … 205 219 <option value="no" <?php selected( 'no', $fts_urlfx['urlautogen'] ); ?>>No </option> 206 220 </select> 221 </div> 222 </fieldset> 223 <fieldset> 224 <div class="nl"> 225 <label class="betaserv">Enable Addon Module (for beta features): </label> 226 <select name="fts_urlfx[urlbetaservices]" id="urlbetaservices" > 227 <option value="no" <?php selected( 'no', $fts_urlfx['betaservices'] ); ?>>No </option> 228 <option class="betaservopt" value="yes" <?php selected( 'yes', $fts_urlfx['urlbetaservices'] ); ?>>Yes </option> 229 </select> 230 <p><strong>Note: </strong>The <a href="<?php print $addonurl;?>">URL Shortener Beta Addon</a> Module/Plugin has to be enabled.</p> 207 231 </div> 208 232 </fieldset> -
url-shortener/trunk/req/urlservices.php
r180815 r185791 1 1 <?php 2 function createshorturl($apiservice, $url ) {2 function createshorturl($apiservice, $url, $beta = NULL) { 3 3 global $globe_fts_urlfx; 4 4 … … 137 137 return $geturl; 138 138 break; 139 139 140 140 default: 141 if ($globe_fts_urlfx['urlbetaservices'] == 'yes' && function_exists('fts_url_beta_services')){ 142 $geturl = fts_url_beta_services($url); 143 return $geturl; 144 } 141 145 break; 142 146 } … … 167 171 168 172 } 169 require_once(dirname(__FILE__).'/s nipurl.php');173 require_once(dirname(__FILE__).'/services/snipurl.php'); 170 174 171 175 if ($urlprefix == 'snim'){ … … 177 181 178 182 function awesmapi($url, $key){ 179 require_once(dirname(__FILE__).'/ awesm.php');183 require_once(dirname(__FILE__).'/services/awesm.php'); 180 184 return $data; 181 185 } 182 186 183 function urlxmlresult($url, $method='POST', $body=array() ){187 function urlxmlresult($url, $method='POST', $body=array()){ 184 188 $request = new WP_Http; 185 189 $result = $request->request( $url, array( 'method' => $method, 'body' => $body) );
Note: See TracChangeset
for help on using the changeset viewer.