Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -343,23 +343,22 @@ class _Ad extends \IPS\nexus\Package
|
||||
$field = new \IPS\Helpers\Form\Url( 'advertisement_url' . $k, NULL, TRUE );
|
||||
$field->label = \IPS\Member::loggedIn()->language()->addToStack('advertisement_url');
|
||||
$form->add( $field );
|
||||
|
||||
$maxDims = TRUE;
|
||||
if ( $this->max_height or $this->max_width )
|
||||
{
|
||||
$maxDims = array();
|
||||
if ( $this->max_width )
|
||||
{
|
||||
$maxDims['maxWidth'] = $this->max_width;
|
||||
}
|
||||
if ( $this->max_height )
|
||||
{
|
||||
$maxDims['maxHeight'] = $this->max_height;
|
||||
}
|
||||
}
|
||||
$field = new \IPS\Helpers\Form\Upload( 'advertisement_image' . $k, NULL, TRUE, array( 'storageExtension' => 'nexus_Ads', 'image' => $maxDims ) );
|
||||
$field->label = \IPS\Member::loggedIn()->language()->addToStack('advertisement_image');
|
||||
|
||||
$field = new \IPS\Helpers\Form\Upload( 'ad_image' . $k, NULL, TRUE, array( 'image' => TRUE, 'storageExtension' => 'nexus_Ads' ) );
|
||||
$field->label = \IPS\Member::loggedIn()->language()->addToStack('ad_image');
|
||||
$form->add( $field );
|
||||
|
||||
$field = new \IPS\Helpers\Form\YesNo( 'ad_image_more' . $k, FALSE, FALSE, array( 'togglesOn' => array( 'ad_image_small' . $k, 'ad_image_medium' . $k ) ) );
|
||||
$field->label = \IPS\Member::loggedIn()->language()->addToStack('ad_image_more');
|
||||
$form->add( $field );
|
||||
|
||||
$field = new \IPS\Helpers\Form\Upload( 'ad_image_small' . $k, NULL, FALSE, array( 'image' => TRUE, 'storageExtension' => 'nexus_Ads' ), NULL, NULL, NULL, 'ad_image_small' . $k );
|
||||
$field->label = \IPS\Member::loggedIn()->language()->addToStack('ad_image_small');
|
||||
$form->add( $field );
|
||||
|
||||
$field = new \IPS\Helpers\Form\Upload( 'ad_image_medium' . $k, NULL, FALSE, array( 'image' => TRUE, 'storageExtension' => 'nexus_Ads' ), NULL, NULL, NULL, 'ad_image_medium' . $k );
|
||||
$field->label = \IPS\Member::loggedIn()->language()->addToStack('ad_image_medium');
|
||||
$form->add( $field );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,7 +372,7 @@ class _Ad extends \IPS\nexus\Package
|
||||
*/
|
||||
public function acpAddToInvoice( \IPS\nexus\extensions\nexus\Item\Package $item, array $values, $k, \IPS\nexus\Invoice $invoice )
|
||||
{
|
||||
$item->extra['image'] = (string) $values[ 'advertisement_image' . $k ];
|
||||
$item->extra['image'] = json_encode( array( 'large' => (string) $values[ 'ad_image' . $k ], 'medium' => (string) $values[ 'ad_image_medium' . $k ], 'small' => (string) $values[ 'ad_image_small' . $k ] ) );
|
||||
$item->extra['link'] = (string) $values[ 'advertisement_url' . $k ];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user