Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -45,9 +45,10 @@ class _Internal extends PromoteAbstract
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @param string|NULL $serviceId Specific page/group ID
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getName( $serviceId=NULL )
|
||||
{
|
||||
return \IPS\Settings::i()->board_name;
|
||||
}
|
||||
@@ -63,10 +64,37 @@ class _Internal extends PromoteAbstract
|
||||
*/
|
||||
public function form( $text, $link=null, $content=null )
|
||||
{
|
||||
return array( new \IPS\Helpers\Form\TextArea( 'promote_social_content_internal', $content ?: $text, FALSE, array( 'maxLength' => 3000, 'rows' => 6 ) ) );
|
||||
$title = NULL;
|
||||
if ( $this->promote and $this->promote->id )
|
||||
{
|
||||
if ( isset( $this->promote->form_data['internal'] ) AND $settings = $this->promote->form_data['internal'] )
|
||||
{
|
||||
$title = $settings['title'];
|
||||
}
|
||||
}
|
||||
|
||||
return array(
|
||||
new \IPS\Helpers\Form\Text( 'promote_social_title_internal', $title ),
|
||||
new \IPS\Helpers\Form\TextArea( 'promote_social_content_internal', $content ?: $text, FALSE, array( 'maxLength' => 3000, 'rows' => 6 ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Allow for any extra processing
|
||||
*
|
||||
* @param array $values Values from the form isn't it though
|
||||
* @return mixed
|
||||
*/
|
||||
public function processPromoteForm( $values )
|
||||
{
|
||||
if ( isset( $values['promote_social_title_internal'] ) )
|
||||
{
|
||||
return array( 'title' => $values['promote_social_title_internal'] );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post to internal
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user