Plugin Directory

Changeset 185791


Ignore:
Timestamp:
12/21/2009 05:41:46 PM (16 years ago)
Author:
geraldyeo
Message:
 
Location:
url-shortener
Files:
28 added
7 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • url-shortener/trunk/fts-shortenurl.php

    r184692 r185791  
    11<?php
    2 
    32/*
    43Plugin Name: URL Shortener
    54Plugin 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.
     5Description: 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>.
    76Author: Gerald Yeo
    87Author URI: http://fusedthought.com
    9 Version: 1.6.3
    10 /*
     8Version: 1.7
     9*/
    1110
    1211/*
    1312 * Use "fts_show_shorturl($post)" to display link in a post
     13 * On Demand shortening eg: "fts_shorturl('http://www.google.com', 'supr');"
    1414 */
    1515
    1616global $globe_fts_urlfx;
     17global $addonurl;
     18$addonurl = "http://fusedthought.com/downloads/addon-module-for-url-shortener-wordpress-plugin/";
    1719
    1820require_once( dirname(__FILE__) . '/req/urlservices.php' );
    1921require_once( dirname(__FILE__) . '/req/options.php' );
    20 require_once( dirname(__FILE__) . '/req/wprewriteredirect.php' );
    21 require_once( dirname(__FILE__) . '/req/templateredirect.php' );
     22require_once( dirname(__FILE__) . '/req/services/wprewriteredirect.php' );
     23require_once( dirname(__FILE__) . '/req/services/templateredirect.php' );
    2224
    2325function fts_show_shorturl($post){
     
    6971
    7072function 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>';
    7274    return $links;
    7375}
  • url-shortener/trunk/readme.txt

    r184696 r185791  
    22Contributors: geraldyeo
    33Donate 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, twitter
     4Tags: 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
    55Requires at least: 2.7
    66Tested up to: 2.9
    7 Stable tag: 1.6.3
     7Stable tag: 1.7
    88
    99Use your own URL Shortener or integrate 3rd Party Services with WordPress. Allows generating of shorturl with various services upon post/page publishing.
     
    2727Version 1.5 also brings about an updated administration options page.
    2828
     29
     30Version 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
    2932**Current supported services are:**
    3033
     
    4548* awe.sm
    4649
     50
    4751**Notes on Awe.sm usage:**
    4852
    4953*  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)
     59You 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.")
    5060
    5161
     
    7686
    7787== Changelog ==
     88
     89= 1.7 =
     90* Added a beta module and option
     91* Addon functions for beta service display.
     92* Directory structure cleanup
    7893
    7994= 1.6.3 =
  • url-shortener/trunk/req/options.php

    r184692 r185791  
    11<?php
     2
    23function fts_shortenurl_init(){
    34    global $globe_fts_urlfx;
     
    1112    //css JS
    1213    $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');
    1516}
    1617
    1718function draw_fts_shortenurl_page(){
     19    global $addonurl;
     20    global $globe_fts_urlfx;
    1821    $plugin_loc = WP_PLUGIN_URL.'/'.plugin_basename( dirname(dirname(__FILE__)) );
     22    $plugin_logo = '<img src="'.$plugin_loc.'/plugin-logo.jpg" alt="" />';
    1923?>
    2024    <div class="wrap">
    2125        <h2>URL Shortener<span class="pluginbyline">by <a href="http://fusedthought.com">Gerald Yeo</a> (Fusedthought.com)</span></h2>
    2226        <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>
    2432        </div>
    2533        <p>This plugin allows you to :
     
    6977                            <option value="unfakeit" <?php selected( 'unfakeit', $fts_urlfx['urlservice'] ); ?>>unfake.it &nbsp;</option>
    7078                            <option value="awesm" <?php selected( 'awesm', $fts_urlfx['urlservice'] ); ?>>awe.sm &nbsp;</option>
     79                            <?php if ($fts_urlfx['urlbetaservices'] == 'yes' && function_exists('fts_url_beta_list')){
     80                            echo fts_url_beta_list();
     81                            }?>
    7182                        </select>
    7283                       
     
    197208                        </div>
    198209                       
     210                        <?php if ($fts_urlfx['urlbetaservices'] == 'yes' && function_exists('fts_url_beta_listinfo')){
     211                        echo fts_url_beta_listinfo();
     212                        }?>
    199213                    </fieldset>
    200214                    <fieldset>
     
    205219                                <option value="no" <?php selected( 'no', $fts_urlfx['urlautogen'] ); ?>>No &nbsp;</option>
    206220                            </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 &nbsp;</option>                           
     228                                <option class="betaservopt" value="yes" <?php selected( 'yes', $fts_urlfx['urlbetaservices'] ); ?>>Yes &nbsp;</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>
    207231                        </div>
    208232                    </fieldset>
  • url-shortener/trunk/req/urlservices.php

    r180815 r185791  
    11<?php
    2 function createshorturl($apiservice, $url) { 
     2function createshorturl($apiservice, $url, $beta = NULL) { 
    33    global $globe_fts_urlfx;
    44   
     
    137137            return $geturl;
    138138            break;
    139        
     139
    140140        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            }   
    141145            break;
    142146    }
     
    167171   
    168172    }
    169     require_once(dirname(__FILE__).'/snipurl.php');
     173    require_once(dirname(__FILE__).'/services/snipurl.php');
    170174   
    171175    if ($urlprefix == 'snim'){
     
    177181
    178182function awesmapi($url, $key){
    179     require_once(dirname(__FILE__).'/awesm.php');
     183    require_once(dirname(__FILE__).'/services/awesm.php');
    180184    return $data;
    181185}
    182186
    183 function urlxmlresult($url, $method='POST', $body=array() ){
     187function urlxmlresult($url, $method='POST', $body=array()){
    184188    $request = new WP_Http;
    185189    $result = $request->request( $url, array( 'method' => $method, 'body' => $body) );
Note: See TracChangeset for help on using the changeset viewer.