Version 3.0.5
This commit is contained in:
1 parent
19b38c7c74
commit
1d4720f3e2
3755 files changed
+508378
-664541
No files matched your search
@@ -0,0 +1 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> 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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Defines blogger API parameters
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
*
|
||||
*/
|
||||
|
||||
$_METAWEBLOG_ALLOWED_METHODS = array();
|
||||
|
||||
/**
|
||||
* getUsersBlogs
|
||||
* return basic Blog information about the users Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getUsersBlogs'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getUserInfo
|
||||
* return basic information about the user
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getUserInfo'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* deletePost
|
||||
* Deletes an entry from the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['deletePost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'bool',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newPost
|
||||
* Adds a new entry to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'string',
|
||||
'param5' => 'bool',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* editPost
|
||||
* Edit an entry in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['editPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'string',
|
||||
'param1' => 'integer',
|
||||
'param2' => 'string',
|
||||
'param3' => 'string',
|
||||
'param4' => 'string',
|
||||
'param5' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Defines metaweblog API parameters
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
*
|
||||
*/
|
||||
|
||||
$_METAWEBLOG_ALLOWED_METHODS = array();
|
||||
|
||||
/**
|
||||
* getCategories
|
||||
* return the categories used in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getCategories'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getRecentPosts
|
||||
* return the most recent entries of the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getRecentPosts'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'integer'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newPost
|
||||
* Post a new entry to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
'param4' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* editPost
|
||||
* Edit an entry in the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['editPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
'param4' => 'bool'
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* getPost
|
||||
* Get an entry from the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['getPost'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* newMediaObject
|
||||
* Post a media object to the Blog
|
||||
*/
|
||||
$_METAWEBLOG_ALLOWED_METHODS['newMediaObject'] = array(
|
||||
'in' => array(
|
||||
'param0' => 'integer',
|
||||
'param1' => 'string',
|
||||
'param2' => 'string',
|
||||
'param3' => 'struct',
|
||||
),
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
@@ -0,0 +1,686 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Blogger API Functions
|
||||
* Last Updated: $Date: 2009-11-30 10:24:17 -0500 (Mon, 30 Nov 2009) $
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 5491 $
|
||||
*
|
||||
*/
|
||||
|
||||
class xmlrpc_server
|
||||
{
|
||||
/**
|
||||
* Defines the service for WSDL
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
public $__dispatch_map = array();
|
||||
|
||||
/**
|
||||
* IPS API SERVER Class
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $classApiServer;
|
||||
|
||||
/**
|
||||
* Error string
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $error = "";
|
||||
|
||||
/**
|
||||
* Global registry
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $registry;
|
||||
|
||||
/**
|
||||
* CONSTRUCTOR
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
**/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Set IPS CLASS
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->request = $this->registry->fetchRequest();
|
||||
|
||||
/* Load the Blog functions library */
|
||||
require_once( IPS_ROOT_PATH . 'applications_addon/ips/blog/sources/classes/blogFunctions.php' );
|
||||
$registry->setClass( 'blogFunctions', new blogFunctions( $registry ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Load allowed methods and build dispatch
|
||||
// list
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( DOC_IPS_ROOT_PATH . 'interface/blog/apis/methods_blogger.php' );
|
||||
|
||||
if ( is_array( $_METAWEBLOG_ALLOWED_METHODS ) and count( $_METAWEBLOG_ALLOWED_METHODS ) )
|
||||
{
|
||||
foreach( $_METAWEBLOG_ALLOWED_METHODS as $_method => $_data )
|
||||
{
|
||||
$this->__dispatch_map[ $_method ] = $_data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::getUsersBlogs()
|
||||
*
|
||||
* Retrieves a user's blog entries
|
||||
*
|
||||
* This will return a param "response" with either
|
||||
* - FAILED (Unknown failure)
|
||||
* - SUCCESS (Added OK)
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @param string $appkey Application key
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @return string xml document
|
||||
**/
|
||||
public function getUsersBlogs( $appkey, $username, $password )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$return = 'FAILED';
|
||||
|
||||
//-----------------------------------------
|
||||
// Authenticate
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// return
|
||||
//-----------------------------------------
|
||||
|
||||
$return = 'SUCCESS';
|
||||
$blog_url = substr( str_replace( "&", "&", $this->registry->blogFunctions->getBlogUrl( $this->blog['blog_id'] ) ), 0, -1 );
|
||||
$this->classApiServer->apiSendReply( array( array( 'url' => $blog_url,
|
||||
'blogid' => $this->blog['blog_id'],
|
||||
'blogName' => IPSText::UNhtmlspecialchars( $this->blog['blog_name'] )
|
||||
) ) );
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::getUserInfo()
|
||||
*
|
||||
* Retrieve user info
|
||||
*
|
||||
* This will return a param "response" with either
|
||||
* - FAILED (Unknown failure)
|
||||
* - SUCCESS (Added OK)
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @param string $appkey Appkey (ignored)
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @return string xml
|
||||
**/
|
||||
public function getUserInfo( $appkey, $username, $password )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Authenticate
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// return
|
||||
//-----------------------------------------
|
||||
$this->classApiServer->apiSendReply( array( 'nickname' => $this->memberData['members_display_name'],
|
||||
'userid' => $this->memberData['member_id'],
|
||||
'url' => ipsRegistry::$settings['board_url'].'/index.'.ipsRegistry::$settings['php_ext'].'?showuser='.$this->memberData['member_id'],
|
||||
'email' => $this->memberData['email']
|
||||
) );
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::deletePost()
|
||||
*
|
||||
* Deletes a Blog entry.
|
||||
*
|
||||
* @access public
|
||||
* @param string $appkey Appkey (ignored)
|
||||
* @param int $postid Entry ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @param bool $publish Publish (ignored)
|
||||
* @return string xml
|
||||
**/
|
||||
public function deletePost( $appkey, $postid, $username, $password, $publish )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_portal' ), 'blog' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Authenticate
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
if (!$this->registry->blogFunctions->allowDelEntry( $this->blog ) )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->registry->class_localization->words['blogger_error_1'] );
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// find the entry
|
||||
//-----------------------------------------
|
||||
$eid = intval($postid);
|
||||
$entry = $this->registry->DB()->buildAndFetch( array ( 'select' => '*',
|
||||
'from' => 'blog_entries',
|
||||
'where' => "entry_id = ".$eid
|
||||
) );
|
||||
if ( ! $entry['entry_id'] )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, sprintf( $this->registry->class_localization->words['blogger_error_2'], $eid ) );
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// delete the entry
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->blogFunctions->deleteEntries( array( $eid ) );
|
||||
|
||||
$this->addModlog( $this->registry->class_localization->words['blogger_blog_prefix'] . "({$this->blog['blog_id']}) '{$this->blog['blog_name']}': {$this->registry->class_localization->words['blogger_deleted_log']} '{$entry['entry_name']}'" );
|
||||
|
||||
//-------------------------------------------------
|
||||
// Return
|
||||
//-------------------------------------------------
|
||||
$this->classApiServer->apiSendReply();
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::newPost()
|
||||
*
|
||||
* Adds a new post to the Blog.
|
||||
*
|
||||
* @access public
|
||||
* @param string $appkey Appkey (ignored)
|
||||
* @param int $blogid Blog ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @param string $contentd Content
|
||||
* @param bool $publish Publish (ignored)
|
||||
* @return string xml
|
||||
**/
|
||||
public function newPost( $appkey, $blogid, $username, $password, $content, $publish )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_portal' ), 'blog' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Authenticate
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
if ( $this->blog['blog_id'] != $blogid )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->registry->class_localization->words['blogger_error_3'] );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* External blog? */
|
||||
if ( $this->blog['blog_type'] != 'local' )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, 'Cannot post to external blog' );
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// return
|
||||
//-----------------------------------------
|
||||
if ( ! $this->_compilePost( $content['description'], $publish ) )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
|
||||
$this->registry->DB()->insert( 'blog_entries', $this->entry );
|
||||
$entry_id = $this->registry->DB()->getInsertId();
|
||||
|
||||
$this->registry->blogFunctions->rebuildBlog( $this->blog['blog_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Load and config POST class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( BLOG_PATH . "sources/classes/post/blogPost.php" );
|
||||
require_once( BLOG_PATH . "sources/classes/post/entry_new_entry.php" );
|
||||
|
||||
$this->lib_post = new postFunctions( $this->registry );
|
||||
$this->lib_post->blog = & $this->blog;
|
||||
|
||||
//-------------------------------------------------
|
||||
// If the entry is published, run the Blog tracker and pings
|
||||
//-------------------------------------------------
|
||||
|
||||
$this->lib_post->blogTracker( $entry_id, $this->entry['entry_name'], $this->entry['entry'] );
|
||||
$this->lib_post->blogPings ( $entry_id, $this->entry );
|
||||
|
||||
//-------------------------------------------------
|
||||
// Update the Blog stats
|
||||
//-------------------------------------------------
|
||||
$r = $this->registry->cache()->getCache( 'blog_stats' );
|
||||
|
||||
$r['blog_stats']['stats_num_entries']++;
|
||||
$this->registry->cache()->setCache( 'blog_stats', $r, array( 'array' => 1, 'donow' => 1 ) );
|
||||
|
||||
$this->classApiServer->apiSendReply( $entry_id );
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::editPost()
|
||||
*
|
||||
* Edit the entry.
|
||||
*
|
||||
* @access public
|
||||
* @param string $appkey Appkey (ignored)
|
||||
* @param int $postid Entry ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @param string $content Post content
|
||||
* @param bool $publish Publish?
|
||||
* @return string xml
|
||||
**/
|
||||
public function editPost( $appkey, $postid, $username, $password, $content, $publish )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_portal' ), 'blog' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Authenticate
|
||||
//-----------------------------------------
|
||||
if ( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// find the entry
|
||||
//-----------------------------------------
|
||||
$entry = $this->registry->DB()->buildAndFetch( array ( 'select' => '*',
|
||||
'from' => 'blog_entries',
|
||||
'where' => "entry_id = ".intval($postid)
|
||||
) );
|
||||
if ( ! $entry['entry_id'] )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, sprintf( $this->registry->class_localization->words['blogger_error_3'], intval($postid) ) );
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// return
|
||||
//-----------------------------------------
|
||||
if ( ! $this->_compilePost( $content['description'], $publish ) )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
|
||||
$this->entry['blog_id'] = $entry['blog_id'];
|
||||
$this->entry['entry_author_id'] = $entry['entry_author_id'];
|
||||
$this->entry['entry_author_name'] = $entry['entry_author_name'];
|
||||
$this->entry['entry_date'] = $entry['entry_date'];
|
||||
$this->entry['entry_last_update'] = $entry['entry_last_update'];
|
||||
$this->entry['entry_edit_time'] = time();
|
||||
$this->entry['entry_edit_name'] = $this->memberData['members_display_name'];
|
||||
$this->entry['entry_poll_state'] = $entry['entry_poll_state'];
|
||||
|
||||
//-------------------------------------------------
|
||||
// Update entry in DB
|
||||
//-------------------------------------------------
|
||||
$this->registry->DB()->update( 'blog_entries', $this->entry, 'entry_id='.$entry['entry_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Rebuild the Blog
|
||||
//-----------------------------------------
|
||||
$this->registry->blogFunctions->rebuildBlog ( $this->blog['blog_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return true
|
||||
//-----------------------------------------
|
||||
$this->classApiServer->apiSendReply();
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* _authenticate()
|
||||
*
|
||||
* Authenticates the username and password
|
||||
*
|
||||
* This will return
|
||||
* - false (Failed)
|
||||
* - true (Succes)
|
||||
*
|
||||
* @access private
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @return boolean
|
||||
**/
|
||||
private function _authenticate( $username, $password )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_portal' ), 'blog' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Are they banned?
|
||||
//-----------------------------------------
|
||||
if ( is_array( $this->caches['banfilters'] ) and count( $this->caches['banfilters'] ) )
|
||||
{
|
||||
foreach ($this->caches['banfilters'] as $ip)
|
||||
{
|
||||
$ip = str_replace( '\*', '.*', preg_quote($ip, "/") );
|
||||
|
||||
if ( preg_match( "/^$ip$/", $this->member->ip_address ) )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_banned_msg'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// load the member
|
||||
//-----------------------------------------
|
||||
$member = IPSMember::load( IPSText::parseCleanValue( $username ), 'extendedProfile', 'username' );
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_unknown_user'];
|
||||
return false;
|
||||
}
|
||||
|
||||
ips_MemberRegistry::setMember( $member['member_id'] );
|
||||
|
||||
//--------------------------------
|
||||
// Is the board offline?
|
||||
//--------------------------------
|
||||
|
||||
if (ipsRegistry::$settings['board_offline'] == 1)
|
||||
{
|
||||
if ($this->memberData['g_access_offline'] != 1)
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_board_offline'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Temporarely banned?
|
||||
//-----------------------------------------
|
||||
if ( $member['temp_ban'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_suspended'];
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load the Blog
|
||||
//-----------------------------------------
|
||||
$this->registry->blogFunctions->buildPerms();
|
||||
|
||||
//-----------------------------------------
|
||||
// Users can have more than one blog - just
|
||||
// grab first one mysql returns
|
||||
//-----------------------------------------
|
||||
|
||||
$blog = $this->registry->DB()->buildAndFetch( array(
|
||||
'select' => 'blog_id, blog_name',
|
||||
'from' => 'blog_blogs',
|
||||
'where' => "member_id={$member['member_id']}"
|
||||
) );
|
||||
|
||||
if ( ! $blog['blog_id'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_noblog'];
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $this->blog = $this->registry->blogFunctions->loadBlog( $blog['blog_id'], 1 ) )
|
||||
{
|
||||
$this->error = $this->blogFunctions->error;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Blog post permissions?
|
||||
//-----------------------------------------
|
||||
if ( !$this->blog['allow_entry'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_nopost'];
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Validate password?
|
||||
//-----------------------------------------
|
||||
if ( !ipsRegistry::$settings['blog_allow_xmlrpc'] or !$this->blog['blog_settings']['enable_xmlrpc'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_noxmlrpc'];
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $this->blog['blog_settings']['xmlrpc_password'] != md5( IPSText::parseCleanValue( $password ) ) )
|
||||
{
|
||||
if ( isset( $this->blog['blog_settings']['xmlrpc_failedattempts'] ) && $this->blog['blog_settings']['xmlrpc_failedattempts'] > 5 )
|
||||
{
|
||||
$this->blog['blog_settings']['enable_xmlrpc'] = 0;
|
||||
$this->blog['blog_settings']['xmlrpc_failedattempts'] = 0;
|
||||
$blog_settings = serialize ( $this->blog['blog_settings'] );
|
||||
$this->registry->DB()->update( 'blog_blogs', array( 'blog_settings' => $blog_settings ), "blog_id = {$this->blog['blog_id']}" );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->blog['blog_settings']['xmlrpc_failedattempts'] = isset( $this->blog['blog_settings']['xmlrpc_failedattempts'] ) ? intval($this->blog['blog_settings']['xmlrpc_failedattempts'])+1 : 1;
|
||||
$blog_settings = serialize ( $this->blog['blog_settings'] );
|
||||
$this->registry->DB()->update( 'blog_blogs', array( 'blog_settings' => $blog_settings ), "blog_id = {$this->blog['blog_id']}" );
|
||||
}
|
||||
|
||||
$this->error = $this->registry->class_localization->words['blogger_inv_pass'];
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isset( $this->blog['blog_settings']['xmlrpc_failedattempts'] ) && $this->blog['blog_settings']['xmlrpc_failedattempts'] > 0 )
|
||||
{
|
||||
$this->blog['blog_settings']['xmlrpc_failedattempts'] = 0;
|
||||
$blog_settings = serialize ( $this->blog['blog_settings'] );
|
||||
$this->registry->DB()->update( 'blog_blogs', array( 'blog_settings' => $blog_settings ), "blog_id = {$this->blog['blog_id']}" );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set the member data
|
||||
//-----------------------------------------
|
||||
|
||||
$this->memberData = $member;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add an entry to the Mod log
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
public function addModlog( $mod_title )
|
||||
{
|
||||
$this->registry->DB()->insert( 'moderator_logs', array (
|
||||
'member_id' => $this->memberData['member_id'],
|
||||
'member_name' => $this->memberData['members_display_name'],
|
||||
'ip_address' => $this->member->ip_address,
|
||||
'http_referer'=> my_getenv('HTTP_REFERER'),
|
||||
'ctime' => time(),
|
||||
'action' => $mod_title,
|
||||
'query_string'=> my_getenv('QUERY_STRING'),
|
||||
) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compile the entry content
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
private function _compilePost( & $content, $publish )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_portal' ), 'blog' );
|
||||
|
||||
//----------------------------------------------------------------
|
||||
// Do we have a valid post?
|
||||
//----------------------------------------------------------------
|
||||
ipsRegistry::$settings['blog_max_entry_length'] = ipsRegistry::$settings['blog_max_entry_length'] ? ipsRegistry::$settings['blog_max_entry_length'] : 2140000;
|
||||
|
||||
if (strlen( trim( IPSText::br2nl( $content['description'] ) ) ) < 1)
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_emptypost'];
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strlen( $content ) > (ipsRegistry::$settings['blog_max_entry_length']*1024))
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_toolong'];
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// check to make sure we have a valid entry title
|
||||
//-------------------------------------------------
|
||||
$title = $content['title'];
|
||||
|
||||
# Fix &
|
||||
$title = str_replace( '&', '&', $title );
|
||||
$title = IPSText::parseCleanValue( $title );
|
||||
|
||||
# Fix up &reg;
|
||||
$title = str_replace( '&reg;', '®', $title );
|
||||
$title = IPSText::getTextClass('parser')->stripBadWords( $title );
|
||||
$title = str_replace( "<br>", "", $title );
|
||||
$title = trim($title);
|
||||
|
||||
//-------------------------------------------------
|
||||
// More unicode..
|
||||
//-------------------------------------------------
|
||||
$temp = IPSText::stripslashes($title);
|
||||
$temp = preg_replace("/&#([0-9]+);/", "-", $temp );
|
||||
if ( strlen($temp) > 64 )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_title_toolong'];
|
||||
return false;
|
||||
}
|
||||
if ( (strlen($temp) < 2) or (!$title) )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_notitle'];
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// Sort post content: Convert HTML to BBCode
|
||||
//--------------------------------------------
|
||||
|
||||
IPSText::getTextClass('parser')->parse_smilies = 1;
|
||||
IPSText::getTextClass('parser')->parse_html = 0;
|
||||
IPSText::getTextClass('parser')->parse_bbcode = 1;
|
||||
IPSText::getTextClass('parser')->parsing_section = 'blog_entry';
|
||||
|
||||
//--------------------------------------------
|
||||
// Clean up..
|
||||
//--------------------------------------------
|
||||
|
||||
$content = preg_replace( "#<br />(\r)?\n#is", "<br />", $content );
|
||||
|
||||
//-----------------------------------------
|
||||
// Post process the editor
|
||||
// Now we have safe HTML and bbcode
|
||||
//-----------------------------------------
|
||||
|
||||
$content = IPSText::getTextClass('parser')->preDbParse( IPSText::getTextClass('editor')->processRawPost( IPSText::stripslashes($content) ) );
|
||||
|
||||
$dte = time();
|
||||
|
||||
/* Build the entry array */
|
||||
$this->entry = array(
|
||||
'blog_id' => $this->blog['blog_id'],
|
||||
'entry_author_id' => $this->memberData['member_id'],
|
||||
'entry_author_name' => $this->memberData['members_display_name'],
|
||||
'entry_date' => $dte,
|
||||
'entry_name' => $title,
|
||||
'entry_name_seo' => IPSText::makeSeoTitle($title),
|
||||
'entry' => $content,
|
||||
'entry_short' => $this->registry->blogFunctions->getEntryExcerpt( array( 'entry_short' => '', 'entry_id' => null, 'entry' => $content ) ),
|
||||
'entry_status' => ($publish ? 'published' : 'draft'),
|
||||
'entry_post_key' => md5(microtime()),
|
||||
'entry_html_state' => 0,
|
||||
'entry_use_emo' => 1,
|
||||
'entry_last_update' => $dte,
|
||||
'entry_gallery_album' => 0,
|
||||
'entry_poll_state' => 0,
|
||||
);
|
||||
|
||||
// If we had any errors, parse them back to this class
|
||||
// so we can track them later.
|
||||
if ( is_array(IPSText::getTextClass('parser')->error) && count(IPSText::getTextClass('parser')->error) > 0 )
|
||||
{
|
||||
$this->error = implode( " : ", IPSText::getTextClass('parser')->error );
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,929 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Metaweblog API Functions
|
||||
* Last Updated: $Date: 2009-11-30 10:24:17 -0500 (Mon, 30 Nov 2009) $
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 5491 $
|
||||
*
|
||||
*/
|
||||
|
||||
class xmlrpc_server
|
||||
{
|
||||
/**
|
||||
* Defines the service for WSDL
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
public $__dispatch_map = array();
|
||||
|
||||
/**
|
||||
* IPS API SERVER Class
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $classApiServer;
|
||||
|
||||
/**
|
||||
* Error string
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $error = "";
|
||||
|
||||
/**
|
||||
* Global registry
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $registry;
|
||||
|
||||
/**
|
||||
* CONSTRUCTOR
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make registry objects */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
/* Load the Blog functions library */
|
||||
require_once( IPS_ROOT_PATH . 'applications_addon/ips/blog/sources/classes/blogFunctions.php' );
|
||||
$registry->setClass( 'blogFunctions', new blogFunctions( $registry ) );
|
||||
|
||||
/* Language */
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_portal' ), 'blog' );
|
||||
|
||||
/* Allowed Methods and Dispatch Map */
|
||||
require_once( DOC_IPS_ROOT_PATH . 'interface/blog/apis/methods_metaweblog.php' );
|
||||
|
||||
if ( is_array( $_METAWEBLOG_ALLOWED_METHODS ) and count( $_METAWEBLOG_ALLOWED_METHODS ) )
|
||||
{
|
||||
foreach( $_METAWEBLOG_ALLOWED_METHODS as $_method => $_data )
|
||||
{
|
||||
$this->__dispatch_map[ $_method ] = $_data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::getCategories()
|
||||
*
|
||||
* Returns a list of the Blogs categories.
|
||||
*
|
||||
* @access public
|
||||
* @param string $blogid Application key
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @return string xml document
|
||||
**/
|
||||
public function getCategories( $blogid, $username, $password )
|
||||
{
|
||||
/* Authenticate the request */
|
||||
if ( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
if ( $this->blog['blog_id'] != $blogid )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->registry->class_localization->words['blogger_error_3'] );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Query tags */
|
||||
$this->DB->build( array(
|
||||
'select' => '*',
|
||||
'from' => 'tags_index',
|
||||
'where' => "app='blog' AND type='category' AND type_id_2={$blogid}"
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
/* Loop through tags and build array */
|
||||
$return_array = array();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$return_array[] = array(
|
||||
'description' => $r['tag'],
|
||||
'htmlUrl' => "{$this->settings['base_url']}app=blog&module=display§ion=blog&blogid={$this->blog['blog_id']}&tag={$r['tag']}",
|
||||
'rssUrl' => ''
|
||||
);
|
||||
}
|
||||
|
||||
/* Send response */
|
||||
$this->classApiServer->apiSendReply( $return_array );
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::getRecentPosts()
|
||||
*
|
||||
* Returns a list of the Blogs categories.
|
||||
*
|
||||
* @access public
|
||||
* @param int $blogid Blog ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @param int $numberOfPosts Number of posts
|
||||
* @return string xml
|
||||
**/
|
||||
public function getRecentPosts( $blogid, $username, $password, $numberOfPosts )
|
||||
{
|
||||
/* INIT */
|
||||
$return_array = array();
|
||||
|
||||
/* Authenticate */
|
||||
if( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
/* Check the blog id */
|
||||
if ( $this->blog['blog_id'] != $blogid )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->registry->class_localization->words['blogger_error_3'] );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Blog URL */
|
||||
$blog_url = str_replace( "&", "&", $this->registry->blog_std->getBlogUrl( $this->blog['blog_id'] ) );
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'e.*',
|
||||
'from' => array( 'blog_entries' => 'e' ),
|
||||
'where' => "e.blog_id={$this->blog['blog_id']}",
|
||||
'order' => 'e.entry_date DESC',
|
||||
'limit' => array( 0, intval( $numberOfPosts ) ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'm.member_group_id, m.mgroup_others',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=e.entry_author_id',
|
||||
'type' => 'left'
|
||||
)
|
||||
)
|
||||
) );
|
||||
$q = $this->DB->execute();
|
||||
|
||||
while( $entry = $this->DB->fetch( $q ) )
|
||||
{
|
||||
/* Setup Parser */
|
||||
IPSText::getTextClass('parser')->parse_html = $entry['entry_html_state'] ? 1 : 0;
|
||||
IPSText::getTextClass('parser')->parse_wordwrap = $this->settings['post_wordwrap'];
|
||||
IPSText::getTextClass('parser')->parse_nl2br = $entry['entry_html_state'] == 2 ? 1 : 0;
|
||||
IPSText::getTextClass('parser')->parse_smilies = $entry['entry_use_emo'] ? 1: 0;
|
||||
IPSText::getTextClass('parser')->parsing_section = 'blog_entry';
|
||||
IPSText::getTextClass('parser')->parsing_mgroup = $entry['member_group_id'];
|
||||
IPSText::getTextClass('parser')->parsing_mgroup_others = $entry['member_group_id'];
|
||||
|
||||
/* Parse */
|
||||
$entry['entry'] = IPSText::getTextClass('parser')->preDisplayParse( $entry['entry'] );
|
||||
|
||||
/* Tags */
|
||||
$this->DB->build( array( 'select' => 'tag', 'from' => 'tags_index', 'where' => "app='blog' AND type_id={$entry['entry_id']} AND type_id_2={$entry['blog_id']}" ) );
|
||||
$this->DB->execute();
|
||||
|
||||
$tags = array();
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$tags[] = $r['tag'];
|
||||
}
|
||||
|
||||
/* Add to output */
|
||||
$return_array[] = array(
|
||||
'categories' => $tags,
|
||||
'dateCreated' => gmdate("Ymd\TH:i:s",$entry['entry_date']),
|
||||
'description' => $entry['entry'],
|
||||
'link' => $blog_url.'showentry='.$entry['entry_id'],
|
||||
'postid' => $entry['entry_id'],
|
||||
'title' => $entry['entry_name']
|
||||
);
|
||||
}
|
||||
$force_array = array( 'dateCreated' => 'dateTime.iso8601' );
|
||||
|
||||
$this->classApiServer->apiSendReply( $return_array, 0, $force_array );
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::newPost()
|
||||
*
|
||||
* Post a new entry.
|
||||
*
|
||||
* @access public
|
||||
* @param int $blogid Blog ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @param array $content Post content
|
||||
* @param bool $publish Publish?
|
||||
* @return string xml
|
||||
**/
|
||||
public function newPost( $blogid, $username, $password, $content, $publish )
|
||||
{
|
||||
/* Authenticate */
|
||||
if ( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
/* Check the ID */
|
||||
if ( $this->blog['blog_id'] != $blogid )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->registry->class_localization->words['blogger_error_3'] );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* External blog? */
|
||||
if ( $this->blog['blog_type'] != 'local' )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, 'Cannot post to external blog' );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Compile the post */
|
||||
if ( ! $this->_compilePost( $content, $publish ) )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Insert the blog */
|
||||
$this->DB->insert( 'blog_entries', $this->entry );
|
||||
$entry_id = $this->DB->getInsertId();
|
||||
|
||||
/* Rebuild teh blog stats */
|
||||
$this->registry->blog_std->rebuildBlog( $this->blog['blog_id'] );
|
||||
|
||||
/* If the entry is published, do tracker and pings */
|
||||
if( $publish )
|
||||
{
|
||||
$this->blogTracker( $entry_id, $this->entry['entry_name'], $this->entry['entry'] );
|
||||
$this->blogPings ( $entry_id, $this->entry );
|
||||
}
|
||||
|
||||
/* Update Blog Stats */
|
||||
$r = $this->registry->cache()->getCache( 'blog_stats' );
|
||||
|
||||
$r['blog_stats']['stats_num_entries']++;
|
||||
$this->registry->cache()->setCache( 'blog_stats', $r, array( 'array' => 1, 'donow' => 1 ) );
|
||||
|
||||
$this->classApiServer->apiSendReply( $entry_id );
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::editPost()
|
||||
*
|
||||
* Edit the entry.
|
||||
*
|
||||
* @access public
|
||||
* @param int $postid Entry ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @param string $content Post content
|
||||
* @param bool $publish Publish?
|
||||
* @return string xml
|
||||
**/
|
||||
public function editPost( $postid, $username, $password, $content, $publish )
|
||||
{
|
||||
/* Authenticate request */
|
||||
if( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
/* Query the entry */
|
||||
$entry = $this->DB->buildAndFetch( array(
|
||||
'select' => '*',
|
||||
'from' => 'blog_entries',
|
||||
'where' => 'entry_id = ' . intval( $postid )
|
||||
) );
|
||||
|
||||
/* Make sure we have an entry */
|
||||
if( ! $entry['entry_id'] )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, sprintf( $this->registry->class_localization->words['blogger_error_2'], intval( $postid ) ) );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Compile the post */
|
||||
if ( ! $this->_compilePost( $content, $publish ) )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Setup the new entry data */
|
||||
$this->entry['blog_id'] = $entry['blog_id'];
|
||||
$this->entry['entry_author_id'] = $entry['entry_author_id'];
|
||||
$this->entry['entry_author_name'] = $entry['entry_author_name'];
|
||||
$this->entry['entry_date'] = $entry['entry_date'];
|
||||
$this->entry['entry_last_update'] = $entry['entry_last_update'];
|
||||
$this->entry['entry_edit_time'] = time();
|
||||
$this->entry['entry_edit_name'] = $this->memberData['members_display_name'];
|
||||
$this->entry['entry_poll_state'] = $entry['entry_poll_state'];
|
||||
|
||||
/* Update the entry */
|
||||
$this->DB->update( 'blog_entries', $this->entry, 'entry_id='.$entry['entry_id'] );
|
||||
|
||||
/* Rebuild the blog */
|
||||
$this->registry->blog_std->rebuildBlog ( $this->blog['blog_id'] );
|
||||
|
||||
/* Send Response */
|
||||
$this->classApiServer->apiSendReply();
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::getPost()
|
||||
*
|
||||
* Get an entry.
|
||||
*
|
||||
* @access public
|
||||
* @param int $postid Entry ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @return string xml
|
||||
**/
|
||||
public function getPost( $postid, $username, $password )
|
||||
{
|
||||
/* Authenticate the request */
|
||||
if( $this->_authenticate( $username, $password ) )
|
||||
{
|
||||
/* Query the blog entry */
|
||||
$entry = $this->DB->buildAndFetch( array(
|
||||
'select' => 'e.*',
|
||||
'from' => array( 'blog_entries' => 'e' ),
|
||||
'where' => 'e.entry_id = ' . intval( $postid ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'm.member_group_id, m.mgroup_others',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=e.entry_author_id',
|
||||
'type' => 'left'
|
||||
)
|
||||
)
|
||||
) );
|
||||
|
||||
/* Make sure we found an entry */
|
||||
if( ! $entry['entry_id'] )
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, sprintf( $this->registry->class_localization->words['blogger_error_2'], intval($postid) ) );
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Tags */
|
||||
$this->DB->build( array( 'select' => 'tag', 'from' => 'tags_index', 'where' => "app='blog' AND type_id={$entry['entry_id']} AND type_id_2={$entry['blog_id']}" ) );
|
||||
$this->DB->execute();
|
||||
|
||||
$tags = array();
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$tags[] = $r['tag'];
|
||||
}
|
||||
|
||||
/* Setup the parser */
|
||||
IPSText::getTextClass('parser')->parse_html = $entry['entry_html_state'] ? 1 : 0;
|
||||
IPSText::getTextClass('parser')->parse_wordwrap = $this->settings['post_wordwrap'];
|
||||
IPSText::getTextClass('parser')->parse_nl2br = $entry['entry_html_state'] == 2 ? 1 : 0;
|
||||
IPSText::getTextClass('parser')->parse_smilies = $entry['entry_use_emo'] ? 1: 0;
|
||||
IPSText::getTextClass('parser')->parsing_section = 'blog_entry';
|
||||
IPSText::getTextClass('parser')->parsing_mgroup = $entry['member_group_id'];
|
||||
IPSText::getTextClass('parser')->parsing_mgroup_others = $entry['member_group_id'];
|
||||
|
||||
/* Parse the entry */
|
||||
$entry['entry'] = IPSText::getTextClass('parser')->preDisplayParse( $entry['entry'] );
|
||||
|
||||
/* Build the return array */
|
||||
$return_array = array(
|
||||
'postid' => $entry['entry_id'],
|
||||
'dateCreated' => gmdate("Ymd\TH:i:s",$entry['entry_date']),
|
||||
'title' => $entry['entry_name'],
|
||||
'description' => $entry['entry'],
|
||||
'categories' => $tags
|
||||
);
|
||||
|
||||
$force_array = array( 'dateCreated' => 'dateTime.iso8601' );
|
||||
|
||||
/* Send Post */
|
||||
$this->classApiServer->apiSendReply( $return_array, 0, $force_array );
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->classApiServer->apiSendError( 100, $this->error );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLRPC_server::newMediaObject()
|
||||
*
|
||||
* Post a new entry.
|
||||
*
|
||||
* @access public
|
||||
* @param int $blogid Blog ID
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @param array $file Uploaded file details
|
||||
* @return string xml
|
||||
**/
|
||||
public function newMediaObject( $blogid, $username, $password, $file )
|
||||
{
|
||||
/* We don't support this yet, just send a response */
|
||||
$this->classApiServer->apiSendReply();
|
||||
}
|
||||
|
||||
/**
|
||||
* _authenticate()
|
||||
*
|
||||
* Authenticates the username and password
|
||||
*
|
||||
* This will return
|
||||
* - false (Failed)
|
||||
* - true (Succes)
|
||||
*
|
||||
* @access private
|
||||
* @param string $username Username
|
||||
* @param string $password Password
|
||||
* @return boolean
|
||||
**/
|
||||
private function _authenticate( $username, $password )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Are they banned?
|
||||
//-----------------------------------------
|
||||
if ( is_array( $this->caches['banfilters'] ) and count( $this->caches['banfilters'] ) )
|
||||
{
|
||||
foreach ($this->caches['banfilters'] as $ip)
|
||||
{
|
||||
$ip = str_replace( '\*', '.*', preg_quote($ip, "/") );
|
||||
|
||||
if ( preg_match( "/^$ip$/", $this->member->ip_address ) )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_banned_msg'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// load the member
|
||||
//-----------------------------------------
|
||||
$member = IPSMember::load( IPSText::parseCleanValue( $username ), 'extendedProfile', 'username' );
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_unknown_user'];
|
||||
return false;
|
||||
}
|
||||
|
||||
ips_MemberRegistry::setMember( $member['member_id'] );
|
||||
|
||||
//--------------------------------
|
||||
// Is the board offline?
|
||||
//--------------------------------
|
||||
|
||||
if ($this->settings['board_offline'] == 1)
|
||||
{
|
||||
if ($member['g_access_offline'] != 1)
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_board_offline'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Temporarely banned?
|
||||
//-----------------------------------------
|
||||
if ( $member['temp_ban'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_suspended'];
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load the Blog
|
||||
//-----------------------------------------
|
||||
$this->registry->blog_std->buildPerms();
|
||||
|
||||
//-----------------------------------------
|
||||
// Users can have more than one blog - just
|
||||
// grab first one mysql returns
|
||||
//-----------------------------------------
|
||||
|
||||
$blog = $this->DB->buildAndFetch( array(
|
||||
'select' => 'blog_id, blog_name',
|
||||
'from' => 'blog_blogs',
|
||||
'where' => "member_id={$member['member_id']}"
|
||||
) );
|
||||
|
||||
if ( ! $blog['blog_id'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_noblog'];
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $this->blog = $this->registry->blog_std->loadBlog( $blog['blog_id'], 1 ) )
|
||||
{
|
||||
$this->error = $this->blog_std->error;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Blog post permissions?
|
||||
//-----------------------------------------
|
||||
if ( !$this->blog['allow_entry'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_nopost'];
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Validate password?
|
||||
//-----------------------------------------
|
||||
if ( !$this->settings['blog_allow_xmlrpc'] or !$this->blog['blog_settings']['enable_xmlrpc'] )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_noxmlrpc'];
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $this->blog['blog_settings']['xmlrpc_password'] != md5( IPSText::parseCleanValue( $password ) ) )
|
||||
{
|
||||
if ( isset( $this->blog['blog_settings']['xmlrpc_failedattempts'] ) && $this->blog['blog_settings']['xmlrpc_failedattempts'] > 5 )
|
||||
{
|
||||
$this->blog['blog_settings']['enable_xmlrpc'] = 0;
|
||||
$this->blog['blog_settings']['xmlrpc_failedattempts'] = 0;
|
||||
$blog_settings = serialize ( $this->blog['blog_settings'] );
|
||||
$this->DB->update( 'blog_blogs', array( 'blog_settings' => $blog_settings ), "blog_id = {$this->blog['blog_id']}" );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->blog['blog_settings']['xmlrpc_failedattempts'] = isset( $this->blog['blog_settings']['xmlrpc_failedattempts'] ) ? intval($this->blog['blog_settings']['xmlrpc_failedattempts'])+1 : 1;
|
||||
$blog_settings = serialize ( $this->blog['blog_settings'] );
|
||||
$this->DB->update( 'blog_blogs', array( 'blog_settings' => $blog_settings ), "blog_id = {$this->blog['blog_id']}" );
|
||||
}
|
||||
$this->error = $this->registry->class_localization->words['blogger_inv_pass'];
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isset( $this->blog['blog_settings']['xmlrpc_failedattempts'] ) && $this->blog['blog_settings']['xmlrpc_failedattempts'] > 0 )
|
||||
{
|
||||
$this->blog['blog_settings']['xmlrpc_failedattempts'] = 0;
|
||||
$blog_settings = serialize ( $this->blog['blog_settings'] );
|
||||
$this->DB->update( 'blog_blogs', array( 'blog_settings' => $blog_settings ), "blog_id = {$this->blog['blog_id']}" );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set the member data
|
||||
//-----------------------------------------
|
||||
|
||||
$this->memberData = $member;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* _compilePost()
|
||||
*
|
||||
* Compiles a blog entry for inserting to the database
|
||||
*
|
||||
* @access private
|
||||
* @param array $content
|
||||
* @param bool $password
|
||||
* @return bool
|
||||
**/
|
||||
private function _compilePost( $content, $publish )
|
||||
{
|
||||
/* Set a default max post length, if we don't have one */
|
||||
$this->settings['blog_max_entry_length'] = $this->settings['blog_max_entry_length'] ? $this->settings['blog_max_entry_length'] : 2140000;
|
||||
|
||||
/* Check to make sure we have text for this entry */
|
||||
if( strlen( trim( IPSText::br2nl( $content['description'] ) ) ) < 1 )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_emptypost'];
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Check to make sure that the entry is not too long */
|
||||
if( strlen( $content['description'] ) > ( $this->settings['blog_max_entry_length'] * 1024 ) )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_toolong'];
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Check the title */
|
||||
$title = $this->pfCleanTopicTitle( $content['title'] );
|
||||
$title = IPSText::getTextClass( 'bbcode' )->stripBadWords( $title );
|
||||
|
||||
if( ! $title )
|
||||
{
|
||||
$this->error = $this->registry->class_localization->words['blogger_notitle'];
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Setup the parser */
|
||||
IPSText::getTextClass('parser')->parse_smilies = 1;
|
||||
IPSText::getTextClass('parser')->parse_html = 0;
|
||||
IPSText::getTextClass('parser')->parse_bbcode = 1;
|
||||
IPSText::getTextClass('parser')->parsing_section = 'blog_entry';
|
||||
|
||||
/* Cleanup and parse the entry */
|
||||
$description = preg_replace( "#<br />(\r)?\n#is", "<br />", $content['description'] );
|
||||
|
||||
/* Time */
|
||||
$dte = time();
|
||||
|
||||
/* Set the entry */
|
||||
$this->entry = array(
|
||||
'blog_id' => $this->blog['blog_id'],
|
||||
'entry_author_id' => $this->memberData['member_id'],
|
||||
'entry_author_name' => $this->memberData['members_display_name'],
|
||||
'entry_date' => $dte,
|
||||
'entry_name' => $title,
|
||||
'entry' => IPSText::getTextClass('bbcode')->preDbParse( $description ),
|
||||
'entry_status' => ($publish ? 'published' : 'draft'),
|
||||
'entry_post_key' => md5(microtime()),
|
||||
'entry_html_state' => 0,
|
||||
'entry_use_emo' => 1,
|
||||
'entry_last_update' => $dte,
|
||||
'entry_gallery_album' => 0,
|
||||
'entry_poll_state' => 0,
|
||||
);
|
||||
|
||||
/* Check for parser errors */
|
||||
$testParse = IPSText::getTextClass('parser')->preDisplayParse( $description );
|
||||
|
||||
/* Set any parser errors */
|
||||
if( is_array( IPSText::getTextClass('parser')->error ) && count( IPSText::getTextClass('parser')->error ) > 0 )
|
||||
{
|
||||
$this->error = implode( " : ", IPSText::getTextClass('parser')->error );
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean topic title
|
||||
*
|
||||
* @param string $title
|
||||
* @return string
|
||||
**/
|
||||
public function pfCleanTopicTitle($title="")
|
||||
{
|
||||
if( $this->settings['etfilter_shout'] )
|
||||
{
|
||||
if( function_exists('mb_convert_case') )
|
||||
{
|
||||
if( in_array( strtolower( $this->settings['gb_char_set'] ), array_map( 'strtolower', mb_list_encodings() ) ) )
|
||||
{
|
||||
$title = mb_convert_case( $title, MB_CASE_TITLE, $this->settings['gb_char_set'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = ucwords( strtolower($title) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = ucwords( strtolower($title) );
|
||||
}
|
||||
}
|
||||
|
||||
$title = IPSText::parseCleanValue( $title );
|
||||
|
||||
if( $this->settings['etfilter_punct'] )
|
||||
{
|
||||
$title = preg_replace( "/\?{1,}/" , "?" , $title );
|
||||
$title = preg_replace( "/(!){1,}/" , "!", $title );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// The DB column is 250 chars, so we need to do true mb_strcut, then fix broken HTML entities
|
||||
// This should be fine, as DB would do it regardless (cept we can fix the entities)
|
||||
//-----------------------------------------
|
||||
|
||||
$title = preg_replace( "/&(#{0,}([a-zA-Z0-9]+?)?)?$/", '', IPSText::mbsubstr( $title, 0, 250 ) );
|
||||
|
||||
$title = IPSText::stripAttachTag( $title );
|
||||
$title = str_replace( "<br />", "", $title );
|
||||
$title = trim( $title );
|
||||
|
||||
//$title = IPSText::getTextClass( 'bbcode' )->stripBadWords( $title );
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Blog tracker
|
||||
*
|
||||
* @param integer $entry_id
|
||||
* @param string $entry_name
|
||||
* @param string $entry
|
||||
* @return bool
|
||||
**/
|
||||
public function blogTracker( $entry_id="", $entry_name="", $entry="" )
|
||||
{
|
||||
if( $entry_id == "" )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// We will send these out immediatly (if published)
|
||||
//-----------------------------------------
|
||||
|
||||
$count = 0;
|
||||
$gotem = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'bt.tracker_id',
|
||||
'from' => array( 'blog_tracker' => 'bt' ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'm.name, m.email, m.member_id, m.language, m.last_activity, m.members_display_name, m.member_group_id, m.mgroup_others',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "bt.member_id=m.member_id AND m.member_id <> {$this->memberData['member_id']}",
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'p.perm_type_id as auth_blog_id',
|
||||
'from' => array( 'permission_index' => 'p' ),
|
||||
'where' => "p.perm_type='blog' AND p.perm_type_id=bt.blog_id AND p.authorized_users LIKE '%,{$this->memberData['member_id']},%'",
|
||||
'type' => 'left'
|
||||
)
|
||||
),
|
||||
'where' => 'bt.blog_id=' . intval( $this->blog['blog_id'] ) . ' AND m.member_id IS NOT NULL'
|
||||
) );
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$gotem[ $r['member_id'] ] = $r;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Row, row and parse, parse
|
||||
//-----------------------------------------
|
||||
|
||||
if( count( $gotem ) )
|
||||
{
|
||||
/* Load teh blog templates */
|
||||
$this->lang->loadLanguageFile( array( 'public_emails' ), 'blog' );
|
||||
|
||||
foreach( $gotem as $r )
|
||||
{
|
||||
if( $this->blog['blog_view_level'] == 'private' || $this->blog['blog_settings']['category_cache'][$this->entry['category_id']]['category_type'] != 'public' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Mod?
|
||||
//-----------------------------------------
|
||||
$mod_canviewprivate = 0;
|
||||
if( count( $this->caches['blogmods'] ) )
|
||||
{
|
||||
$mgroups = explode( ',', $r['mgroup_others'] );
|
||||
foreach( $this->caches['blogmods'] as $i => $m )
|
||||
{
|
||||
if( ( $m['moderate_mg_id'] == $r['member_id'] && $m['moderate_type'] == 'member' ) or
|
||||
( $m['moderate_mg_id'] == $r['member_group_id'] && $m['moderate_type'] == 'group' ) or
|
||||
( in_array($m['moderate_mg_id'], $mgroups) && $m['moderate_type'] == 'group' ) )
|
||||
{
|
||||
$mod_canviewprivate = $m['moderate_can_view_private'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $this->blog['blog_view_level'] == 'private' && $r['member_id'] != $this->blog['member_id'] && $this->blog['blog_id'] != $r['auth_blog_id'] && ! $mod_canviewprivate )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $this->blog['blog_view_level'] == 'privateclub' && $r['member_id'] != $this->blog['member_id'] && $this->blog['blog_id'] != $r['auth_blog_id'] && ! $mod_canviewprivate )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$r['language'] = $r['language'] ? $r['language'] : 'en';
|
||||
|
||||
IPSText::getTextClass('email')->getTemplate( 'subs_new_entry' );
|
||||
|
||||
IPSText::getTextClass('email')->buildMessage( array(
|
||||
'BLOG_ID' => $this->blog['blog_id'],
|
||||
'BLOG_NAME' => $this->blog['blog_name'],
|
||||
'ENTRY_ID' => $entry_id,
|
||||
'ENTRY_NAME' => $entry_name,
|
||||
'NAME' => $r['members_display_name'],
|
||||
'POSTER' => $this->memberData['members_display_name'],
|
||||
'ENTRY' => $entry,
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// If it is published, mail now, else put it in the tracker queue
|
||||
//-----------------------------------------
|
||||
if( $this->entry['entry_status'] == 'published' )
|
||||
{
|
||||
$this->DB->insert( 'mail_queue', array( 'mail_to' => $r['email'], 'mail_from' => '', 'mail_date' => time(), 'mail_subject' => $this->lang->words['bt_subject'], 'mail_content' => IPSText::getTextClass('email')->message ) );
|
||||
$count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->insert( 'blog_tracker_queue', array( 'blog_id' => $this->blog['blog_id'], 'entry_id' => $entry_id, 'tq_to' => $r['email'], 'tq_subject' => $this->lang->words['bt_subject'], 'tq_content' => IPSText::getTextClass('email')->message ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $count > 0 )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Update cache with remaning email count
|
||||
//-----------------------------------------
|
||||
$cache = $this->caches['systemvars'];
|
||||
$cache['mail_queue'] += $count;
|
||||
$this->cache->setCache( 'systemvars', $cache, array( 'array' => 1 ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ping-e-dee-doo
|
||||
*
|
||||
* @param integer $entry_id
|
||||
* @param array $entry
|
||||
* @return void
|
||||
**/
|
||||
public function blogPings( $entry_id, $entry )
|
||||
{
|
||||
if ( $this->settings['blog_allow_pingblogs'] && is_array( $this->blog['blog_settings']['pings'] ) && count( $this->blog['blog_settings']['pings'] ) > 0 )
|
||||
{
|
||||
$ping_added = 0;
|
||||
foreach( $this->blog['blog_settings']['pings'] as $service => $enabled )
|
||||
{
|
||||
if( $enabled )
|
||||
{
|
||||
$updateping['ping_active'] = ( $entry['entry_status']=='published' ? 1 : 0 );
|
||||
$updateping['ping_time'] = time();
|
||||
$updateping['blog_id'] = $this->blog['blog_id'];
|
||||
$updateping['entry_id'] = $entry_id;
|
||||
$updateping['ping_service'] = $service;
|
||||
$this->DB->insert( 'blog_updatepings', $updateping );
|
||||
$ping_added = $updateping['ping_active'] ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
if( $ping_added )
|
||||
{
|
||||
// activate task
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/class_taskmanager.php' );
|
||||
$task = new class_taskmanager( $this->registry );
|
||||
|
||||
$this_task = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_key='blogpings'" ) );
|
||||
$newdate = $task->generateNextRun($this_task);
|
||||
$this->DB->update( 'task_manager', array( 'task_next_run' => $newdate, 'task_enabled' => 1 ), "task_id=".$this_task['task_id'] );
|
||||
$task->saveNextRunStamp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> 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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Blog XMLRPC Interface
|
||||
* Last Updated: $Date: 2009-09-18 17:37:08 -0400 (Fri, 18 Sep 2009) $
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package IP.Blog
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Revision: 5131 $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
/**
|
||||
* Matches IP address of requesting API
|
||||
* Set to 0 to not match with IP address
|
||||
*/
|
||||
define( 'CVG_IP_MATCH', 1 );
|
||||
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
define( 'IPS_CLASS_PATH', IPS_ROOT_PATH . 'sources/classes/' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up cookie stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
IPSCookie::$sensitive_cookies = array( 'session_id', 'ipb_admin_session_id', 'member_id', 'pass_hash' );
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$registry->DB()->obj['use_shutdown'] = 0;
|
||||
|
||||
//--------------------------------
|
||||
// Set debug mode
|
||||
//--------------------------------
|
||||
|
||||
$registry->DB()->setDebugMode( ipsRegistry::$settings['sql_debug'] == 1 ? intval($_GET['debug']) : 0 );
|
||||
|
||||
//===========================================================================
|
||||
// Create the XML-RPC Server
|
||||
//===========================================================================
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classApiServer.php' );
|
||||
$server = new classApiServer();
|
||||
$api = $server->decodeRequest();
|
||||
|
||||
//===========================================================================
|
||||
// Define Service
|
||||
//===========================================================================
|
||||
|
||||
$valid_api = 0;
|
||||
|
||||
switch( $api )
|
||||
{
|
||||
case 'blogger':
|
||||
$valid_api = 1;
|
||||
break;
|
||||
|
||||
case 'wp':
|
||||
case 'metaWeblog':
|
||||
$api = 'metaWeblog';
|
||||
$valid_api = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if( $valid_api )
|
||||
{
|
||||
require_once( DOC_IPS_ROOT_PATH . 'interface/blog/apis/server_' . strtolower( $api ) . '.php' );
|
||||
|
||||
$webservice = new xmlrpc_server( $registry );
|
||||
$webservice->classApiServer =& $server;
|
||||
|
||||
$server->addObjectMap( $webservice, 'UTF-8' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Process....
|
||||
//-----------------------------------------
|
||||
$server->getXmlRpc();
|
||||
}
|
||||
else
|
||||
{
|
||||
$server->apiSendError( 100, "Requested API not found" );
|
||||
}
|
||||
|
||||
exit;
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Last Updated: $Date$
|
||||
*
|
||||
* @author $Author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev$
|
||||
*
|
||||
*/
|
||||
//-----------------------------------------
|
||||
// Get stuff we need
|
||||
//-----------------------------------------
|
||||
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
$id = intval(ipsRegistry::$request['id']);
|
||||
$member = IPSMember::load( $id );
|
||||
$avatar = IPSMember::buildAvatar( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Print avatar
|
||||
//-----------------------------------------
|
||||
|
||||
print <<<HTML
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
</head>
|
||||
<body>{$avatar}</body>
|
||||
</html>
|
||||
HTML;
|
||||
|
||||
exit;
|
||||
@@ -1,46 +1,25 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-02-01 18:16:26 +0000 (Wed, 01 Feb 2006) $
|
||||
| > $Revision: 132 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > CONVERGE Wrapper script
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: 6th March 2006
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main executable wrapper.
|
||||
*
|
||||
* Set-up and load module to run
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
*/
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Remote API integration gateway file
|
||||
* Last Updated: $Date: 2009-07-23 21:54:32 -0400 (Thu, 23 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4933 $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
/**
|
||||
@@ -49,77 +28,41 @@ define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
*/
|
||||
define( 'CVG_IP_MATCH', 1 );
|
||||
|
||||
require_once( '../../init.php' );
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
$INFO = array();
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
//--------------------------------
|
||||
// Load our classes
|
||||
//--------------------------------
|
||||
//-----------------------------------------
|
||||
// Set up cookie stuff
|
||||
//-----------------------------------------
|
||||
|
||||
require_once ROOT_PATH . "sources/ipsclass.php";
|
||||
require_once KERNEL_PATH . "class_converge.php";
|
||||
require_once ROOT_PATH . "conf_global.php";
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
# Initiate super-class
|
||||
$ipsclass = new ipsclass();
|
||||
$ipsclass->vars = $INFO;
|
||||
|
||||
//--------------------------------
|
||||
// The clocks a' tickin'
|
||||
//--------------------------------
|
||||
|
||||
$Debug = new Debug;
|
||||
$Debug->startTimer();
|
||||
|
||||
//--------------------------------
|
||||
// Load the DB driver and such
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->init_db_connection();
|
||||
|
||||
# Turn off shutdown
|
||||
$ipsclass->DB->obj['use_shutdown'] = 0;
|
||||
IPSCookie::$sensitive_cookies = array( 'session_id', 'ipb_admin_session_id', 'member_id', 'pass_hash' );
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->parse_incoming();
|
||||
$registry->DB()->obj['use_shutdown'] = 0;
|
||||
|
||||
//--------------------------------
|
||||
// Set converge
|
||||
// Set debug mode
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->converge = new class_converge( $ipsclass->DB );
|
||||
|
||||
//--------------------------------
|
||||
// Start off the cache array
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->cache_array = array('badwords','emoticons','attachtypes','bbcode', 'multimod','ranks','profilefields','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages' );
|
||||
|
||||
//===========================================================================
|
||||
// Get cache...
|
||||
//===========================================================================
|
||||
|
||||
$ipsclass->init_load_cache( $ipsclass->cache_array );
|
||||
$registry->DB()->setDebugMode( ipsRegistry::$settings['sql_debug'] == 1 ? intval($_GET['debug']) : 0 );
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the FUNC
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->initiate_ipsclass();
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the FUNC
|
||||
//--------------------------------
|
||||
|
||||
if ( ! $ipsclass->vars['xmlrpc_enable'] )
|
||||
if ( ! ipsRegistry::$settings['xmlrpc_enable'] )
|
||||
{
|
||||
@header( "Content-type: text/xml" );
|
||||
print"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
@@ -136,7 +79,7 @@ if ( ! $ipsclass->vars['xmlrpc_enable'] )
|
||||
<member>
|
||||
<name>faultString</name>
|
||||
<value>
|
||||
<string>IP.Board's XML-RPC API system is not enabled. Log into your IP.Board ACP and visit: Tools & Settings -> XML-RPC API and update "Enable XML-RPC API System"</string>
|
||||
<string>IP.Board's XML-RPC API system is not enabled. Log into your IP.Board ACP and visit: System -> System Settings -> Advanced -> XML-RPC API and update "Enable XML-RPC API System"</string>
|
||||
</value>
|
||||
</member>
|
||||
</struct>
|
||||
@@ -150,34 +93,33 @@ if ( ! $ipsclass->vars['xmlrpc_enable'] )
|
||||
// Define Service
|
||||
//===========================================================================
|
||||
|
||||
require_once( KERNEL_PATH . 'class_api_server.php' );
|
||||
require_once( IPS_KERNEL_PATH . 'classApiServer.php' );
|
||||
|
||||
//===========================================================================
|
||||
// Create the XML-RPC Server
|
||||
//===========================================================================
|
||||
|
||||
$server = new class_api_server();
|
||||
$api = $server->decode_request();
|
||||
$server = new classApiServer();
|
||||
$api = $server->decodeRequest();
|
||||
$module = $server->params['api_module'];
|
||||
$user = $ipsclass->txt_md5_clean( $server->params['api_key']);
|
||||
$user = IPSText::md5Clean( $server->params['api_key']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Check for module
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $module AND file_exists( ROOT_PATH . 'interface/board/modules/' . $module . '/api.php' ) )
|
||||
if ( $module AND file_exists( DOC_IPS_ROOT_PATH . 'interface/board/modules/' . $module . '/api.php' ) )
|
||||
{
|
||||
require_once( ROOT_PATH . 'interface/board/modules/' . $module . '/api.php' );
|
||||
require_once( DOC_IPS_ROOT_PATH . 'interface/board/modules/' . $module . '/api.php' );
|
||||
|
||||
$webservice = new API_Server( $ipsclass );
|
||||
$webservice->class_api_server =& $server;
|
||||
$webservice = new API_Server( $registry );
|
||||
$webservice->classApiServer =& $server;
|
||||
}
|
||||
else
|
||||
{
|
||||
$server->api_send_reply( array( 'faultCode' => '2',
|
||||
'faultString' => "IP.Board could not locate an API module called '{$module}'" ) );
|
||||
$server->apiSendError( '2', "IP.Board could not locate an API module called '{$module}'" );
|
||||
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
$registry->DB()->insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
@@ -191,34 +133,32 @@ else
|
||||
|
||||
if ( $user )
|
||||
{
|
||||
$webservice->api_user = $ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
$webservice->api_user = $registry->DB()->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'api_users',
|
||||
'where' => "api_user_key='" . $user . "'" ) );
|
||||
|
||||
if ( ! $webservice->api_user['api_user_id'] )
|
||||
{
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
$registry->DB()->insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
'api_log_allowed' => 0 ) );
|
||||
|
||||
$server->api_send_reply( array( 'faultCode' => '3',
|
||||
'faultString' => "IP.Board could not locate a valid API user with that API key" ) );
|
||||
$server->apiSendError( '3', "IP.Board could not locate a valid API user with that API key" );
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
$registry->DB()->insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
'api_log_allowed' => 0 ) );
|
||||
|
||||
$server->api_send_reply( array( 'faultCode' => '4',
|
||||
'faultString' => "No API Key was sent in the request" ) );
|
||||
$server->apiSendError( '4', "No API Key was sent in the request" );
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -230,14 +170,13 @@ if ( $webservice->api_user['api_user_ip'] )
|
||||
{
|
||||
if ( $_SERVER['REMOTE_ADDR'] != $webservice->api_user['api_user_ip'] )
|
||||
{
|
||||
$ipsclass->DB->do_insert( 'api_log', array( 'api_log_key' => $user,
|
||||
$registry->DB()->insert( 'api_log', array( 'api_log_key' => $user,
|
||||
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'api_log_date' => time(),
|
||||
'api_log_query' => $server->raw_request,
|
||||
'api_log_allowed' => 0 ) );
|
||||
|
||||
$server->api_send_reply( array( 'faultCode' => '5',
|
||||
'faultString' => "Incorrect IP Address ({$_SERVER['REMOTE_ADDR']}). You must update the API User Key with that IP Address." ) );
|
||||
$server->apiSendError( '5', "Incorrect IP Address ({$_SERVER['REMOTE_ADDR']}). You must update the API User Key with that IP Address." );
|
||||
|
||||
exit();
|
||||
}
|
||||
@@ -247,15 +186,12 @@ if ( $webservice->api_user['api_user_ip'] )
|
||||
// Add web service
|
||||
//-----------------------------------------
|
||||
|
||||
$server->add_object_map( $webservice, 'UTF-8' );
|
||||
$server->addObjectMap( $webservice, IPS_DOC_CHAR_SET );
|
||||
|
||||
//-----------------------------------------
|
||||
// Process....
|
||||
//-----------------------------------------
|
||||
|
||||
$server->get_xml_rpc();
|
||||
$server->getXmlRpc();
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
?>
|
||||
exit;
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Remote API integration gateway file
|
||||
* Last Updated: $Date: 2009-07-23 21:54:55 -0400 (Thu, 23 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4933 $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
define( 'IPS_PUBLIC_SCRIPT', 'index.php' );
|
||||
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
$_GET['app'] = 'core';
|
||||
$_REQUEST['app'] = 'core';
|
||||
$_GET['module'] = 'global';
|
||||
$_GET['section'] = 'login';
|
||||
$_GET['do'] = 'process';
|
||||
|
||||
ipsController::run();
|
||||
|
||||
exit();
|
||||
@@ -0,0 +1 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> 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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,31 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+---------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2007 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Id$
|
||||
| > $Revision: 102 $
|
||||
| > $Date: 2005-12-22 10:14:15 +0000 (Thu, 22 Dec 2005) $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > CONFIGURATION FILE: IPB
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: Monday 25th June 2007 (14:14)
|
||||
|
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Remote API Server configuration
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
*
|
||||
*/
|
||||
|
||||
$CONFIG['api_module_title'] = 'IP.Board';
|
||||
$CONFIG['api_module_desc'] = 'API methods for interfacing with IP.Board';
|
||||
$CONFIG['api_module_key'] = 'ipb';
|
||||
|
||||
?>
|
||||
@@ -1 +1 @@
|
||||
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> 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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
@@ -1,28 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+---------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2006 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Id$
|
||||
| > $Revision: 102 $
|
||||
| > $Date: 2005-12-22 10:14:15 +0000 (Thu, 22 Dec 2005) $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > ALLOWED METHODS FILE: IPB
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: Monday 25th June 2007 (14:24)
|
||||
|
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Defines the allowed methods a remote server may request and the in/out parameters
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3887 $
|
||||
*
|
||||
*/
|
||||
|
||||
$ALLOWED_METHODS = array();
|
||||
|
||||
@@ -148,7 +139,4 @@ $ALLOWED_METHODS['helloBoard'] = array(
|
||||
'out' => array(
|
||||
'response' => 'xmlrpc'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
);
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 720 B |
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Main public executable wrapper.
|
||||
* Set-up and load module to run
|
||||
* Last Updated: $Date: 2009-07-08 21:23:44 -0400 (Wed, 08 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2008 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4856 $
|
||||
*
|
||||
*/
|
||||
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
require_once( '../../initdata.php' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
$registry = ipsRegistry::instance();
|
||||
$registry->init();
|
||||
|
||||
IPSDebug::addLogMessage( 'fbc', 'fbc', $_POST );
|
||||
|
||||
//require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
|
||||
|
||||
//ipsController::run();
|
||||
|
||||
exit();
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
// cache the xd_receiver
|
||||
header('Cache-Control: max-age=225065900');
|
||||
header('Expires:');
|
||||
header('Pragma:');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head>
|
||||
<title>cross domain receiver page</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--
|
||||
This is a cross domain (XD) receiver page. It needs to be placed on your domain so that the Javascript
|
||||
library can communicate within the iframe permission model. Put it here:
|
||||
|
||||
http://www.example.com/xd_receiver.php
|
||||
-->
|
||||
<script
|
||||
src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js"
|
||||
type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
// cache the xd_receiver
|
||||
header('Cache-Control: max-age=225065900');
|
||||
header('Expires:');
|
||||
header('Pragma:');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head>
|
||||
<title>cross domain receiver page</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--
|
||||
This is a cross domain (XD) receiver page. It needs to be placed on your domain so that the Javascript
|
||||
library can communicate within the iframe permission model. Put it here:
|
||||
|
||||
http://www.example.com/xd_receiver.php
|
||||
-->
|
||||
<script
|
||||
src="https://ssl.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js"
|
||||
type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> 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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
Reference in new issue
Block a user