Jump to content

Download: (SOS31) URL Shortener Popup


Adriano Faria

Recommended Posts

  • 4 weeks later...

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 :)

Link to comment
Share on other sites

  • 2 months later...

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 stuff

EDIT: 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 ( &#33; $response ) { return array( 'status' => 'ok', 'url' => $response, 'method' => 'AlwaysG', 'raw' => $response ); } return array( 'status' => 'ok', 'url' => $response, 'method' => 'AlwaysG', 'raw' => $response ); } }



























































Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...