Version 3.4.6

This commit is contained in:
Neo committed 2025-12-19 00:40:53 -08:00
1 parent e4478369d8
commit b45ea0dffb
1568 files changed
+155104 -161665

No files matched your search

@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* URL shortener
* Owner: Matt Mecham
* Last Updated: $Date: 2013-04-12 18:05:43 -0400 (Fri, 12 Apr 2013) $
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* URL shortener
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -1,74 +0,0 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.4
* URL shortener
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author Matt Mecham
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 24th November 2009
* @version $Revision: 10721 $
*/
/* Class name must match shortener directory name */
class topic extends urlShorten
{
protected $_config = array();
protected $_cfm;
/**
* Method constructor
*
* If you pass false as the key, it will not save out the imported GUIDs
*
* @return @e void
*
*/
public function __construct( $config=array() )
{
$this->_config = $config;
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
$this->_cfm = new $classToLoad();
$this->_cfm->timeout = 30;
}
/**
* Shorten URL
*
* @param string URL to shorten
* @return array ( 'status' => [ok/failed], 'url' => [shortened url], 'method' => [api used], 'raw' => [any raw data] )
*/
public function apiShorten( $url )
{
/* Query the service */
$response = $this->_cfm->getFileContents( "http://topic.to/api.php?action=shorturl&url=" . urlencode( $url ) . "&format=json" );
if ( ! $response )
{
return array( 'status' => 'failed' );
}
$obj = json_decode( $response, TRUE );
if ( $obj['statusCode'] != 200 )
{
return array( 'status' => 'failed' );
}
return array( 'status' => 'ok',
'url' => $obj['shorturl'],
'method' => 'topic',
'raw' => $obj['url'] );
}
}
@@ -1,28 +0,0 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.4
* URL shortener
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author Matt Mecham
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 24th November 2009
* @version $Revision: 10721 $
*/
$config = array();
/* Login... */
$config['login'] = '';
/* API KEY - Not needed : */
$config['apiKey'] = '';
@@ -1,10 +0,0 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
+2 -2
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* URL Shortener
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -22,7 +22,7 @@
# Example: Shorten URL
# require_once( IPS_ROOT_PATH . 'sources/classes/url/shorten.php' );/*noLibHook*/
# $shorten = new urlShorten();
# $data = $shorten->shorten( 'http://www.invisionpower.com', 'bitly' );
# $data = $shorten->shorten( 'http://www.google.com', 'bitly' );
#
# print $data['url'];
#