Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -2,9 +2,9 @@
|
||||
|
||||
/**
|
||||
* @brief Converter XenForo Media Gallery Class
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @package Invision Community
|
||||
* @subpackage Converter
|
||||
* @since 21 Jan 2015
|
||||
*/
|
||||
@@ -157,6 +157,24 @@ class _Xenforo extends \IPS\convert\Software
|
||||
'field_hint' => \IPS\Member::loggedIn()->language()->addToStack('convert_xf_gal_path'),
|
||||
'field_validation' => function( $value ) { if ( !@is_dir( $value ) ) { throw new \DomainException( 'path_invalid' ); } },
|
||||
);
|
||||
|
||||
/* Get our reactions to let the admin map them */
|
||||
$options = array();
|
||||
$descriptions = array();
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_reactions' ), 'IPS\Content\Reaction' ) AS $reaction )
|
||||
{
|
||||
$options[ $reaction->id ] = $reaction->_icon->url;
|
||||
$descriptions[ $reaction->id ] = \IPS\Member::loggedIn()->language()->addToStack('reaction_title_' . $reaction->id ) . '<br>' . $reaction->_description;
|
||||
}
|
||||
|
||||
$return['convertGalleryImages']['rep_like'] = array(
|
||||
'field_class' => 'IPS\\Helpers\\Form\\Radio',
|
||||
'field_default' => NULL,
|
||||
'field_required' => TRUE,
|
||||
'field_extra' => array( 'parse' => 'image', 'options' => $options, 'descriptions' => $descriptions ),
|
||||
'field_hint' => NULL,
|
||||
'field_validation' => NULL,
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -433,7 +451,7 @@ class _Xenforo extends \IPS\convert\Software
|
||||
|
||||
try
|
||||
{
|
||||
$em = \IPS\Text\Parser::embeddableMedia( $row['media_embed_url'] );
|
||||
$em = \IPS\Text\Parser::embeddableMedia( \IPS\Http\Url::createFromString( $row['media_embed_url'] ) );
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
@@ -495,6 +513,8 @@ class _Xenforo extends \IPS\convert\Software
|
||||
'type_id' => $row['media_id'],
|
||||
'member_id' => $like['user_id'],
|
||||
'member_received' => $row['user_id'],
|
||||
'reaction' => $this->app->_session['more_info']['convertGalleryImages']['rep_like'],
|
||||
'rep_date' => $row['media_date']
|
||||
) );
|
||||
}
|
||||
}
|
||||
@@ -613,6 +633,8 @@ class _Xenforo extends \IPS\convert\Software
|
||||
'type_id' => $row['comment_id'],
|
||||
'member_id' => $like['user_id'],
|
||||
'member_received' => $row['user_id'],
|
||||
'reaction' => $this->app->_session['more_info']['convertGalleryImages']['rep_like'],
|
||||
'rep_date' => $row['comment_date']
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user