Adriano Faria Posted April 10, 2011 Posted April 10, 2011 File Name: (SOS31) URL Shortener PopupFile Submitter: Adriano FariaFile Submitted: 10 Apr 2011File Updated: 04 May 2011File Category: Hooks and Plugins This hook will shorten entered URLs or current URL using URL Shortener APIs below:bitlyGoogleTinyURLTweetburnerCompatibility:IP.Board 3.1.XClick here to download this file
Adriano Faria Posted May 4, 2011 Author Posted May 4, 2011 What's New in Version 1.1.0: Added 3 new URL Shortener APIs: Google, TinyURL and Tweetburner.
Volstate Posted May 4, 2011 Posted May 4, 2011 I downloaded and installed this but don't see in the control panel where you edit the hook nor can I see on the board where you use it. Is it automatic or is there a button to push? Can you explain how it works exactly... ***Ok I found it on the board. Nice app :)
Adriano Faria Posted May 4, 2011 Author Posted May 4, 2011 There's no setting. Just upload XML's hook and you'll see a new link besides VIEW NEW CONTENT link.
Volstate Posted May 5, 2011 Posted May 5, 2011 There's no setting. Just upload XML's hook and you'll see a new link besides VIEW NEW CONTENT link. Yes I found it. I realized it after I asked the question. Another nice hook from you....
I am Freddy G Posted July 7, 2011 Posted July 7, 2011 Hello, I was wondering if there are plans to use bit.ly custom domain's. Bit.ly now allows you to host your own custom domain name free of charge. It would be nice to just input your api key via the admin cp but I don't think its coded for this. API Documentation via JSON Also if I wanted to add it would I just add it in the api's folder with a api.php and conf.php file? Thanks, The guy who likes to do hard stuffEDIT: I did it! What do you think of this api lol <?php /** * Product Title: (SOS31) URL Shortener Popup * Product Version: 1.1.0 * Author: Adriano Faria * Website: SOS Invision * Website URL: http://forum.sosinvision.com.br/ * Email: administracao@sosinvision.com.br */ /* Class name must match shortener directory name */ class AlwaysG extends urlShorten { private $_config = array(); public $errors = array(); /** * Method constructor * * If you pass false as the key, it will not save out the imported GUIDs * @access public * @return void * */ public function __construct( $config=array() ) { $this->_config = $config; } /** * Shorten URL * * @access public * @param string URL to shorten * @return array ( 'status' => [ok/failed], 'url' => [shortened url], 'method' => [api used], 'raw' => [any raw data] ) * Exception codes: */ public function apiShorten( $url ) { /* Query the service */ $response = file_get_contents( "http://api.bitly.com/v3/shorten?login=MYNAME". htmlspecialchars_decode('&') ."apiKey=R_MYNumber". htmlspecialchars_decode('&') ."longUrl=". $url ."". htmlspecialchars_decode('&') ."format=txt"); IPSDebug::fireBug('info', array( $response ) ); if ( ! $response ) { return array( 'status' => 'ok', 'url' => $response, 'method' => 'AlwaysG', 'raw' => $response ); } return array( 'status' => 'ok', 'url' => $response, 'method' => 'AlwaysG', 'raw' => $response ); } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.