Version Notes
* Uninstall helper in configuration
* Version 1.0.7
Download this release
Release Info
| Developer | Trivid GmbH |
| Extension | clipgenerator |
| Version | 1.0.7 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.6 to 1.0.7
- app/code/community/Trivid/Clipgenerator/Adminhtml/MassController.php +0 -72
- app/code/community/Trivid/Clipgenerator/Adminhtml/OrderformController.php +0 -48
- app/code/community/Trivid/Clipgenerator/Block/Adminhtml/System/Config/Form/Field/Musiclightbox.php +0 -38
- app/code/community/Trivid/Clipgenerator/Block/Adminhtml/System/Config/Form/Field/{Contingentlabel.php → Uninstallhelper.php} +5 -6
- app/code/community/Trivid/Clipgenerator/Block/Catalog/Product/Helper/Form/Images.php +0 -37
- app/code/community/Trivid/Clipgenerator/Block/Catalog/Product/Helper/Form/Music.php +0 -10
- app/code/community/Trivid/Clipgenerator/Block/Catalog/Product/Helper/Form/music.php +0 -37
- app/code/community/Trivid/Clipgenerator/Block/InsertVideo.php +0 -77
- app/code/community/Trivid/Clipgenerator/Block/Video.php +0 -40
- app/code/community/Trivid/Clipgenerator/Helper/Data.php +0 -341
- app/code/community/Trivid/Clipgenerator/Model/Adminhtml/System/Config/Source/Designs.php +0 -58
- app/code/community/Trivid/Clipgenerator/Model/Adminhtml/System/Config/Source/Musics.php +0 -58
- app/code/community/Trivid/Clipgenerator/Model/Mysql4/Setup.php +0 -25
- app/code/community/Trivid/Clipgenerator/Model/Observer.php +0 -83
- app/code/community/Trivid/Clipgenerator/Model/Source/Designs.php +0 -41
- app/code/community/Trivid/Clipgenerator/Model/Source/Musics.php +0 -41
- app/code/community/Trivid/Clipgenerator/controllers/Adminhtml/MassController.php +0 -72
- app/code/community/Trivid/Clipgenerator/controllers/Adminhtml/OrderformController.php +0 -48
- app/code/community/Trivid/Clipgenerator/etc/adminhtml.xml +0 -3
- app/code/community/Trivid/Clipgenerator/etc/config.xml +1 -1
- app/code/community/Trivid/Clipgenerator/etc/system.xml +0 -137
- app/code/community/Trivid/Clipgenerator/lib/clipgenerator/ClipgeneratorClient.php +0 -584
- app/code/community/Trivid/Clipgenerator/lib/clipgenerator/Frame.php +0 -89
- app/code/community/Trivid/Clipgenerator/lib/clipgenerator/Logo.php +0 -71
- app/code/community/Trivid/Clipgenerator/lib/clipgenerator/LowerThird.php +0 -209
- app/code/community/Trivid/Clipgenerator/lib/clipgenerator/Picture.php +0 -97
- app/code/community/Trivid/Clipgenerator/lib/clipgenerator/Video.php +0 -572
- app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-0.1.0.php +0 -196
- app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.2.php +0 -202
- app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.3.php +0 -202
- app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.4.php +0 -202
- app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.5.php +0 -202
- app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.6.php +0 -202
- app/design/adminhtml/default/default/layout/clipgenerator.xml +0 -10
- app/design/adminhtml/default/default/template/clipgenerator/contingent.phtml +0 -27
- app/design/adminhtml/default/default/template/clipgenerator/images.phtml +0 -108
- app/design/adminhtml/default/default/template/clipgenerator/music.phtml +0 -243
- app/design/adminhtml/default/default/template/clipgenerator/orderform.phtml +0 -288
- app/design/adminhtml/default/default/template/clipgenerator/uninstall.phtml +202 -0
- app/etc/modules/Trivid_Clipgenerator.xml +0 -9
- app/locale/de_DE/Trivid_Clipgenerator.csv +0 -5
- package.xml +6 -11
app/code/community/Trivid/Clipgenerator/Adminhtml/MassController.php
DELETED
|
@@ -1,72 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Adminhtml Mass Controller
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Adminhtml_MassController
|
| 21 |
-
*
|
| 22 |
-
* catches mass instruction to activate or deactivate at least 10 product
|
| 23 |
-
* videos. After success the methods will return to list view.
|
| 24 |
-
* @package Trivid
|
| 25 |
-
*/
|
| 26 |
-
class Trivid_Clipgenerator_Adminhtml_MassController extends Mage_Adminhtml_Controller_Action {
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* array of send products to mass controller.
|
| 30 |
-
* @var array $products
|
| 31 |
-
*/
|
| 32 |
-
protected $products;
|
| 33 |
-
|
| 34 |
-
/**
|
| 35 |
-
* initializes the class, checks if the count of the given products
|
| 36 |
-
* is higher than the expected size of 10 and throws an error if
|
| 37 |
-
* happend.
|
| 38 |
-
*
|
| 39 |
-
* @return void
|
| 40 |
-
*/
|
| 41 |
-
protected function init() {
|
| 42 |
-
$this->products = $this->getRequest()->getParam('product');
|
| 43 |
-
if (count($this->products) > 10) {
|
| 44 |
-
Mage::getSingleton('core/session')->addError(Mage::helper('clipgenerator')->__('Sie können maximal 10 Produkte gleichzeitig verarbeiten.'));
|
| 45 |
-
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/index'));
|
| 46 |
-
}
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
/**
|
| 50 |
-
* activates the given products by calling the clipgenerator helper
|
| 51 |
-
* which handle the activation request.
|
| 52 |
-
*
|
| 53 |
-
* @return void
|
| 54 |
-
*/
|
| 55 |
-
public function activateAction() {
|
| 56 |
-
$this->init();
|
| 57 |
-
Mage::helper('clipgenerator')->activateVideos($this->products);
|
| 58 |
-
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/index'));
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
/**
|
| 62 |
-
* deactivates the given products by calling the clipgenerator helper
|
| 63 |
-
* which handle the deactivation request.
|
| 64 |
-
*
|
| 65 |
-
* @return void
|
| 66 |
-
*/
|
| 67 |
-
public function deactivateAction() {
|
| 68 |
-
$this->init();
|
| 69 |
-
Mage::helper('clipgenerator')->deactivateVideos($this->products);
|
| 70 |
-
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/index'));
|
| 71 |
-
}
|
| 72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Adminhtml/OrderformController.php
DELETED
|
@@ -1,48 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Orderform Controller
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Adminhtml_OrderformController
|
| 21 |
-
*
|
| 22 |
-
* Handles the orderform view and request.
|
| 23 |
-
* @package Trivid
|
| 24 |
-
*/
|
| 25 |
-
class Trivid_Clipgenerator_Adminhtml_OrderformController extends Mage_Adminhtml_Controller_Action {
|
| 26 |
-
/**
|
| 27 |
-
* User get the orderform if the api
|
| 28 |
-
* credentials not set anyway. On submitting the form to Trivid order web-
|
| 29 |
-
* service it receives the result via ajax and sets the return to the
|
| 30 |
-
* magento configuration.
|
| 31 |
-
* @return void
|
| 32 |
-
*/
|
| 33 |
-
public function indexAction() {
|
| 34 |
-
$post = $this->getRequest()->getPost();
|
| 35 |
-
if($post['isAjax']) {
|
| 36 |
-
if($post['apiUser'] && $post['apiSecret']) {
|
| 37 |
-
$response_array['status'] = 'success';
|
| 38 |
-
echo json_encode($response_array);
|
| 39 |
-
Mage::getModel('core/config')->saveConfig('clipgenerator/general/clipgenerator_api_user_id', $post['apiUser']);
|
| 40 |
-
Mage::getModel('core/config')->saveConfig('clipgenerator/general/clipgenerator_api_secret', $post['apiSecret']);
|
| 41 |
-
Mage::getModel('core/config')->saveConfig('clipgenerator/general/clipgenerator_email', $post['email']);
|
| 42 |
-
Mage::getSingleton('core/session')->addSuccess(Mage::helper('clipgenerator')->__('Die Bestellung war erfolgreich!'));
|
| 43 |
-
}
|
| 44 |
-
die();
|
| 45 |
-
}
|
| 46 |
-
$this->loadLayout()->renderLayout();
|
| 47 |
-
}
|
| 48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Block/Adminhtml/System/Config/Form/Field/Musiclightbox.php
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* musiclightbox field
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Block_Adminhtml_System_Config_Form_Field_Musiclightbox
|
| 21 |
-
*
|
| 22 |
-
* Musiclightbox creates music chooser in configuration.
|
| 23 |
-
* @package Trivid
|
| 24 |
-
*/
|
| 25 |
-
class Trivid_Clipgenerator_Block_Adminhtml_System_Config_Form_Field_Musiclightbox extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
| 26 |
-
/**
|
| 27 |
-
* Renders music chooser for configuration view from music
|
| 28 |
-
* chooser tempalte.
|
| 29 |
-
* @return string
|
| 30 |
-
*/
|
| 31 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
| 32 |
-
$block = Mage::getSingleton('core/layout')
|
| 33 |
-
->createBlock('adminhtml/template', '', array('template' => 'clipgenerator/music.phtml'))
|
| 34 |
-
->setIsRenderToJsTemplate(TRUE);
|
| 35 |
-
|
| 36 |
-
return $block->toHtml();
|
| 37 |
-
}
|
| 38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Block/Adminhtml/System/Config/Form/Field/{Contingentlabel.php → Uninstallhelper.php}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
*
|
| 4 |
*
|
| 5 |
* PHP version 5
|
| 6 |
*
|
|
@@ -19,18 +19,17 @@
|
|
| 19 |
/**
|
| 20 |
* Class Trivid_Clipgenerator_Block_Adminhtml_System_Config_Form_Field_Contingentlabel
|
| 21 |
*
|
| 22 |
-
*
|
| 23 |
* @package Trivid
|
| 24 |
*/
|
| 25 |
-
class
|
| 26 |
/**
|
| 27 |
-
* Renders the
|
| 28 |
-
* of the user.
|
| 29 |
* @return string
|
| 30 |
*/
|
| 31 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
| 32 |
$block = Mage::getSingleton('core/layout')
|
| 33 |
-
->createBlock('adminhtml/template', '', array('template' => 'clipgenerator/
|
| 34 |
->setIsRenderToJsTemplate(TRUE);
|
| 35 |
|
| 36 |
return $block->toHtml();
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
+
* Uninstall Field
|
| 4 |
*
|
| 5 |
* PHP version 5
|
| 6 |
*
|
| 19 |
/**
|
| 20 |
* Class Trivid_Clipgenerator_Block_Adminhtml_System_Config_Form_Field_Contingentlabel
|
| 21 |
*
|
| 22 |
+
* Uninstall label handles uninstall helper configuration.
|
| 23 |
* @package Trivid
|
| 24 |
*/
|
| 25 |
+
class Trivid_Clipgenerator_Block_Adminhtml_System_Config_Form_Field_Uninstallhelper extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
| 26 |
/**
|
| 27 |
+
* Renders the uninstall template with the given uninstall information
|
|
|
|
| 28 |
* @return string
|
| 29 |
*/
|
| 30 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
| 31 |
$block = Mage::getSingleton('core/layout')
|
| 32 |
+
->createBlock('adminhtml/template', '', array('template' => 'clipgenerator/uninstall.phtml'))
|
| 33 |
->setIsRenderToJsTemplate(TRUE);
|
| 34 |
|
| 35 |
return $block->toHtml();
|
app/code/community/Trivid/Clipgenerator/Block/Catalog/Product/Helper/Form/Images.php
DELETED
|
@@ -1,37 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* images form helper
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Block_Catalog_Product_Helper_Form_Images
|
| 21 |
-
*
|
| 22 |
-
* Creates image chooser in product edit view.
|
| 23 |
-
* @package Trivid
|
| 24 |
-
*/
|
| 25 |
-
class Trivid_Clipgenerator_Block_Catalog_Product_Helper_Form_Images extends Varien_Data_Form_Element_Text {
|
| 26 |
-
/**
|
| 27 |
-
* Renders the images chooser template and returns the html.
|
| 28 |
-
* @return string
|
| 29 |
-
*/
|
| 30 |
-
public function getAfterElementHtml() {
|
| 31 |
-
$block = Mage::getSingleton('core/layout')
|
| 32 |
-
->createBlock('adminhtml/template', '', array('template' => 'clipgenerator/images.phtml'))
|
| 33 |
-
->setIsRenderToJsTemplate(TRUE);
|
| 34 |
-
|
| 35 |
-
return $block->toHtml();
|
| 36 |
-
}
|
| 37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Block/Catalog/Product/Helper/Form/Music.php
DELETED
|
@@ -1,10 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
class Trivid_Clipgenerator_Block_Catalog_Product_Helper_Form_Music extends Varien_Data_Form_Element_Text {
|
| 3 |
-
public function getAfterElementHtml() {
|
| 4 |
-
$block = Mage::getSingleton('core/layout')
|
| 5 |
-
->createBlock('adminhtml/template', '', array('template' => 'clipgenerator/music.phtml'))
|
| 6 |
-
->setIsRenderToJsTemplate(TRUE);
|
| 7 |
-
|
| 8 |
-
return $block->toHtml();
|
| 9 |
-
}
|
| 10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Block/Catalog/Product/Helper/Form/music.php
DELETED
|
@@ -1,37 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* music form helper
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Block_Catalog_Product_Helper_Form_Music
|
| 21 |
-
*
|
| 22 |
-
* Creates the music chooser for the product edit view.
|
| 23 |
-
* @package Trivid
|
| 24 |
-
*/
|
| 25 |
-
class Trivid_Clipgenerator_Block_Catalog_Product_Helper_Form_Music extends Varien_Data_Form_Element_Text {
|
| 26 |
-
/**
|
| 27 |
-
* Renders the music chooser template for editing products.
|
| 28 |
-
* @return string
|
| 29 |
-
*/
|
| 30 |
-
public function getAfterElementHtml() {
|
| 31 |
-
$block = Mage::getSingleton('core/layout')
|
| 32 |
-
->createBlock('adminhtml/template', '', array('template' => 'clipgenerator/music.phtml'))
|
| 33 |
-
->setIsRenderToJsTemplate(TRUE);
|
| 34 |
-
|
| 35 |
-
return $block->toHtml();
|
| 36 |
-
}
|
| 37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Block/InsertVideo.php
DELETED
|
@@ -1,77 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* insert video block
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Block_InsertVideo
|
| 21 |
-
*
|
| 22 |
-
* Handles automatically output to the product detail view.
|
| 23 |
-
* @package Trivid
|
| 24 |
-
*/
|
| 25 |
-
class Trivid_Clipgenerator_Block_InsertVideo extends Mage_Core_Block_Text {
|
| 26 |
-
/**
|
| 27 |
-
* Name of the new layout part.
|
| 28 |
-
* @var string
|
| 29 |
-
*/
|
| 30 |
-
protected $_nameInLayout = 'clipgenerator.insertvideo';
|
| 31 |
-
/**
|
| 32 |
-
* Alias of the new layout part.
|
| 33 |
-
* @var string
|
| 34 |
-
*/
|
| 35 |
-
protected $_alias = 'insertvideo';
|
| 36 |
-
/**
|
| 37 |
-
* Current video id.
|
| 38 |
-
* @var int
|
| 39 |
-
*/
|
| 40 |
-
protected $videoId;
|
| 41 |
-
/**
|
| 42 |
-
* Products show option.
|
| 43 |
-
* @var boolean
|
| 44 |
-
*/
|
| 45 |
-
protected $show;
|
| 46 |
-
|
| 47 |
-
/**
|
| 48 |
-
* Initializes the given product attributes videoid and show.
|
| 49 |
-
* @param null $videoId
|
| 50 |
-
* @param bool $show
|
| 51 |
-
*/
|
| 52 |
-
function __construct($videoId = NULL, $show = FALSE) {
|
| 53 |
-
$this->videoId = $videoId;
|
| 54 |
-
$this->show = $show;
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
/**
|
| 58 |
-
* Expands the current transport part by adding the video iframe html.
|
| 59 |
-
* @param $transport
|
| 60 |
-
*/
|
| 61 |
-
public function setPassingTransport($transport) {
|
| 62 |
-
$this->setData('text', $transport . $this->_insertVideoHtml());
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
/**
|
| 66 |
-
* Creates video iframe.
|
| 67 |
-
* @return string
|
| 68 |
-
*/
|
| 69 |
-
private function _insertVideoHtml() {
|
| 70 |
-
$html = '';
|
| 71 |
-
if ($this->videoId && $this->show) {
|
| 72 |
-
$html = '<iframe id="clipgeneratorvideo" style="width:400px; height:300px; border:0px none;" src="http://data.clipgenerator.com/player/v3/Player.swf?autoplay=off&webcartURL=http%3A%2F%2Fcg-v3.clipgenerator.com%2FgetWebcart%3FvideoId%3D' . $this->videoId . '"></iframe>';
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
return $html;
|
| 76 |
-
}
|
| 77 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Block/Video.php
DELETED
|
@@ -1,40 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* video block
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Block_Video
|
| 21 |
-
*
|
| 22 |
-
* Video block for individual inclusion.
|
| 23 |
-
* @package
|
| 24 |
-
*/
|
| 25 |
-
class Trivid_Clipgenerator_Block_Video extends Mage_Core_Block_Text {
|
| 26 |
-
/**
|
| 27 |
-
* Generates the video iframe for the block include opiton.
|
| 28 |
-
* @return mixed|string
|
| 29 |
-
*/
|
| 30 |
-
protected function _toHtml() {
|
| 31 |
-
$_product = Mage::registry('current_product');
|
| 32 |
-
$video = $_product->getData('clipgenerator_video_id');
|
| 33 |
-
$show = $_product->getData('clipgenerator_show');
|
| 34 |
-
if ($video && $show) {
|
| 35 |
-
$html = '<iframe id="clipgeneratorvideo" style="width:400px; height:300px; border:0px none;" src="http://data.clipgenerator.com/player/v3/Player.swf?autoplay=off&webcartURL=http%3A%2F%2Fcg-v3.clipgenerator.com%2FgetWebcart%3FvideoId%3D' . $video . '"></iframe>';
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
return $html;
|
| 39 |
-
}
|
| 40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Helper/Data.php
DELETED
|
@@ -1,341 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Main Helper Class
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
require_once(Mage::getModuleDir('', 'Trivid_Clipgenerator') . '/lib/clipgenerator/ClipgeneratorClient.php');
|
| 20 |
-
require_once(Mage::getModuleDir('', 'Trivid_Clipgenerator') . '/lib/clipgenerator/Video.php');
|
| 21 |
-
require_once(Mage::getModuleDir('', 'Trivid_Clipgenerator') . '/lib/clipgenerator/Picture.php');
|
| 22 |
-
require_once(Mage::getModuleDir('', 'Trivid_Clipgenerator') . '/lib/clipgenerator/Frame.php');
|
| 23 |
-
require_once(Mage::getModuleDir('', 'Trivid_Clipgenerator') . '/lib/clipgenerator/Logo.php');
|
| 24 |
-
require_once(Mage::getModuleDir('', 'Trivid_Clipgenerator') . '/lib/clipgenerator/LowerThird.php');
|
| 25 |
-
/**
|
| 26 |
-
* Class Trivid_Clipgenerator_Helper_Data
|
| 27 |
-
*
|
| 28 |
-
* Main helper class for handling video generation, activation and so on.
|
| 29 |
-
* @package Trivid
|
| 30 |
-
*/
|
| 31 |
-
class Trivid_Clipgenerator_Helper_Data extends Mage_Core_Helper_Abstract {
|
| 32 |
-
|
| 33 |
-
/**
|
| 34 |
-
* Instance of the clipgenerator client.
|
| 35 |
-
* @var ClipgeneratorClient
|
| 36 |
-
*/
|
| 37 |
-
protected $clipgeneratorClient;
|
| 38 |
-
|
| 39 |
-
/**
|
| 40 |
-
* Initalize clipgenerator api with given api credentials from.
|
| 41 |
-
* clipgenerator konfiguration
|
| 42 |
-
* @return void
|
| 43 |
-
*/
|
| 44 |
-
private function initClipgeneratorApi() {
|
| 45 |
-
$apiUserId = Mage::getStoreConfig('clipgenerator/general/clipgenerator_api_user_id', Mage::app()->getStore());
|
| 46 |
-
$apiSecret = Mage::getStoreConfig('clipgenerator/general/clipgenerator_api_secret', Mage::app()->getStore());
|
| 47 |
-
$apiId = 'magento-' . $apiUserId;
|
| 48 |
-
$apiUrl = 'http://cg-v3.clipgenerator.com/';
|
| 49 |
-
$this->clipgeneratorClient = new ClipgeneratorClient(
|
| 50 |
-
$apiId,
|
| 51 |
-
$apiSecret,
|
| 52 |
-
$apiUserId,
|
| 53 |
-
'de',
|
| 54 |
-
$apiUrl
|
| 55 |
-
);
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
/**
|
| 59 |
-
* Method for calling requests to clipgenerator api direct via curl.
|
| 60 |
-
* @param $method
|
| 61 |
-
* @param array $params
|
| 62 |
-
* @return mixed
|
| 63 |
-
*/
|
| 64 |
-
private function curlCall($method, $params = array()) {
|
| 65 |
-
if ($method) {
|
| 66 |
-
$apiCredentials = array(
|
| 67 |
-
'userId' => Mage::getStoreConfig('clipgenerator/general/clipgenerator_api_user_id', Mage::app()->getStore()),
|
| 68 |
-
'apiSecret' => Mage::getStoreConfig('clipgenerator/general/clipgenerator_api_secret', Mage::app()->getStore()),
|
| 69 |
-
'apiId' => 'magento-' . Mage::getStoreConfig('clipgenerator/general/clipgenerator_api_user_id', Mage::app()->getStore())
|
| 70 |
-
);
|
| 71 |
-
$params = array_merge($params, $apiCredentials);
|
| 72 |
-
$apiUrl = 'http://cg-v3.clipgenerator.com/';
|
| 73 |
-
$curl = $apiUrl . $method . '?' . http_build_query($params);
|
| 74 |
-
$ch = curl_init();
|
| 75 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
| 76 |
-
curl_setopt($ch, CURLOPT_URL, $curl);
|
| 77 |
-
curl_setopt($ch, CURLOPT_HEADER, 0);
|
| 78 |
-
$output = curl_exec($ch);
|
| 79 |
-
curl_close($ch);
|
| 80 |
-
|
| 81 |
-
return $output;
|
| 82 |
-
}
|
| 83 |
-
}
|
| 84 |
-
|
| 85 |
-
/**
|
| 86 |
-
* Uploads the given picture url to the current api account.
|
| 87 |
-
* @param $file
|
| 88 |
-
* @return array|bool
|
| 89 |
-
*/
|
| 90 |
-
public function uploadPicture($file) {
|
| 91 |
-
$this->initClipgeneratorApi();
|
| 92 |
-
|
| 93 |
-
return $this->clipgeneratorClient->uploadPicture($file);
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
/**
|
| 97 |
-
* Save the generated xml to the given video or creates a new video.
|
| 98 |
-
* @param $xml
|
| 99 |
-
* @return false
|
| 100 |
-
*/
|
| 101 |
-
public function saveVideo($xml) {
|
| 102 |
-
$this->initClipgeneratorApi();
|
| 103 |
-
|
| 104 |
-
return $this->clipgeneratorClient->saveVideo($xml);
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
/**
|
| 108 |
-
* Returns a array of the clipgenerator designs.
|
| 109 |
-
* @return array
|
| 110 |
-
*/
|
| 111 |
-
public function getDesigns() {
|
| 112 |
-
$this->initClipgeneratorApi();
|
| 113 |
-
$designs = $this->clipgeneratorClient->getDesigns();
|
| 114 |
-
|
| 115 |
-
return $designs;
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
/**
|
| 119 |
-
* Returns a array of the clipgenerator music.
|
| 120 |
-
* @return array
|
| 121 |
-
*/
|
| 122 |
-
public function getMusic() {
|
| 123 |
-
$this->initClipgeneratorApi();
|
| 124 |
-
$designs = $this->clipgeneratorClient->getMusic();
|
| 125 |
-
|
| 126 |
-
return $designs;
|
| 127 |
-
}
|
| 128 |
-
|
| 129 |
-
/**
|
| 130 |
-
* Returns the current user if api credentials match.
|
| 131 |
-
* @return array
|
| 132 |
-
*/
|
| 133 |
-
public function getUser() {
|
| 134 |
-
$this->initClipgeneratorApi();
|
| 135 |
-
$user = $this->clipgeneratorClient->getUser();
|
| 136 |
-
|
| 137 |
-
return $user;
|
| 138 |
-
}
|
| 139 |
-
|
| 140 |
-
/**
|
| 141 |
-
* Activates the given products.
|
| 142 |
-
* @param $products
|
| 143 |
-
* @return void
|
| 144 |
-
*/
|
| 145 |
-
public function activateVideos($products) {
|
| 146 |
-
foreach ($products as $product_id) {
|
| 147 |
-
$product = Mage::getModel('catalog/product')->load($product_id);
|
| 148 |
-
$cid = $product->getData('clipgenerator_video_id');
|
| 149 |
-
if ($cid) {
|
| 150 |
-
$productIdArray[] = $product->getData('clipgenerator_video_id');
|
| 151 |
-
$productArray[$product->getData('clipgenerator_video_id')] = $product;
|
| 152 |
-
} else {
|
| 153 |
-
$product->setData('clipgenerator_show', 1);
|
| 154 |
-
$this->createVideo($product);
|
| 155 |
-
$productIdArray[] = $product->getData('clipgenerator_video_id');
|
| 156 |
-
$productArray[$product->getData('clipgenerator_video_id')] = $product;
|
| 157 |
-
}
|
| 158 |
-
}
|
| 159 |
-
if (!empty($productIdArray)) {
|
| 160 |
-
$params['idList'] = json_encode($productIdArray);
|
| 161 |
-
$params['visibility'] = 1;
|
| 162 |
-
$return = json_decode($this->curlCall('setClipVisibilityBulk', $params));
|
| 163 |
-
$success = $return->result->idList;
|
| 164 |
-
}
|
| 165 |
-
if (!empty($success)) {
|
| 166 |
-
$count = 0;
|
| 167 |
-
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
|
| 168 |
-
foreach ($success as $id) {
|
| 169 |
-
$productArray[$id]->setData('clipgenerator_show', 1);
|
| 170 |
-
$productArray[$id]->save();
|
| 171 |
-
$count++;
|
| 172 |
-
}
|
| 173 |
-
Mage::getSingleton('core/session')->addSuccess(sprintf(Mage::helper('clipgenerator')->__('%s Video/s wurde/n aktivert.'), $count));
|
| 174 |
-
} else {
|
| 175 |
-
Mage::getSingleton('core/session')->addError(Mage::helper('clipgenerator')->__('Die gewählten Videos konnten nicht aktiviert werden. Bitte versuchen Sie es noch einmal.'));
|
| 176 |
-
}
|
| 177 |
-
}
|
| 178 |
-
|
| 179 |
-
/**
|
| 180 |
-
* Deactivates the given products.
|
| 181 |
-
* @param $products
|
| 182 |
-
* @return void
|
| 183 |
-
*/
|
| 184 |
-
public function deactivateVideos($products) {
|
| 185 |
-
foreach ($products as $product_id) {
|
| 186 |
-
$product = Mage::getModel('catalog/product')->load($product_id);
|
| 187 |
-
$cid = $product->getData('clipgenerator_video_id');
|
| 188 |
-
if ($cid) {
|
| 189 |
-
$productIdArray[] = $product->getData('clipgenerator_video_id');
|
| 190 |
-
$productArray[$product->getData('clipgenerator_video_id')] = $product;
|
| 191 |
-
}
|
| 192 |
-
}
|
| 193 |
-
if (!empty($productIdArray)) {
|
| 194 |
-
$params['idList'] = json_encode($productIdArray);
|
| 195 |
-
$params['visibility'] = 0;
|
| 196 |
-
$return = json_decode($this->curlCall('setClipVisibilityBulk', $params));
|
| 197 |
-
$success = $return->result->idList;
|
| 198 |
-
}
|
| 199 |
-
if (!empty($success)) {
|
| 200 |
-
$count = 0;
|
| 201 |
-
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
|
| 202 |
-
foreach ($success as $id) {
|
| 203 |
-
$productArray[$id]->setData('clipgenerator_show', 0);
|
| 204 |
-
$productArray[$id]->save();
|
| 205 |
-
$count++;
|
| 206 |
-
}
|
| 207 |
-
Mage::getSingleton('core/session')->addSuccess(sprintf(Mage::helper('clipgenerator')->__('%s Video/s wurde/n deaktivert.'), $count));
|
| 208 |
-
} else {
|
| 209 |
-
Mage::getSingleton('core/session')->addError(Mage::helper('clipgenerator')->__('Die gewählten Videos konnten nicht deaktiviert werden.'));
|
| 210 |
-
}
|
| 211 |
-
}
|
| 212 |
-
|
| 213 |
-
/**
|
| 214 |
-
* Creates a video by the given product with the product configuration,
|
| 215 |
-
* if there are no settings given or missing, it sets randomized value.
|
| 216 |
-
* @param $_product
|
| 217 |
-
* @return void
|
| 218 |
-
*/
|
| 219 |
-
public function createVideo($_product) {
|
| 220 |
-
$this->initClipgeneratorApi();
|
| 221 |
-
if ($_product->getData('clipgenerator_show') && $this->getUser()) {
|
| 222 |
-
$video = new Video($_product->getData('clipgenerator_title'));
|
| 223 |
-
//set video design
|
| 224 |
-
if ($_product->getData('clipgenerator_design')) {
|
| 225 |
-
$video->designId = $_product->getData('clipgenerator_design');
|
| 226 |
-
} else {
|
| 227 |
-
$designs = $this->getDesigns();
|
| 228 |
-
$dKey = array_rand($designs);
|
| 229 |
-
$video->designId = $designs[$dKey]['id'];
|
| 230 |
-
$_product->setData('clipgenerator_design', $designs[$dKey]['id']);
|
| 231 |
-
}
|
| 232 |
-
//set video song
|
| 233 |
-
if ($_product->getData('clipgenerator_song')) {
|
| 234 |
-
$video->songId = $_product->getData('clipgenerator_song');
|
| 235 |
-
} else {
|
| 236 |
-
$music = $this->getMusic();
|
| 237 |
-
$mKey = array_rand($music['songs']);
|
| 238 |
-
$video->designId = $music['songs'][$mKey]['id'];
|
| 239 |
-
$_product->setData('clipgenerator_design', $music['songs'][$mKey]['id']);
|
| 240 |
-
}
|
| 241 |
-
$video->keywords = $_product->getData('clipgenerator_keywords') ? $_product->getData('clipgenerator_keywords') : $_product->getData('meta_keywords');
|
| 242 |
-
$video->title = $_product->getData('clipgenerator_title') ? $_product->getData('clipgenerator_title') : $_product->getData('name');
|
| 243 |
-
$video->description = $_product->getData('clipgenerator_description') ? $_product->getData('clipgenerator_description') : $_product->getData('description');
|
| 244 |
-
$logoUrl = $_product->getData('clipgenerator_logo') ? $_product->getData('clipgenerator_logo') : Mage::getStoreConfig('clipgenerator/settings/clipgenerator_logo_url', Mage::app()->getStore());
|
| 245 |
-
$logoLink = Mage::getStoreConfig('clipgenerator/settings/clipgenerator_logo_link', Mage::app()->getStore());
|
| 246 |
-
$color = Mage::getStoreConfig('clipgenerator/settings/clipgenerator_player_bgcolor', Mage::app()->getStore());
|
| 247 |
-
if ($logoUrl) {
|
| 248 |
-
if ($logo = $this->clipgeneratorClient->uploadLogo($logoUrl)) {
|
| 249 |
-
$logoId = $logo['id'];
|
| 250 |
-
$logoUrl = $logo['url'];
|
| 251 |
-
$logo = Logo::fromXml('<logo width="0.2" height="0.2" alpha="1">
|
| 252 |
-
<id>' . $logoId . '</id>
|
| 253 |
-
<url>' . htmlspecialchars($logoUrl) . '</url>
|
| 254 |
-
<link>' . $logoLink . '</link>
|
| 255 |
-
<position verticalAlign="top" horizontalAlign="right" />
|
| 256 |
-
<showInStartPage>false</showInStartPage>
|
| 257 |
-
<showInEndPage>false</showInEndPage>
|
| 258 |
-
<showInTimeline>true</showInTimeline>
|
| 259 |
-
</logo>');
|
| 260 |
-
$video->logo = $logo;
|
| 261 |
-
}
|
| 262 |
-
}
|
| 263 |
-
$images = explode(';', trim($_product->getData('clipgenerator_images_select'), ';'));
|
| 264 |
-
$pImgs = $_product->getMediaGalleryImages();
|
| 265 |
-
$newImgSelect = '';
|
| 266 |
-
$imgCount = 0;
|
| 267 |
-
if ($_product->getData('clipgenerator_images_select')) {
|
| 268 |
-
foreach ($images as $img) {
|
| 269 |
-
foreach ($pImgs as $pImg) {
|
| 270 |
-
if ($pImg->getUrl() == $img) {
|
| 271 |
-
$pic = $this->clipgeneratorClient->uploadPicture($img);
|
| 272 |
-
$picture = new Picture($pic['id']);
|
| 273 |
-
// add new frame
|
| 274 |
-
$frame = new Frame($picture);
|
| 275 |
-
// set config bg color
|
| 276 |
-
$frame->backgroundColor = hexdec($color);
|
| 277 |
-
if ($pImg->getData('label')) {
|
| 278 |
-
$l3 = new LowerThird();
|
| 279 |
-
$l3->verticalAlign = 300;
|
| 280 |
-
$l3->setText($pImg->getData('label'));
|
| 281 |
-
$l3->textOutlineWidth = 2;
|
| 282 |
-
$l3->textOutlineColor = 0x333333;
|
| 283 |
-
$l3->link = $_product->getProductUrl();
|
| 284 |
-
$frame->addLowerThird($l3);
|
| 285 |
-
}
|
| 286 |
-
$video->addFrame($frame);
|
| 287 |
-
$newImgSelect .= ';' . $img;
|
| 288 |
-
$imgCount++;
|
| 289 |
-
break;
|
| 290 |
-
}
|
| 291 |
-
}
|
| 292 |
-
// limitation to 22 images
|
| 293 |
-
if ($imgCount == 22) {
|
| 294 |
-
break;
|
| 295 |
-
}
|
| 296 |
-
}
|
| 297 |
-
} else {
|
| 298 |
-
foreach ($pImgs as $pImg) {
|
| 299 |
-
$pic = $this->clipgeneratorClient->uploadPicture($pImg->getUrl());
|
| 300 |
-
$picture = new Picture($pic['id']);
|
| 301 |
-
$frame = new Frame($picture);
|
| 302 |
-
if ($pImg->getData('label')) {
|
| 303 |
-
$l3 = new LowerThird();
|
| 304 |
-
$l3->verticalAlign = 300;
|
| 305 |
-
$l3->setText($pImg->getData('label'));
|
| 306 |
-
$l3->textOutlineWidth = 2;
|
| 307 |
-
$l3->textOutlineColor = 0x333333;
|
| 308 |
-
$l3->link = $_product->getProductUrl();
|
| 309 |
-
$frame->addLowerThird($l3);
|
| 310 |
-
}
|
| 311 |
-
$video->addFrame($frame);
|
| 312 |
-
$newImgSelect .= ';' . $pImg->getUrl();
|
| 313 |
-
$imgCount++;
|
| 314 |
-
// limitation to 22 images
|
| 315 |
-
if ($imgCount == 22) {
|
| 316 |
-
break;
|
| 317 |
-
}
|
| 318 |
-
}
|
| 319 |
-
if ($newImgSelect) {
|
| 320 |
-
$_product->setData('clipgenerator_images_select', $newImgSelect);
|
| 321 |
-
}
|
| 322 |
-
}
|
| 323 |
-
$video->format = '360p';
|
| 324 |
-
if ($_product->getData('clipgenerator_video_id')) {
|
| 325 |
-
$video->id = $_product->getData('clipgenerator_video_id');
|
| 326 |
-
}
|
| 327 |
-
$videoXml = $video->asXml();
|
| 328 |
-
$videoId = $this->clipgeneratorClient->saveVideo($videoXml);
|
| 329 |
-
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
|
| 330 |
-
if (!$_product->getData('clipgenerator_video_id')) {
|
| 331 |
-
$_product->setData('clipgenerator_video_id', $videoId);
|
| 332 |
-
$_product->save();
|
| 333 |
-
} else {
|
| 334 |
-
if ($newImgSelect != $_product->getData('clipgenerator_images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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Model/Adminhtml/System/Config/Source/Designs.php
DELETED
|
@@ -1,58 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Design Source
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @author Another Author <another@example.com>
|
| 15 |
-
* @copyright 2013 Trivid GmbH
|
| 16 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 17 |
-
* @version 1.0.0
|
| 18 |
-
* @since File available since Release 1.0.0
|
| 19 |
-
*/
|
| 20 |
-
/**
|
| 21 |
-
* Creates options for Clipgenerator Designs config value selection.
|
| 22 |
-
* @package Trivid
|
| 23 |
-
*/
|
| 24 |
-
class Trivid_Clipgenerator_Model_Adminhtml_System_Config_Source_Designs {
|
| 25 |
-
|
| 26 |
-
/**
|
| 27 |
-
* Creates options array of the designs.
|
| 28 |
-
* @return array
|
| 29 |
-
*/
|
| 30 |
-
public function toOptionArray() {
|
| 31 |
-
$designs = Mage::helper('clipgenerator')->getDesigns();
|
| 32 |
-
$designArr = array();
|
| 33 |
-
$designArr[] = array('value' => '', 'label' => '');
|
| 34 |
-
foreach ($designs as $k => $v) {
|
| 35 |
-
$designArr[] = array(
|
| 36 |
-
'value' => $v['id'],
|
| 37 |
-
'label' => $v['title']
|
| 38 |
-
);
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
return $designArr;
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
/**
|
| 45 |
-
* Creates options in "key-value" format of the designs.
|
| 46 |
-
* @return array
|
| 47 |
-
*/
|
| 48 |
-
public function toArray() {
|
| 49 |
-
$designs = Mage::helper('clipgenerator')->getDesigns();
|
| 50 |
-
$designArr = array();
|
| 51 |
-
$designArr[0] = '';
|
| 52 |
-
foreach ($designs as $v) {
|
| 53 |
-
$designArr[$v['id']] = $v['title'];
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
return $designArr;
|
| 57 |
-
}
|
| 58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Model/Adminhtml/System/Config/Source/Musics.php
DELETED
|
@@ -1,58 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Music Source
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @author Another Author <another@example.com>
|
| 15 |
-
* @copyright 2013 Trivid GmbH
|
| 16 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 17 |
-
* @version 1.0.0
|
| 18 |
-
* @since File available since Release 1.0.0
|
| 19 |
-
*/
|
| 20 |
-
/**
|
| 21 |
-
* Used in creating options for Clipgenerator Music config value selection.
|
| 22 |
-
* @package Trivid
|
| 23 |
-
*/
|
| 24 |
-
class Trivid_Clipgenerator_Model_Adminhtml_System_Config_Source_Musics {
|
| 25 |
-
|
| 26 |
-
/**
|
| 27 |
-
* Creates options array of the music.
|
| 28 |
-
* @return array
|
| 29 |
-
*/
|
| 30 |
-
public function toOptionArray() {
|
| 31 |
-
$music = Mage::helper('clipgenerator')->getMusic();
|
| 32 |
-
$musicArr = array();
|
| 33 |
-
$musicArr[] = array('value' => '', 'label' => '');
|
| 34 |
-
foreach ($music['songs'] as $k => $v) {
|
| 35 |
-
$musicArr[] = array(
|
| 36 |
-
'value' => $v['id'],
|
| 37 |
-
'label' => $v['title']
|
| 38 |
-
);
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
return $musicArr;
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
/**
|
| 45 |
-
* Creates options in "key-value" format of the music.
|
| 46 |
-
* @return array
|
| 47 |
-
*/
|
| 48 |
-
public function toArray() {
|
| 49 |
-
$music = Mage::helper('clipgenerator')->getMusic();
|
| 50 |
-
$musicArr = array();
|
| 51 |
-
$musicArr[0] = '';
|
| 52 |
-
foreach ($music as $v) {
|
| 53 |
-
$musicArr[$v['id']] = $v['title'];
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
return $musicArr;
|
| 57 |
-
}
|
| 58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Model/Mysql4/Setup.php
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Setup File
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Model_Mysql4_Setup
|
| 21 |
-
* @package Trivid
|
| 22 |
-
*/
|
| 23 |
-
class Trivid_Clipgenerator_Model_Mysql4_Setup extends Mage_Catalog_Model_Resource_Eav_Mysql4_Setup {
|
| 24 |
-
|
| 25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Model/Observer.php
DELETED
|
@@ -1,83 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Module Observer
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Model_Observer
|
| 21 |
-
*
|
| 22 |
-
* @package Trivid
|
| 23 |
-
*/
|
| 24 |
-
class Trivid_Clipgenerator_Model_Observer {
|
| 25 |
-
/**
|
| 26 |
-
* module name
|
| 27 |
-
*/
|
| 28 |
-
const MODULE_NAME = 'Trivid_Clipgenerator';
|
| 29 |
-
|
| 30 |
-
/**
|
| 31 |
-
* Creates or updates video after saving new product information
|
| 32 |
-
* @param Varien_Event_Observer $observer
|
| 33 |
-
*/
|
| 34 |
-
public function catalog_product_save_after(Varien_Event_Observer $observer) {
|
| 35 |
-
$_product = $observer->getProduct();
|
| 36 |
-
Mage::helper('clipgenerator')->createVideo($_product);
|
| 37 |
-
}
|
| 38 |
-
|
| 39 |
-
/**
|
| 40 |
-
* Inserts the video block html after the product description if activated in
|
| 41 |
-
* the magento clipgenerator configuration.
|
| 42 |
-
* @param Varien_Event_Observer $observer
|
| 43 |
-
* @return $this
|
| 44 |
-
*/
|
| 45 |
-
public function insertVideo(Varien_Event_Observer $observer = NULL) {
|
| 46 |
-
if (!$observer) {
|
| 47 |
-
return;
|
| 48 |
-
}
|
| 49 |
-
$block = Mage::getStoreConfig('clipgenerator/settings/clipgenerator_block', Mage::app()->getStore());
|
| 50 |
-
$currentBlock = $observer->getEvent()->getBlock()->getNameInLayout();
|
| 51 |
-
if (($block == $currentBlock || ($block == '' && 'product.description' == $currentBlock)) && Mage::getStoreConfig('clipgenerator/settings/clipgenerator_output', Mage::app()->getStore())) {
|
| 52 |
-
if (!Mage::getStoreConfig('advanced/modules_disable_output/' . self::MODULE_NAME) && Mage::helper('clipgenerator')->getUser() && $observer->getEvent()->getBlock()->getProduct()->getData('clipgenerator_video_id') && $observer->getEvent()->getBlock()->getProduct()->getData('clipgenerator_show')) {
|
| 53 |
-
$event = $observer->getEvent();
|
| 54 |
-
$product = $event->getProduct();
|
| 55 |
-
$transport = $observer->getEvent()->getTransport();
|
| 56 |
-
$block = new Trivid_Clipgenerator_Block_InsertVideo($event->getBlock()->getProduct()->getData('clipgenerator_video_id'), $event->getBlock()->getProduct()->getData('clipgenerator_show'));
|
| 57 |
-
$block->setPassingTransport($transport['html']);
|
| 58 |
-
$block->toHtml();
|
| 59 |
-
}
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
return $this;
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
/**
|
| 66 |
-
* Creates mass action options to the product list dropdown
|
| 67 |
-
* and sets the url which will be called after choosing the action.
|
| 68 |
-
* @param $observer
|
| 69 |
-
*/
|
| 70 |
-
public function addMassAction($observer) {
|
| 71 |
-
$block = $observer->getEvent()->getBlock();
|
| 72 |
-
if (Mage::helper('clipgenerator')->getUser() && get_class($block) == 'Mage_Adminhtml_Block_Widget_Grid_Massaction' && $block->getRequest()->getControllerName() == 'catalog_product') {
|
| 73 |
-
$block->addItem('video_activate', array(
|
| 74 |
-
'label' => Mage::helper('clipgenerator')->__('Videos aktivieren'),
|
| 75 |
-
'url' => Mage::helper("adminhtml")->getUrl("clipgenerator/adminhtml_mass/activate"),
|
| 76 |
-
));
|
| 77 |
-
$block->addItem('video_deactivate', array(
|
| 78 |
-
'label' => Mage::helper('clipgenerator')->__('Videos deaktivieren'),
|
| 79 |
-
'url' => Mage::helper("adminhtml")->getUrl("clipgenerator/adminhtml_mass/deactivate"),
|
| 80 |
-
));
|
| 81 |
-
}
|
| 82 |
-
}
|
| 83 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Model/Source/Designs.php
DELETED
|
@@ -1,41 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Design Source
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Model_Source_Designs
|
| 21 |
-
* @package Trivid
|
| 22 |
-
*/
|
| 23 |
-
class Trivid_Clipgenerator_Model_Source_Designs extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 24 |
-
|
| 25 |
-
/**
|
| 26 |
-
* Get all options of the clipgenerator designs.
|
| 27 |
-
* @return array
|
| 28 |
-
*/
|
| 29 |
-
public function getAllOptions() {
|
| 30 |
-
$designs = Mage::helper('clipgenerator')->getDesigns();
|
| 31 |
-
$designArr = array();
|
| 32 |
-
foreach ($designs as $k => $v) {
|
| 33 |
-
$designArr[] = array(
|
| 34 |
-
'value' => $v['id'],
|
| 35 |
-
'label' => $v['title']
|
| 36 |
-
);
|
| 37 |
-
}
|
| 38 |
-
|
| 39 |
-
return $designArr;
|
| 40 |
-
}
|
| 41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/Model/Source/Musics.php
DELETED
|
@@ -1,41 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Music Source
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Model_Source_Musics
|
| 21 |
-
* @package Trivid
|
| 22 |
-
*/
|
| 23 |
-
class Trivid_Clipgenerator_Model_Source_Musics extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 24 |
-
|
| 25 |
-
/**
|
| 26 |
-
* Get all music options as array.
|
| 27 |
-
* @return array
|
| 28 |
-
*/
|
| 29 |
-
public function getAllOptions() {
|
| 30 |
-
$music = Mage::helper('clipgenerator')->getMusic();
|
| 31 |
-
$musicArr = array();
|
| 32 |
-
foreach ($music['songs'] as $k => $v) {
|
| 33 |
-
$musicArr[] = array(
|
| 34 |
-
'value' => $v['id'],
|
| 35 |
-
'label' => $v['title']
|
| 36 |
-
);
|
| 37 |
-
}
|
| 38 |
-
|
| 39 |
-
return $musicArr;
|
| 40 |
-
}
|
| 41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/controllers/Adminhtml/MassController.php
DELETED
|
@@ -1,72 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Adminhtml Mass Controller
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Adminhtml_MassController
|
| 21 |
-
*
|
| 22 |
-
* catches mass instruction to activate or deactivate at least 10 product
|
| 23 |
-
* videos. After success the methods will return to list view.
|
| 24 |
-
* @package Trivid
|
| 25 |
-
*/
|
| 26 |
-
class Trivid_Clipgenerator_Adminhtml_MassController extends Mage_Adminhtml_Controller_Action {
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* array of send products to mass controller.
|
| 30 |
-
* @var array $products
|
| 31 |
-
*/
|
| 32 |
-
protected $products;
|
| 33 |
-
|
| 34 |
-
/**
|
| 35 |
-
* initializes the class, checks if the count of the given products
|
| 36 |
-
* is higher than the expected size of 10 and throws an error if
|
| 37 |
-
* happens.
|
| 38 |
-
*
|
| 39 |
-
* @return void
|
| 40 |
-
*/
|
| 41 |
-
protected function init() {
|
| 42 |
-
$this->products = $this->getRequest()->getParam('product');
|
| 43 |
-
if (count($this->products) > 10) {
|
| 44 |
-
Mage::getSingleton('core/session')->addError(Mage::helper('clipgenerator')->__('Sie können maximal 10 Produkte gleichzeitig verarbeiten.'));
|
| 45 |
-
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/index'));
|
| 46 |
-
}
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
/**
|
| 50 |
-
* activates the given products by calling the clipgenerator helper
|
| 51 |
-
* which handle the activation request.
|
| 52 |
-
*
|
| 53 |
-
* @return void
|
| 54 |
-
*/
|
| 55 |
-
public function activateAction() {
|
| 56 |
-
$this->init();
|
| 57 |
-
Mage::helper('clipgenerator')->activateVideos($this->products);
|
| 58 |
-
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/index'));
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
/**
|
| 62 |
-
* deactivates the given products by calling the clipgenerator helper
|
| 63 |
-
* which handle the deactivation request.
|
| 64 |
-
*
|
| 65 |
-
* @return void
|
| 66 |
-
*/
|
| 67 |
-
public function deactivateAction() {
|
| 68 |
-
$this->init();
|
| 69 |
-
Mage::helper('clipgenerator')->deactivateVideos($this->products);
|
| 70 |
-
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/index'));
|
| 71 |
-
}
|
| 72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/controllers/Adminhtml/OrderformController.php
DELETED
|
@@ -1,48 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Orderform Controller
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Class Trivid_Clipgenerator_Adminhtml_OrderformController
|
| 21 |
-
*
|
| 22 |
-
* Handles the orderform view and request.
|
| 23 |
-
* @package Trivid
|
| 24 |
-
*/
|
| 25 |
-
class Trivid_Clipgenerator_Adminhtml_OrderformController extends Mage_Adminhtml_Controller_Action {
|
| 26 |
-
/**
|
| 27 |
-
* User get the orderform if the api
|
| 28 |
-
* credentials not set anyway. On submitting the form to Trivid order web-
|
| 29 |
-
* service it receives the result via ajax and sets the return to the
|
| 30 |
-
* magento configuration.
|
| 31 |
-
* @return void
|
| 32 |
-
*/
|
| 33 |
-
public function indexAction() {
|
| 34 |
-
$post = $this->getRequest()->getPost();
|
| 35 |
-
if($post['isAjax']) {
|
| 36 |
-
if($post['apiUser'] && $post['apiSecret']) {
|
| 37 |
-
$response_array['status'] = 'success';
|
| 38 |
-
echo json_encode($response_array);
|
| 39 |
-
Mage::getModel('core/config')->saveConfig('clipgenerator/general/clipgenerator_api_user_id', $post['apiUser']);
|
| 40 |
-
Mage::getModel('core/config')->saveConfig('clipgenerator/general/clipgenerator_api_secret', $post['apiSecret']);
|
| 41 |
-
Mage::getModel('core/config')->saveConfig('clipgenerator/general/clipgenerator_email', $post['email']);
|
| 42 |
-
Mage::getSingleton('core/session')->addSuccess(Mage::helper('clipgenerator')->__('Die Bestellung war erfolgreich!'));
|
| 43 |
-
}
|
| 44 |
-
die();
|
| 45 |
-
}
|
| 46 |
-
$this->loadLayout()->renderLayout();
|
| 47 |
-
}
|
| 48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/etc/adminhtml.xml
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
</config>
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Trivid_Clipgenerator>
|
| 5 |
-
<version>1.0.
|
| 6 |
</Trivid_Clipgenerator>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Trivid_Clipgenerator>
|
| 5 |
+
<version>1.0.7</version>
|
| 6 |
</Trivid_Clipgenerator>
|
| 7 |
</modules>
|
| 8 |
<global>
|
app/code/community/Trivid/Clipgenerator/etc/system.xml
DELETED
|
@@ -1,137 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
<sections>
|
| 4 |
-
<clipgenerator translate="label" module="clipgenerator">
|
| 5 |
-
<label>Clipgenerator Optionen</label>
|
| 6 |
-
<tab>general</tab>
|
| 7 |
-
<sort_order>90</sort_order>
|
| 8 |
-
<show_in_default>1</show_in_default>
|
| 9 |
-
<show_in_website>1</show_in_website>
|
| 10 |
-
<show_in_store>1</show_in_store>
|
| 11 |
-
<groups>
|
| 12 |
-
<general translate="label">
|
| 13 |
-
<label>General</label>
|
| 14 |
-
<sort_order>1</sort_order>
|
| 15 |
-
<show_in_default>1</show_in_default>
|
| 16 |
-
<show_in_website>1</show_in_website>
|
| 17 |
-
<show_in_store>1</show_in_store>
|
| 18 |
-
<fields>
|
| 19 |
-
<clipgenerator_contingent_view translate="label">
|
| 20 |
-
<label>Kontingentsanzeige</label>
|
| 21 |
-
<frontend_type>label</frontend_type>
|
| 22 |
-
<frontend_model>trivid_clipgenerator_block_adminhtml_system_config_form_field_contingentlabel</frontend_model>
|
| 23 |
-
<sort_order>1</sort_order>
|
| 24 |
-
<show_in_default>1</show_in_default>
|
| 25 |
-
<show_in_website>1</show_in_website>
|
| 26 |
-
<show_in_store>1</show_in_store>
|
| 27 |
-
</clipgenerator_contingent_view>
|
| 28 |
-
<clipgenerator_email translate="label">
|
| 29 |
-
<label>E-Mail</label>
|
| 30 |
-
<frontend_type>text</frontend_type>
|
| 31 |
-
<sort_order>10</sort_order>
|
| 32 |
-
<show_in_default>1</show_in_default>
|
| 33 |
-
<show_in_website>1</show_in_website>
|
| 34 |
-
<show_in_store>1</show_in_store>
|
| 35 |
-
</clipgenerator_email>
|
| 36 |
-
<clipgenerator_api_user_id translate="label">
|
| 37 |
-
<label>API USER ID</label>
|
| 38 |
-
<frontend_type>text</frontend_type>
|
| 39 |
-
<sort_order>20</sort_order>
|
| 40 |
-
<show_in_default>1</show_in_default>
|
| 41 |
-
<show_in_website>1</show_in_website>
|
| 42 |
-
<show_in_store>1</show_in_store>
|
| 43 |
-
</clipgenerator_api_user_id>
|
| 44 |
-
<clipgenerator_api_secret translate="label">
|
| 45 |
-
<label>API SECRET</label>
|
| 46 |
-
<frontend_type>text</frontend_type>
|
| 47 |
-
<sort_order>30</sort_order>
|
| 48 |
-
<show_in_default>1</show_in_default>
|
| 49 |
-
<show_in_website>1</show_in_website>
|
| 50 |
-
<show_in_store>1</show_in_store>
|
| 51 |
-
</clipgenerator_api_secret>
|
| 52 |
-
</fields>
|
| 53 |
-
</general>
|
| 54 |
-
<settings translate="label">
|
| 55 |
-
<label>Standard Settings</label>
|
| 56 |
-
<sort_order>2</sort_order>
|
| 57 |
-
<show_in_default>1</show_in_default>
|
| 58 |
-
<show_in_website>1</show_in_website>
|
| 59 |
-
<show_in_store>1</show_in_store>
|
| 60 |
-
<fields>
|
| 61 |
-
<!-- <clipgenerator_song>
|
| 62 |
-
<label>Song</label>
|
| 63 |
-
<frontend_type>select</frontend_type>
|
| 64 |
-
<source_model>trivid_clipgenerator_model_adminhtml_system_config_source_musics</source_model>
|
| 65 |
-
<sort_order>1</sort_order>
|
| 66 |
-
<show_in_default>1</show_in_default>
|
| 67 |
-
<show_in_website>1</show_in_website>
|
| 68 |
-
<show_in_store>1</show_in_store>
|
| 69 |
-
</clipgenerator_song>
|
| 70 |
-
<clipgenerator_music translate="label">
|
| 71 |
-
<label>erweiterte Song Auswahl</label>
|
| 72 |
-
<frontend_type>text</frontend_type>
|
| 73 |
-
<frontend_model>trivid_clipgenerator_block_adminhtml_system_config_form_field_musiclightbox</frontend_model>
|
| 74 |
-
<sort_order>10</sort_order>
|
| 75 |
-
<show_in_default>1</show_in_default>
|
| 76 |
-
<show_in_website>1</show_in_website>
|
| 77 |
-
<show_in_store>1</show_in_store>
|
| 78 |
-
</clipgenerator_music>
|
| 79 |
-
<clipgenerator_video_design translate="label">
|
| 80 |
-
<label>Video Design</label>
|
| 81 |
-
<frontend_type>select</frontend_type>
|
| 82 |
-
<source_model>trivid_clipgenerator_model_adminhtml_system_config_source_designs</source_model>
|
| 83 |
-
<sort_order>20</sort_order>
|
| 84 |
-
<show_in_default>1</show_in_default>
|
| 85 |
-
<show_in_website>1</show_in_website>
|
| 86 |
-
<show_in_store>1</show_in_store>
|
| 87 |
-
</clipgenerator_video_design>-->
|
| 88 |
-
<clipgenerator_logo_url translate="label">
|
| 89 |
-
<label>Logo URL</label>
|
| 90 |
-
<frontend_type>text</frontend_type>
|
| 91 |
-
<comment><![CDATA[(Für optimale Darstellung bitte nur freigestellte Logos im PNG-Format verwenden. Maximale Größe 100 x 100 Pixel.)]]></comment>
|
| 92 |
-
<sort_order>30</sort_order>
|
| 93 |
-
<show_in_default>1</show_in_default>
|
| 94 |
-
<show_in_website>1</show_in_website>
|
| 95 |
-
<show_in_store>1</show_in_store>
|
| 96 |
-
</clipgenerator_logo_url>
|
| 97 |
-
<clipgenerator_logo_link translate="label">
|
| 98 |
-
<label>Logo Link</label>
|
| 99 |
-
<frontend_type>text</frontend_type>
|
| 100 |
-
<comment><![CDATA[(Die Verlinkung Ihres Logos kann hier angegeben werden.)]]></comment>
|
| 101 |
-
<sort_order>35</sort_order>
|
| 102 |
-
<show_in_default>1</show_in_default>
|
| 103 |
-
<show_in_website>1</show_in_website>
|
| 104 |
-
<show_in_store>1</show_in_store>
|
| 105 |
-
</clipgenerator_logo_link>
|
| 106 |
-
<clipgenerator_player_bgcolor translate="label">
|
| 107 |
-
<label>Player Hintergrundfarbe (HEX)</label>
|
| 108 |
-
<frontend_type>text</frontend_type>
|
| 109 |
-
<sort_order>38</sort_order>
|
| 110 |
-
<show_in_default>1</show_in_default>
|
| 111 |
-
<show_in_website>1</show_in_website>
|
| 112 |
-
<show_in_store>1</show_in_store>
|
| 113 |
-
</clipgenerator_player_bgcolor>
|
| 114 |
-
<clipgenerator_output translate="label">
|
| 115 |
-
<label>Automatische Ausgabe</label>
|
| 116 |
-
<frontend_type>select</frontend_type>
|
| 117 |
-
<comment><![CDATA[Das Video wird unter dem Produkt-Beschreibungs Block(product.description) ausgegeben.]]></comment>
|
| 118 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 119 |
-
<sort_order>40</sort_order>
|
| 120 |
-
<show_in_default>1</show_in_default>
|
| 121 |
-
<show_in_website>1</show_in_website>
|
| 122 |
-
<show_in_store>1</show_in_store>
|
| 123 |
-
</clipgenerator_output>
|
| 124 |
-
<clipgenerator_block translate="label">
|
| 125 |
-
<label>Ausgabe Block</label>
|
| 126 |
-
<frontend_type>text</frontend_type>
|
| 127 |
-
<sort_order>50</sort_order>
|
| 128 |
-
<show_in_default>1</show_in_default>
|
| 129 |
-
<show_in_website>1</show_in_website>
|
| 130 |
-
<show_in_store>1</show_in_store>
|
| 131 |
-
</clipgenerator_block>
|
| 132 |
-
</fields>
|
| 133 |
-
</settings>
|
| 134 |
-
</groups>
|
| 135 |
-
</clipgenerator>
|
| 136 |
-
</sections>
|
| 137 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/lib/clipgenerator/ClipgeneratorClient.php
DELETED
|
@@ -1,584 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
// Copyright 2012 Trivid. All Rights Reserved.
|
| 3 |
-
//
|
| 4 |
-
// +---------------------------------------------------------------------------+
|
| 5 |
-
// | Clipgenerator PHP 5 Client |
|
| 6 |
-
// +---------------------------------------------------------------------------+
|
| 7 |
-
// | Copyright (c) 2012 Trivid GmbH |
|
| 8 |
-
// | All rights reserved. |
|
| 9 |
-
// | |
|
| 10 |
-
// | Redistribution and use in source and binary forms, with or without |
|
| 11 |
-
// | modification, are permitted provided that the following conditions |
|
| 12 |
-
// | are met: |
|
| 13 |
-
// | |
|
| 14 |
-
// | 1. Redistributions of source code must retain the above copyright |
|
| 15 |
-
// | notice, this list of conditions and the following disclaimer. |
|
| 16 |
-
// | 2. Redistributions in binary form must reproduce the above copyright |
|
| 17 |
-
// | notice, this list of conditions and the following disclaimer in the |
|
| 18 |
-
// | documentation and/or other materials provided with the distribution. |
|
| 19 |
-
// | |
|
| 20 |
-
// | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
|
| 21 |
-
// | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
|
| 22 |
-
// | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
| 23 |
-
// | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
|
| 24 |
-
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
|
| 25 |
-
// | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
| 26 |
-
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
| 27 |
-
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
| 28 |
-
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
| 29 |
-
// | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
| 30 |
-
// +---------------------------------------------------------------------------+
|
| 31 |
-
// | For help with this library, contact s.mueller@trivid.com |
|
| 32 |
-
// +---------------------------------------------------------------------------+
|
| 33 |
-
|
| 34 |
-
class ClipgeneratorClient {
|
| 35 |
-
const PACKAGE_TYPE_EDITOR = 'editor';
|
| 36 |
-
const PACKAGE_TYPE_MUSIC = 'music';
|
| 37 |
-
const PACKAGE_TYPE_DESIGN = 'design';
|
| 38 |
-
|
| 39 |
-
const VIDEO_FORMAT_MP4 = 'mp4';
|
| 40 |
-
const VIDEO_RESOLUTION_400x226 = '400x226';
|
| 41 |
-
const VIDEO_RESOLUTION_640x360 = '640x360';
|
| 42 |
-
|
| 43 |
-
const HTTP_CLIENT_ZEND = 'ZendClient';
|
| 44 |
-
const HTTP_CLIENT_CURL = 'Curl';
|
| 45 |
-
|
| 46 |
-
private $apiId;
|
| 47 |
-
private $apiSecret;
|
| 48 |
-
private $apiURL = 'http://api-v2.clipgenerator.com/';
|
| 49 |
-
private $lang = 'de';
|
| 50 |
-
private $error = null;
|
| 51 |
-
private $errorCode = 0;
|
| 52 |
-
private $debug = false;
|
| 53 |
-
private $debugData = array();
|
| 54 |
-
private $userId = null;
|
| 55 |
-
private $curlCookieFile = null;
|
| 56 |
-
private $callMethod = 'Curl';
|
| 57 |
-
|
| 58 |
-
/**
|
| 59 |
-
* Constructor
|
| 60 |
-
*
|
| 61 |
-
* @return
|
| 62 |
-
*/
|
| 63 |
-
|
| 64 |
-
function __construct($apiId, $apiSecret, $userId=null, $lang='de', $apiURL = null, $curlCookieFile = null)
|
| 65 |
-
{
|
| 66 |
-
$this->apiId = $apiId;
|
| 67 |
-
$this->apiSecret = $apiSecret;
|
| 68 |
-
$this->userId = $userId;
|
| 69 |
-
|
| 70 |
-
if (!is_null($lang)) $this->lang = $lang;
|
| 71 |
-
if (!is_null($apiURL)) $this->apiURL = $apiURL;
|
| 72 |
-
if (!is_null($curlCookieFile)) $this->curlCookieFile = $curlCookieFile;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
/**
|
| 76 |
-
* Sets the language for the current session. All subsequent api calls will return data in the configured language.
|
| 77 |
-
*
|
| 78 |
-
* @param $lang String The language identifier. Supported languages are 'en' for English and 'de' for German
|
| 79 |
-
*/
|
| 80 |
-
public function setLang($lang)
|
| 81 |
-
{
|
| 82 |
-
$this->lang = $lang;
|
| 83 |
-
}
|
| 84 |
-
|
| 85 |
-
/**
|
| 86 |
-
* Configures the user id that is required to identify the user on the clipgenerator backend.
|
| 87 |
-
* Typically this user id will be a hash of a unique user name from the application that uses this api.
|
| 88 |
-
* @param $userId String User id that will uniquely identify the user inside the app.
|
| 89 |
-
*/
|
| 90 |
-
public function setUserId($userId)
|
| 91 |
-
{
|
| 92 |
-
$this->userId = $userId;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
/**
|
| 96 |
-
* Configures the http client that will be used for communication with the backend.
|
| 97 |
-
* The Zend Http Client is used as default.
|
| 98 |
-
*
|
| 99 |
-
* @param $callMethod String One 'ZendClient' or 'Curl'.
|
| 100 |
-
*/
|
| 101 |
-
public function setCallMethod($callMethod)
|
| 102 |
-
{
|
| 103 |
-
if (in_array($callMethod, array('ZendClient', 'Curl')))
|
| 104 |
-
{
|
| 105 |
-
$this->callMethod = $callMethod;
|
| 106 |
-
}
|
| 107 |
-
}
|
| 108 |
-
|
| 109 |
-
/**
|
| 110 |
-
* Lists all videos of the current user
|
| 111 |
-
*
|
| 112 |
-
* @return bool false if error, list of videos otherwise.
|
| 113 |
-
* @todo: this call should be moved to the api and return the corresponding json structure
|
| 114 |
-
*/
|
| 115 |
-
|
| 116 |
-
public function getVideos($videoIdFilter=null) {
|
| 117 |
-
$result = $this->call('getVideos', array(
|
| 118 |
-
'videoIdFilter' => $videoIdFilter
|
| 119 |
-
));
|
| 120 |
-
return $result;
|
| 121 |
-
}
|
| 122 |
-
|
| 123 |
-
/**
|
| 124 |
-
* Loads a video with the $videoId in the current context. If no $videoId is supplied the id of the currently
|
| 125 |
-
* loaded video will be used. In most cases this will reload the currently loaded video and reset all modifications
|
| 126 |
-
* if the video was not saved using saveVideo().
|
| 127 |
-
*
|
| 128 |
-
* @param null $videoId String The id of the video that should be loaded in the current context.
|
| 129 |
-
* If no $videoId is null the videoId of the current context will be used.
|
| 130 |
-
*
|
| 131 |
-
* @return false | xml string of the video webcart xml
|
| 132 |
-
*/
|
| 133 |
-
public function loadVideo($videoId)
|
| 134 |
-
{
|
| 135 |
-
$result = $this->call('loadVideo', array(
|
| 136 |
-
'videoId' => $videoId,
|
| 137 |
-
));
|
| 138 |
-
|
| 139 |
-
if ($result !== false) {
|
| 140 |
-
return $result['video'];
|
| 141 |
-
}
|
| 142 |
-
return false;
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
/**
|
| 146 |
-
* Reads downloads pf the $videoId in the current context. If no $videoId is supplied then error.
|
| 147 |
-
*
|
| 148 |
-
* @param null $videoId String The id of the video that should be loaded in the current context.
|
| 149 |
-
* If no $videoId is null the videoId of the current context will be used.
|
| 150 |
-
*
|
| 151 |
-
* @return false | array of downloads with params (status, date, etc.)
|
| 152 |
-
*/
|
| 153 |
-
public function getDownloads($videoId)
|
| 154 |
-
{
|
| 155 |
-
$result = $this->call('getDownloads', array(
|
| 156 |
-
'videoId' => $videoId,
|
| 157 |
-
));
|
| 158 |
-
|
| 159 |
-
if ($result !== false) {
|
| 160 |
-
return $result;
|
| 161 |
-
}
|
| 162 |
-
return false;
|
| 163 |
-
}
|
| 164 |
-
|
| 165 |
-
/**
|
| 166 |
-
* Saves the current video configuration on the clipgenerator backend. If no $videoId is supplied the backend
|
| 167 |
-
* will save the video as a new video using a new video id.
|
| 168 |
-
* Note: Saving a new video will increase the available video slots for the current user.
|
| 169 |
-
* @param null $videoId String Optional video id of an existing video that should be overwritten.
|
| 170 |
-
* @return false if the call failed, videoId: string if the call succeeded
|
| 171 |
-
* @todo fix the result handling
|
| 172 |
-
*/
|
| 173 |
-
|
| 174 |
-
public function saveVideo($videoXmlString, $temporary = false)
|
| 175 |
-
{
|
| 176 |
-
$result = $this->call('saveVideo', array(
|
| 177 |
-
'video' => $videoXmlString,
|
| 178 |
-
'temporary' => $temporary ? 'true' : 'false',
|
| 179 |
-
)
|
| 180 |
-
);
|
| 181 |
-
|
| 182 |
-
if ($result !== false) {
|
| 183 |
-
$newVideoId = $result['id'];
|
| 184 |
-
return $newVideoId;
|
| 185 |
-
}
|
| 186 |
-
return false;
|
| 187 |
-
}
|
| 188 |
-
|
| 189 |
-
/**
|
| 190 |
-
* Deletes a video from the users video list.
|
| 191 |
-
* @param $videoId array Array of string ids of the videos that should be deleted.
|
| 192 |
-
* @return bool
|
| 193 |
-
* @todo barely tested.
|
| 194 |
-
* @todo add ids of the successfully deleted video to the response
|
| 195 |
-
*/
|
| 196 |
-
public function deleteVideo($videoId)
|
| 197 |
-
{
|
| 198 |
-
$result = $this->call('deleteVideo', array('videoId' => $videoId));
|
| 199 |
-
return $result !== false ? true : false;
|
| 200 |
-
}
|
| 201 |
-
|
| 202 |
-
/**
|
| 203 |
-
* Uploads a local image file to the clipgenerator backend. The picture will be converted to
|
| 204 |
-
* different resolutions and an result array with an unique picture identifier and link will
|
| 205 |
-
* be returned.
|
| 206 |
-
* @param $filePath
|
| 207 |
-
* @return array|bool
|
| 208 |
-
* @todo move getting the file information to the backend
|
| 209 |
-
*/
|
| 210 |
-
public function uploadPicture($filePath, $forceNewId=true)
|
| 211 |
-
{
|
| 212 |
-
if(strpos($filePath, "http://") !== false)
|
| 213 |
-
$result = $this->call('uploadPicture', array('forceNewId' => $forceNewId, 'pictureUrl' => $filePath));
|
| 214 |
-
else
|
| 215 |
-
$result = $this->call('uploadPicture', array('forceNewId' => $forceNewId), $filePath);
|
| 216 |
-
return $result;
|
| 217 |
-
}
|
| 218 |
-
|
| 219 |
-
public function uploadLogo($filePath, $forceNewId=true)
|
| 220 |
-
{
|
| 221 |
-
if(strpos($filePath, "http://") !== false)
|
| 222 |
-
$result = $this->call('uploadPicture', array('forceNewId' => $forceNewId, 'logoUrl' => $filePath));
|
| 223 |
-
else
|
| 224 |
-
$result = $this->call('uploadPicture', array('forceNewId' => $forceNewId), $filePath);
|
| 225 |
-
return $result;
|
| 226 |
-
}
|
| 227 |
-
|
| 228 |
-
/**
|
| 229 |
-
* Uploads a local mp3 file to the clipgenerator backend. An unique resource identifier and link will
|
| 230 |
-
* be returned.
|
| 231 |
-
* @param $filePath
|
| 232 |
-
* @return array|bool
|
| 233 |
-
* @todo move getting the file information to the backend
|
| 234 |
-
*/
|
| 235 |
-
public function uploadMusic($filePath, $forceNewId=true)
|
| 236 |
-
{
|
| 237 |
-
$result = $this->call('uploadMusic', array('forceNewId' => $forceNewId), $filePath);
|
| 238 |
-
return $result;
|
| 239 |
-
}
|
| 240 |
-
|
| 241 |
-
/**
|
| 242 |
-
* Lists all pictures of the current user including their additional information.
|
| 243 |
-
* @throws Exception
|
| 244 |
-
* @todo implement this call in the backend.
|
| 245 |
-
* note: this call has the same name as an existing call. The existing call should be replaced by this call.
|
| 246 |
-
*/
|
| 247 |
-
|
| 248 |
-
public function getPictures() {
|
| 249 |
-
throw new Exception('Not implemented yet: getPictures');
|
| 250 |
-
}
|
| 251 |
-
|
| 252 |
-
/**
|
| 253 |
-
* Deletes uploaded pictures on the clipgenerator backend.
|
| 254 |
-
* @param $pictureIds Array Array of picture ids that should be deleted.
|
| 255 |
-
* @throws Exception
|
| 256 |
-
* @todo implement this call in the backend.
|
| 257 |
-
*/
|
| 258 |
-
public function deletePictures($pictureIds) {
|
| 259 |
-
throw new Exception('Not implemented yet: getPictures');
|
| 260 |
-
}
|
| 261 |
-
|
| 262 |
-
/**
|
| 263 |
-
* Lists all available video designs.
|
| 264 |
-
* @todo rename the server api call from getVideoDesign to getDesigns
|
| 265 |
-
* @todo not well tested yet
|
| 266 |
-
*/
|
| 267 |
-
public function getDesigns()
|
| 268 |
-
{
|
| 269 |
-
$result = $this->call('getDesigns');
|
| 270 |
-
return $result;
|
| 271 |
-
}
|
| 272 |
-
|
| 273 |
-
/**
|
| 274 |
-
* Get packages, genres and songs lists. With filtering by package and genre ids if set
|
| 275 |
-
* @param package int (0,+)
|
| 276 |
-
* @param genre int (0,+)
|
| 277 |
-
*
|
| 278 |
-
* @return bool false if error, arrays of packages, genres, songs
|
| 279 |
-
* @TODO: rename the call in the backend to get
|
| 280 |
-
* @TODO: later. implement filters on the backend for.
|
| 281 |
-
* @TODO: package=x, only shows data for package x
|
| 282 |
-
* @TODO: mood=x, only shows data for mood x
|
| 283 |
-
* @TODO: speed=x, only shows data for speed x
|
| 284 |
-
* @TODO: genre=x, only shows data for genre x
|
| 285 |
-
* @TODO: song=x, only shows data for song x
|
| 286 |
-
* @TODO: include_songs=true, if false songs will be ommited
|
| 287 |
-
* @TODO: all filters should be combinable so package=x + mood=y would only return data that matches package x AND mood y
|
| 288 |
-
*/
|
| 289 |
-
public function getMusic($purchasedOnly=false)
|
| 290 |
-
{
|
| 291 |
-
$result = $this->call('getMusic', array(
|
| 292 |
-
'purchasedOnly' => $purchasedOnly
|
| 293 |
-
));
|
| 294 |
-
return $result;
|
| 295 |
-
}
|
| 296 |
-
|
| 297 |
-
/**
|
| 298 |
-
*
|
| 299 |
-
* @param $user
|
| 300 |
-
* @return bool
|
| 301 |
-
*/
|
| 302 |
-
public function createUser($userId, $email, $password, $firstName='', $lastName='', $company='',
|
| 303 |
-
$street='', $zipCode='', $city='', $country='', $isActive='true',
|
| 304 |
-
$vatId='')
|
| 305 |
-
{
|
| 306 |
-
$result = $this->call('createUser', array(
|
| 307 |
-
"userId" => $userId,
|
| 308 |
-
"email" => $email,
|
| 309 |
-
"password" => $password,
|
| 310 |
-
"firstName" => $firstName,
|
| 311 |
-
"lastName" => $lastName,
|
| 312 |
-
"company" => $company,
|
| 313 |
-
"street" => $street,
|
| 314 |
-
"zipCode" => $zipCode,
|
| 315 |
-
"city" => $city,
|
| 316 |
-
"country" => $country,
|
| 317 |
-
"isActive" => $isActive,
|
| 318 |
-
"vatId" => $vatId
|
| 319 |
-
));
|
| 320 |
-
return $result !== false;
|
| 321 |
-
}
|
| 322 |
-
|
| 323 |
-
/**
|
| 324 |
-
* Get account current user information (based on $this->userId)
|
| 325 |
-
*
|
| 326 |
-
* @return array
|
| 327 |
-
*/
|
| 328 |
-
public function getUser()
|
| 329 |
-
{
|
| 330 |
-
$user = $this->call('getUser');
|
| 331 |
-
return $user;
|
| 332 |
-
}
|
| 333 |
-
|
| 334 |
-
public function getUserList()
|
| 335 |
-
{
|
| 336 |
-
$userList = $this->call('getUserList');
|
| 337 |
-
return $userList;
|
| 338 |
-
}
|
| 339 |
-
|
| 340 |
-
/**
|
| 341 |
-
* Delete user information
|
| 342 |
-
*
|
| 343 |
-
* @return bool
|
| 344 |
-
*/
|
| 345 |
-
public function deleteUser()
|
| 346 |
-
{
|
| 347 |
-
$result = $this->call('deleteUser');
|
| 348 |
-
return $result !== false ? true : false;
|
| 349 |
-
}
|
| 350 |
-
|
| 351 |
-
/**
|
| 352 |
-
* @depricated will be replaced by getMusic for music packages and getPlans() for complex application plans
|
| 353 |
-
* @TODO: think this through again
|
| 354 |
-
*/
|
| 355 |
-
public function getPackages()
|
| 356 |
-
{
|
| 357 |
-
$result = $this->call('getPackages');
|
| 358 |
-
return $result;
|
| 359 |
-
}
|
| 360 |
-
|
| 361 |
-
/**
|
| 362 |
-
* Add package to user packages
|
| 363 |
-
* @param packageType string (editor | music)
|
| 364 |
-
* @param packageId int
|
| 365 |
-
* @return bool
|
| 366 |
-
* @depricated will be removed by activateMusicPackage() and activatePlan()
|
| 367 |
-
* @TODO: TBD
|
| 368 |
-
*/
|
| 369 |
-
public function activatePackage($packageType, $packageId)
|
| 370 |
-
{
|
| 371 |
-
$result = $this->call('activatePackage', array(
|
| 372 |
-
'packageType' => $packageType,
|
| 373 |
-
'packageId' => $packageId,
|
| 374 |
-
));
|
| 375 |
-
return $result !== false;
|
| 376 |
-
}
|
| 377 |
-
|
| 378 |
-
public function deactivatePackage($packageType, $packageId)
|
| 379 |
-
{
|
| 380 |
-
$result = $this->call('deactivatePackage', array(
|
| 381 |
-
'packageType' => $packageType,
|
| 382 |
-
'packageId' => $packageId,
|
| 383 |
-
));
|
| 384 |
-
return $result !== false;
|
| 385 |
-
}
|
| 386 |
-
|
| 387 |
-
/**
|
| 388 |
-
*
|
| 389 |
-
* @param $videoId
|
| 390 |
-
* @param $params
|
| 391 |
-
* @return bool
|
| 392 |
-
*/
|
| 393 |
-
|
| 394 |
-
public function scheduleDownloadJob($videoId, $resolution, $format, $playerVersion="")
|
| 395 |
-
{
|
| 396 |
-
$result = $this->call('scheduleDownloadJob', array(
|
| 397 |
-
'videoId' => $videoId,
|
| 398 |
-
'resolution' => $resolution,
|
| 399 |
-
'format' => $format,
|
| 400 |
-
'playerVersion' => $playerVersion
|
| 401 |
-
)
|
| 402 |
-
);
|
| 403 |
-
|
| 404 |
-
if ($result !== false) {
|
| 405 |
-
return $result;
|
| 406 |
-
}
|
| 407 |
-
return false;
|
| 408 |
-
}
|
| 409 |
-
|
| 410 |
-
/**
|
| 411 |
-
* Get list of picture pool services
|
| 412 |
-
*
|
| 413 |
-
* @return bool false if error, array of services names otherwise
|
| 414 |
-
*/
|
| 415 |
-
public function getPicturePoolServices()
|
| 416 |
-
{
|
| 417 |
-
$result = $this->call('getPicturePoolServices');
|
| 418 |
-
return $result !== false ? $result['services'] : false;
|
| 419 |
-
}
|
| 420 |
-
|
| 421 |
-
/**
|
| 422 |
-
* Get list of picture pool service galleries
|
| 423 |
-
* @param service string
|
| 424 |
-
*
|
| 425 |
-
* @return bool false if error, array of galleries names otherwise
|
| 426 |
-
*/
|
| 427 |
-
public function getPicturePoolGalleries($service)
|
| 428 |
-
{
|
| 429 |
-
$result = $this->call('getPicturePoolGalleries', array('service' => $service));
|
| 430 |
-
return $result !== false ? $result['galleries'] : false;
|
| 431 |
-
}
|
| 432 |
-
|
| 433 |
-
/**
|
| 434 |
-
* Get pictures from gallery
|
| 435 |
-
* @param service string
|
| 436 |
-
*
|
| 437 |
-
* @param gallery string
|
| 438 |
-
*
|
| 439 |
-
* @return bool false if error, array of pictures with different formats otherwise
|
| 440 |
-
*/
|
| 441 |
-
public function getPicturePool($service, $gallery)
|
| 442 |
-
{
|
| 443 |
-
$result = $this->call('getPicturePool', array(
|
| 444 |
-
'service' => $service,
|
| 445 |
-
'gallery' => $gallery,
|
| 446 |
-
));
|
| 447 |
-
return $result !== false ? $result['pictures'] : false;
|
| 448 |
-
}
|
| 449 |
-
|
| 450 |
-
/**
|
| 451 |
-
* Get error
|
| 452 |
-
*
|
| 453 |
-
* @return string error.
|
| 454 |
-
*/
|
| 455 |
-
public function getError()
|
| 456 |
-
{
|
| 457 |
-
if (!empty($this->error)) {
|
| 458 |
-
return "({$this->errorCode}) {$this->error}";
|
| 459 |
-
} else {
|
| 460 |
-
return "Unknown error.";
|
| 461 |
-
}
|
| 462 |
-
}
|
| 463 |
-
|
| 464 |
-
/**
|
| 465 |
-
* Enable debug
|
| 466 |
-
*
|
| 467 |
-
*/
|
| 468 |
-
public function enableDebug()
|
| 469 |
-
{
|
| 470 |
-
$this->debug = true;
|
| 471 |
-
}
|
| 472 |
-
|
| 473 |
-
/**
|
| 474 |
-
* Get debug data
|
| 475 |
-
*
|
| 476 |
-
* @return array debug data
|
| 477 |
-
*/
|
| 478 |
-
public function getDebugData()
|
| 479 |
-
{
|
| 480 |
-
return $this->debugData;
|
| 481 |
-
}
|
| 482 |
-
|
| 483 |
-
private function call($controller, $params = array(), $postFilePath = '')
|
| 484 |
-
{
|
| 485 |
-
$url = $this->apiURL . $controller;
|
| 486 |
-
foreach ($params as $key => $value) {
|
| 487 |
-
// todo: remove the json part, it's strange
|
| 488 |
-
if (is_array($value)) $params[$key] = json_encode($value);
|
| 489 |
-
elseif (is_bool($value)) $params[$key] = $value == true ? '1' : '0';
|
| 490 |
-
}
|
| 491 |
-
$postFields = array_merge($params, array(
|
| 492 |
-
'apiId' => $this->apiId,
|
| 493 |
-
'apiSecret' => $this->apiSecret,
|
| 494 |
-
'lang' => $this->lang,
|
| 495 |
-
));
|
| 496 |
-
|
| 497 |
-
if (!is_null($this->userId))
|
| 498 |
-
$postFields['userId'] = $this->userId;
|
| 499 |
-
|
| 500 |
-
if ($this->debug) $this->debugData = array(
|
| 501 |
-
'url' => $url,
|
| 502 |
-
'postFields' => $postFields,
|
| 503 |
-
);
|
| 504 |
-
|
| 505 |
-
switch ($this->callMethod) {
|
| 506 |
-
case 'ZendClient':
|
| 507 |
-
$responce = $this->makeZendClientRequest($url, $postFields, $postFilePath);
|
| 508 |
-
break;
|
| 509 |
-
case 'Curl':
|
| 510 |
-
$responce = $this->makeCurlRequest($url, $postFields, $postFilePath);
|
| 511 |
-
break;
|
| 512 |
-
}
|
| 513 |
-
|
| 514 |
-
$result = json_decode($responce, true);
|
| 515 |
-
|
| 516 |
-
if (is_null($result)) {
|
| 517 |
-
$e = json_last_error();
|
| 518 |
-
$this->error = 'JSON ERROR: '.$e;
|
| 519 |
-
if ($e == JSON_ERROR_SYNTAX) {
|
| 520 |
-
$len = strlen($responce);
|
| 521 |
-
$this->error = "JSON_ERROR_SYNTAX " .$len;
|
| 522 |
-
}
|
| 523 |
-
return false;
|
| 524 |
-
}
|
| 525 |
-
|
| 526 |
-
if ($this->debug) $this->debugData['result'] = $result;
|
| 527 |
-
if ($result['code'] != 200) {
|
| 528 |
-
$this->error = isset($result['message']) ? $result['message'] : 'Unknown error.';
|
| 529 |
-
$this->errorCode = isset($result['code']) ? (int) $result['code'] : -1;
|
| 530 |
-
return false;
|
| 531 |
-
}
|
| 532 |
-
$this->error = null;
|
| 533 |
-
return isset($result['result']) ? $result['result'] : array();
|
| 534 |
-
}
|
| 535 |
-
|
| 536 |
-
private function makeCurlRequest($url, $postFields, $postFilePath = '')
|
| 537 |
-
{
|
| 538 |
-
if ($postFilePath != '') $postFields['postFile']='@'.$postFilePath;
|
| 539 |
-
|
| 540 |
-
$ch = curl_init($url);
|
| 541 |
-
curl_setopt_array($ch, array(
|
| 542 |
-
CURLOPT_HEADER => false,
|
| 543 |
-
CURLOPT_RETURNTRANSFER => true,
|
| 544 |
-
CURLOPT_POST => true,
|
| 545 |
-
CURLOPT_POSTFIELDS => $postFields,
|
| 546 |
-
));
|
| 547 |
-
if (!is_null($this->curlCookieFile)) {
|
| 548 |
-
curl_setopt($ch, CURLOPT_COOKIEFILE, $this->curlCookieFile);
|
| 549 |
-
curl_setopt($ch, CURLOPT_COOKIEJAR, $this->curlCookieFile);
|
| 550 |
-
}
|
| 551 |
-
try {
|
| 552 |
-
$responce = curl_exec($ch);
|
| 553 |
-
} catch (Exception $e) {
|
| 554 |
-
$this->error = 'connection error';
|
| 555 |
-
if ($this->debug) $this->debugData['error'] = $e->getMessage();
|
| 556 |
-
return false;
|
| 557 |
-
}
|
| 558 |
-
if ($this->debug) $this->debugData['response'] = $responce;
|
| 559 |
-
curl_close($ch);
|
| 560 |
-
if (!$responce) {
|
| 561 |
-
$this->error = 'connection error';
|
| 562 |
-
if ($this->debug) $this->debugData['error'] .= ' curl_exec returns false';
|
| 563 |
-
return false;
|
| 564 |
-
}
|
| 565 |
-
return $responce;
|
| 566 |
-
}
|
| 567 |
-
|
| 568 |
-
private function makeZendClientRequest($url, $postFields, $postFilePath = '')
|
| 569 |
-
{
|
| 570 |
-
$client = new Zend_Http_Client($url);
|
| 571 |
-
$client->setCookieJar();
|
| 572 |
-
$client->setParameterPost($postFields);
|
| 573 |
-
if ($postFilePath != '') $client->setFileUpload($postFilePath, basename($postFilePath));
|
| 574 |
-
try {
|
| 575 |
-
$response = $client->request('POST');
|
| 576 |
-
} catch (Zend_Http_Client_Adapter_Exception $e) {
|
| 577 |
-
$this->error = 'connection error';
|
| 578 |
-
if ($this->debug) $this->debugData['error'] = $e->getMessage();
|
| 579 |
-
return false;
|
| 580 |
-
}
|
| 581 |
-
if ($this->debug) $this->debugData['response'] = $response->getBody();
|
| 582 |
-
return $response->getBody();
|
| 583 |
-
}
|
| 584 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/lib/clipgenerator/Frame.php
DELETED
|
@@ -1,89 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Frame {
|
| 4 |
-
public $number = 0;
|
| 5 |
-
public $picture;
|
| 6 |
-
public $lowerThirds = array();
|
| 7 |
-
public $backgroundColor = null;
|
| 8 |
-
public $backgroundPicture = null;
|
| 9 |
-
|
| 10 |
-
function __construct(Picture $picture=null, $number=0) {
|
| 11 |
-
$this->picture = $picture;
|
| 12 |
-
$this->number = 0;
|
| 13 |
-
}
|
| 14 |
-
|
| 15 |
-
public static function withLowerThird(Picture $picture, LowerThird $lowerThird, $number = 0) {
|
| 16 |
-
$frame = new Frame($picture, $number);
|
| 17 |
-
$frame->addLowerThird($lowerThird);
|
| 18 |
-
return $frame;
|
| 19 |
-
}
|
| 20 |
-
|
| 21 |
-
public function addLowerThird(LowerThird $lowerThird) {
|
| 22 |
-
array_push($this->lowerThirds, $lowerThird);
|
| 23 |
-
}
|
| 24 |
-
|
| 25 |
-
public function getLowerThirds() {
|
| 26 |
-
return $this->lowerThirds;
|
| 27 |
-
}
|
| 28 |
-
|
| 29 |
-
public function clearLowerThirds() {
|
| 30 |
-
$this->lowerThirds = array();
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
-
public static function fromXml($xmlString) {
|
| 34 |
-
$frameElement = new SimpleXMLElement($xmlString);
|
| 35 |
-
$frame = new Frame();
|
| 36 |
-
$frame->number = (string) $frameElement->number;
|
| 37 |
-
$frame->backgroundColor = $frameElement->background ? (string)$frameElement->background->color : null;
|
| 38 |
-
$pictureXmlString = $frameElement->picture->asXml();
|
| 39 |
-
if (!empty($pictureXmlString)) {
|
| 40 |
-
$frame->picture = Picture::fromXml($pictureXmlString);
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
if($frameElement->lowerThirds && $frameElement->lowerThirds->count() > 0) {
|
| 44 |
-
foreach ($frameElement->lowerThirds->lowerThird as $lowerThirdElement) {
|
| 45 |
-
$lowerThirdString = $lowerThirdElement->asXml();
|
| 46 |
-
$lowerThird = LowerThird::fromXml($lowerThirdString);
|
| 47 |
-
$frame->addLowerThird($lowerThird);
|
| 48 |
-
}
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
return $frame;
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
public function asXml() {
|
| 55 |
-
$frame = new SimpleXMLElement('<frame></frame>');
|
| 56 |
-
$frame->addChild('number', $this->number);
|
| 57 |
-
if ($this->backgroundColor) {
|
| 58 |
-
$frame->addChild('background');
|
| 59 |
-
$frame->background->addChild('color', $this->backgroundColor);
|
| 60 |
-
}
|
| 61 |
-
$this->addChildFromString($frame, $this->picture->asXml());
|
| 62 |
-
$lowerThirds = $frame->addChild('lowerThirds');
|
| 63 |
-
foreach($this->lowerThirds as $lowerTrhid) {
|
| 64 |
-
$this->addChildFromString($lowerThirds, $lowerTrhid->asXml());
|
| 65 |
-
}
|
| 66 |
-
return $frame->asXML();
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
private function addChildFromString($parent, $childString) {
|
| 70 |
-
$domparent = dom_import_simplexml($parent);
|
| 71 |
-
$domchild = dom_import_simplexml(new SimpleXMLElement($childString));
|
| 72 |
-
$domchild = $domparent->ownerDocument->importNode($domchild, true);
|
| 73 |
-
$domparent->appendChild($domchild);
|
| 74 |
-
}
|
| 75 |
-
}
|
| 76 |
-
//
|
| 77 |
-
// <frame>
|
| 78 |
-
//<number>0</number>
|
| 79 |
-
//<picture width="1" height="1" alpha="1">
|
| 80 |
-
// <id></id>
|
| 81 |
-
//</picture>
|
| 82 |
-
//<lowerThirds>
|
| 83 |
-
// <lowerThird width="1" height="0.4" horizontalAlign="center" verticalAlign="bottom" alpha="0.7">
|
| 84 |
-
// <color>0</color>
|
| 85 |
-
// <link></link>
|
| 86 |
-
// <text color="16777215" fontSize="31" bold="false" italic="false" underline="false"></text>
|
| 87 |
-
// </lowerThird>
|
| 88 |
-
//</lowerThirds>
|
| 89 |
-
//</frame>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/lib/clipgenerator/Logo.php
DELETED
|
@@ -1,71 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Logo {
|
| 4 |
-
public $id;
|
| 5 |
-
public $width;
|
| 6 |
-
public $height;
|
| 7 |
-
public $alpha;
|
| 8 |
-
public $url;
|
| 9 |
-
public $link;
|
| 10 |
-
public $verticalPosition;
|
| 11 |
-
public $horizontalPosition;
|
| 12 |
-
public $showInStartPage;
|
| 13 |
-
public $showInEndPage;
|
| 14 |
-
public $showInTimeline;
|
| 15 |
-
|
| 16 |
-
public static function fromXml($xmlString) {
|
| 17 |
-
$element = new SimpleXMLElement($xmlString);
|
| 18 |
-
$logo = new Logo();
|
| 19 |
-
$logo->id = (string)$element->id;
|
| 20 |
-
$logo->width = $element['width'];
|
| 21 |
-
$logo->height = $element['height'];
|
| 22 |
-
$logo->alpha = $element['alpha'];
|
| 23 |
-
|
| 24 |
-
$logo->verticalPosition = $element->position['verticalAlign'];
|
| 25 |
-
$logo->horizontalPosition = $element->position['horizontalAlign'];
|
| 26 |
-
|
| 27 |
-
$logo->url = (string) $element->url;
|
| 28 |
-
$logo->link = (string) $element->link;
|
| 29 |
-
$logo->showInEndPage = strtolower((string) $element->showInEndPage ) == 'true' ? true : false;
|
| 30 |
-
$logo->showInStartPage = strtolower((string) $element->showInStartPage) == 'true' ? true : false;
|
| 31 |
-
$logo->showInTimeline = strtolower((string) $element->showInTimeline) == 'true' ? true : false;
|
| 32 |
-
return $logo;
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
public function asXml() {
|
| 36 |
-
$logo = new SimpleXMLElement('<logo></logo>');
|
| 37 |
-
//print_r($logo);
|
| 38 |
-
$logo->id = $this->id;
|
| 39 |
-
$width = (string)$this->width;
|
| 40 |
-
if($width=='') $width = 0;
|
| 41 |
-
$height = (string)$this->height;
|
| 42 |
-
if($height=='') $width = 0;
|
| 43 |
-
if (!is_null($this->width))
|
| 44 |
-
$logo->addAttribute('width', number_format($width, 4, '.', ''));
|
| 45 |
-
if (!is_null($this->height))
|
| 46 |
-
$logo->addAttribute('height', number_format($height, 4, '.', ''));
|
| 47 |
-
$logo->addAttribute('alpha', number_format((string)$this->alpha, 4, '.', ''));
|
| 48 |
-
$logo->url = $this->url;
|
| 49 |
-
$logo->link = $this->link;
|
| 50 |
-
$position = $logo->addChild('position');
|
| 51 |
-
$position->addAttribute('verticalAlign', $this->verticalPosition);
|
| 52 |
-
$position->addAttribute('horizontalAlign', $this->horizontalPosition);
|
| 53 |
-
$logo->addChild('showInStartPage', $this->showInStartPage ? 'true' : 'false');
|
| 54 |
-
$logo->addChild('showInEndPage', $this->showInEndPage ? 'true' : 'false');
|
| 55 |
-
$logo->addChild('showInTimeline', $this->showInTimeline ? 'true' : 'false');
|
| 56 |
-
$xmlString = $logo->asXML();
|
| 57 |
-
return $xmlString;
|
| 58 |
-
}
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
//<logo width="0.2" height="0.2" alpha="1">
|
| 64 |
-
// <id />
|
| 65 |
-
// <url />
|
| 66 |
-
// <link />
|
| 67 |
-
// <position verticalAlign="top" horizontalAlign="right" />
|
| 68 |
-
// <showInStartPage>false</showInStartPage>
|
| 69 |
-
// <showInEndPage>false</showInEndPage>
|
| 70 |
-
// <showInTimeline>true</showInTimeline>
|
| 71 |
-
//</logo>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/lib/clipgenerator/LowerThird.php
DELETED
|
@@ -1,209 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class LowerThird {
|
| 4 |
-
const ALIGN_LEFT = 'left';
|
| 5 |
-
const ALIGN_CENTER = 'center';
|
| 6 |
-
const ALIGN_RIGHT = 'right';
|
| 7 |
-
const ALIGN_TOP = 'top';
|
| 8 |
-
const ALIGN_MIDDLE = 'middle';
|
| 9 |
-
const ALIGN_BOTTOM = 'bottom';
|
| 10 |
-
|
| 11 |
-
const POSITION_TYPE_ABSOLUTE = 'absolute';
|
| 12 |
-
const POSITION_TYPE_ALIGN = 'align';
|
| 13 |
-
|
| 14 |
-
const COLOR_BLACK = 0x000000;
|
| 15 |
-
const COLOR_RED = 0xFF0000;
|
| 16 |
-
const COLOR_GREEN = 0x00FF00;
|
| 17 |
-
const COLOR_BLUE = 0x0000FF;
|
| 18 |
-
const COLOR_WHITE = 0xFFFFFF;
|
| 19 |
-
|
| 20 |
-
public $width;
|
| 21 |
-
public $height;
|
| 22 |
-
public $margin;
|
| 23 |
-
public $horizontalAlign;
|
| 24 |
-
public $verticalAlign;
|
| 25 |
-
public $alpha;
|
| 26 |
-
public $backgroundColor = LowerThird::COLOR_WHITE;
|
| 27 |
-
public $link = null;
|
| 28 |
-
|
| 29 |
-
public $xPosition = 0; // since 3.0.5
|
| 30 |
-
public $yPosition = 0; // since 3.0.5
|
| 31 |
-
public $positioningType = self::POSITION_TYPE_ALIGN; // since 3.0.5
|
| 32 |
-
|
| 33 |
-
public $text;
|
| 34 |
-
public $textColor;
|
| 35 |
-
public $textFontSize;
|
| 36 |
-
public $textFontFamily; // since 3.0.3
|
| 37 |
-
public $textFontWeight; // since 3.0.3
|
| 38 |
-
public $textFontStyle; // since 3.0.3
|
| 39 |
-
public $textIsBold; // replaced in 3.0.3 with fontWeight
|
| 40 |
-
public $textIsItalic; // replaced in 3.0.3 with fontStyle
|
| 41 |
-
public $textIsUnderline;
|
| 42 |
-
public $textIsHTML;
|
| 43 |
-
|
| 44 |
-
public $textHorizontalAlign = self::ALIGN_CENTER;
|
| 45 |
-
public $textVerticalAlign = self::ALIGN_MIDDLE;
|
| 46 |
-
public $textOutlineColor = LowerThird::COLOR_WHITE;
|
| 47 |
-
public $textOutlineWidth = 0;
|
| 48 |
-
public $textMinFontSize = 30;
|
| 49 |
-
public $textMargin = 0;
|
| 50 |
-
|
| 51 |
-
public $picture_id;
|
| 52 |
-
|
| 53 |
-
public $picture_width;
|
| 54 |
-
public $picture_height;
|
| 55 |
-
public $picture_alpha;
|
| 56 |
-
|
| 57 |
-
public $picture_url;
|
| 58 |
-
public $picture_thumbnailUrl;
|
| 59 |
-
|
| 60 |
-
public $picture_url_240p;
|
| 61 |
-
public $picture_url_360p;
|
| 62 |
-
public $picture_url_480p;
|
| 63 |
-
public $picture_url_720p;
|
| 64 |
-
public $picture_storage;
|
| 65 |
-
|
| 66 |
-
function __construct($width=1.0, $height=0.25, $horizontalAlign = LowerThird::ALIGN_CENTER, $verticalAlign = LowerThird::ALIGN_MIDDLE, $alpha = 0.6)
|
| 67 |
-
{
|
| 68 |
-
// width="0.0-1.0" height="0.0-1.0" horizontalAlign="left|center|right" verticalAlign="top|middle|bottom" alpha="0.0-1.0">
|
| 69 |
-
$this->width = $width;
|
| 70 |
-
$this->height = $height;
|
| 71 |
-
$this->horizontalAlign = $horizontalAlign;
|
| 72 |
-
$this->verticalAlign = $verticalAlign;
|
| 73 |
-
$this->alpha = $alpha;
|
| 74 |
-
$this->picture_url = '';
|
| 75 |
-
|
| 76 |
-
$this->textFontFamily = "cgFontDefault";
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
public function setText($text, $color=LowerThird::COLOR_WHITE, $size=30, $bold=false, $italic=false, $underline=false,
|
| 80 |
-
$horizontalAlign=LowerThird::ALIGN_CENTER, $verticalAlign=LowerThird::ALIGN_MIDDLE) {
|
| 81 |
-
$this->text = $text;
|
| 82 |
-
$this->textColor = $color;
|
| 83 |
-
$this->textFontSize = $size;
|
| 84 |
-
$this->textIsBold = $bold;
|
| 85 |
-
$this->textIsItalic = $italic;
|
| 86 |
-
$this->textIsUnderline = $underline;
|
| 87 |
-
|
| 88 |
-
$this->textFontWeight = $bold ? "bold" : "normal";
|
| 89 |
-
$this->textFontStyle = $italic ? "italic" : "normal";
|
| 90 |
-
|
| 91 |
-
$this->textHorizontalAlign = $horizontalAlign;
|
| 92 |
-
$this->textVerticalAlign = $verticalAlign;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
public static function fromXml($xmlString) {
|
| 96 |
-
$element = new SimpleXMLElement($xmlString);
|
| 97 |
-
|
| 98 |
-
$lowerThird = new LowerThird();
|
| 99 |
-
$lowerThird->alpha = (string)$element['alpha'];
|
| 100 |
-
$lowerThird->width = (string)$element['width'];
|
| 101 |
-
$lowerThird->height = (string)$element['height'];
|
| 102 |
-
$xpos = (string)$element['xPosition'];
|
| 103 |
-
$ypos = (string)$element['yPosition'];
|
| 104 |
-
$lowerThird->xPosition = !empty($xpos) ? floatval($xpos) : 0.0;
|
| 105 |
-
$lowerThird->yPosition = !empty($ypos) ? floatval($ypos) : 0.0;
|
| 106 |
-
$lowerThird->positioningType = (string)$element['positioningType'];
|
| 107 |
-
if ($element['margin']) $lowerThird->margin = (string)$element['margin'];
|
| 108 |
-
$lowerThird->horizontalAlign = (string)$element['horizontalAlign'];
|
| 109 |
-
$lowerThird->verticalAlign = (string)$element['verticalAlign'];
|
| 110 |
-
$lowerThird->backgroundColor = (string)$element->color;
|
| 111 |
-
$lowerThird->text = (string)$element->text;
|
| 112 |
-
$lowerThird->link = (string)$element->link;
|
| 113 |
-
$lowerThird->textColor = (string)$element->text['color'];
|
| 114 |
-
$lowerThird->textFontSize = (string)$element->text['fontSize'];
|
| 115 |
-
if ($element->text['minFontSize']) $lowerThird->textMinFontSize = (string)$element->text['minFontSize'];
|
| 116 |
-
$lowerThird->textIsBold = (string)$element->text['bold'] == 'true' ? true : false;
|
| 117 |
-
$lowerThird->textIsItalic = (string)$element->text['italic'] == 'true' ? true : false;
|
| 118 |
-
$lowerThird->textIsUnderline = (string)$element->text['underline'] == 'true' ? true : false;
|
| 119 |
-
$lowerThird->textIsHTML = (string)$element->text['isHtml'] == 'false' ? false : true;
|
| 120 |
-
|
| 121 |
-
$lowerThird->textHorizontalAlign = (string)$element->text['horizontalAlign'];
|
| 122 |
-
$lowerThird->textVerticalAlign = (string)$element->text['verticalAlign'];
|
| 123 |
-
$lowerThird->textOutlineColor = (string)$element->text['outlineColor'];
|
| 124 |
-
$lowerThird->textOutlineWidth = (string)$element->text['outlineWidth'];
|
| 125 |
-
|
| 126 |
-
$lowerThird->textFontFamily = (string)$element->text['fontFamily'];
|
| 127 |
-
$lowerThird->textFontStyle = (string)$element->text['fontStyle'];
|
| 128 |
-
$lowerThird->textFontWeight = (string)$element->text['fontWeight'];
|
| 129 |
-
|
| 130 |
-
if ($element->text['margin']) $lowerThird->textMargin = (string)$element->text['margin'];
|
| 131 |
-
|
| 132 |
-
if($element->picture){
|
| 133 |
-
$lowerThird->picture_width = (string) $element->picture['width'];
|
| 134 |
-
$lowerThird->picture_height = (string) $element->picture['height'];
|
| 135 |
-
$lowerThird->picture_alpha = (string) $element->picture['alpha'];
|
| 136 |
-
$lowerThird->picture_url = (string) $element->picture->url;
|
| 137 |
-
$lowerThird->picture_thumbnailUrl = (string) $element->picture->thumb_url;
|
| 138 |
-
$lowerThird->picture_url_240p = (string) $element->picture->url_240p;
|
| 139 |
-
$lowerThird->picture_url_360p = (string) $element->picture->url_360p;
|
| 140 |
-
$lowerThird->picture_url_480p = (string) $element->picture->url_480p;
|
| 141 |
-
$lowerThird->picture_url_720p = (string) $element->picture->url_720p;
|
| 142 |
-
$lowerThird->picture_storage = (string) $element->picture->storage;
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
return $lowerThird;
|
| 146 |
-
}
|
| 147 |
-
|
| 148 |
-
public function asXml() {
|
| 149 |
-
$xml = new SimpleXMLElement('<lowerThird></lowerThird>');
|
| 150 |
-
$xml->addAttribute('positioningType', $this->positioningType);
|
| 151 |
-
$xml->addAttribute('xPosition', number_format($this->xPosition, 4, '.', ''));
|
| 152 |
-
$xml->addAttribute('yPosition', number_format($this->yPosition, 4, '.', ''));
|
| 153 |
-
$xml->addAttribute('width', number_format($this->width, 4, '.', ''));
|
| 154 |
-
$xml->addAttribute('height', number_format($this->height, 4, '.', ''));
|
| 155 |
-
$xml->addAttribute('alpha', number_format((float)$this->alpha, 4, '.', ''));
|
| 156 |
-
$xml->addAttribute('margin', number_format($this->margin, 4, '.', ''));
|
| 157 |
-
$xml->addAttribute('horizontalAlign', $this->horizontalAlign);
|
| 158 |
-
$xml->addAttribute('verticalAlign', $this->verticalAlign);
|
| 159 |
-
$xml->addChild('color', $this->backgroundColor);
|
| 160 |
-
$xml->addChild('link', $this->link);
|
| 161 |
-
|
| 162 |
-
$node = $xml->addChild('text'); // fix: add child does not automatically encode ampersands. meh.
|
| 163 |
-
$node = dom_import_simplexml($node);
|
| 164 |
-
$no = $node->ownerDocument;
|
| 165 |
-
$node->appendChild($no->createCDATASection($this->text));
|
| 166 |
-
|
| 167 |
-
$xml->text->addAttribute('color', $this->textColor);
|
| 168 |
-
$xml->text->addAttribute('fontSize', number_format(($this->textFontSize=='')?0:$this->textFontSize, 4, '.', ''));
|
| 169 |
-
$xml->text->addAttribute('minFontSize', number_format(($this->textMinFontSize=='')?0:$this->textMinFontSize, 4, '.', ''));
|
| 170 |
-
$xml->text->addAttribute('bold', $this->textIsBold ? 'true' : 'false');
|
| 171 |
-
$xml->text->addAttribute('italic', $this->textIsItalic ? 'true' : 'false');
|
| 172 |
-
$xml->text->addAttribute('underline', $this->textIsUnderline? 'true' : 'false');
|
| 173 |
-
$xml->text->addAttribute('isHtml', $this->textIsHTML? 'true' : 'false');
|
| 174 |
-
|
| 175 |
-
$xml->text->addAttribute('horizontalAlign', $this->textHorizontalAlign);
|
| 176 |
-
$xml->text->addAttribute('verticalAlign', $this->textVerticalAlign);
|
| 177 |
-
|
| 178 |
-
$xml->text->addAttribute('outlineColor', $this->textOutlineColor);
|
| 179 |
-
$xml->text->addAttribute('outlineWidth', number_format(($this->textOutlineWidth=='')?0:$this->textOutlineWidth, 4, '.', ''));
|
| 180 |
-
$xml->text->addAttribute('margin', number_format(($this->textMargin=='')?0:$this->textMargin, 4, '.', ''));
|
| 181 |
-
|
| 182 |
-
$xml->text->addAttribute('fontFamily', $this->textFontFamily);
|
| 183 |
-
$xml->text->addAttribute('fontWeight', $this->textFontWeight);
|
| 184 |
-
$xml->text->addAttribute('fontStyle', $this->textFontStyle);
|
| 185 |
-
|
| 186 |
-
if($this->picture_id > 0){
|
| 187 |
-
$xml->addChild('picture');
|
| 188 |
-
$xml->picture->addAttribute('width', number_format($this->picture_width, 4, '.', ''));
|
| 189 |
-
$xml->picture->addAttribute('height', number_format($this->picture_height, 4, '.', ''));
|
| 190 |
-
$xml->picture->addAttribute('alpha', number_format((float)$this->picture_alpha, 4, '.', ''));
|
| 191 |
-
$xml->picture->addChild('id', $this->picture_id);
|
| 192 |
-
$xml->picture->addChild('url', $this->picture_url);
|
| 193 |
-
$xml->picture->addChild('url_240p', $this->picture_url_240p);
|
| 194 |
-
$xml->picture->addChild('url_360p', $this->picture_url_360p);
|
| 195 |
-
$xml->picture->addChild('url_480p', $this->picture_url_480p);
|
| 196 |
-
$xml->picture->addChild('url_720p', $this->picture_url_720p);
|
| 197 |
-
$xml->picture->addChild('thumb_url', $this->picture_thumbnailUrl);
|
| 198 |
-
$xml->picture->addChild('storage', $this->picture_storage);
|
| 199 |
-
}
|
| 200 |
-
|
| 201 |
-
return $xml->asXml();
|
| 202 |
-
}
|
| 203 |
-
}
|
| 204 |
-
|
| 205 |
-
// <lowerThird width="1" height="0.4" horizontalAlign="center" verticalAlign="bottom" alpha="0.7">
|
| 206 |
-
// <color>0</color>
|
| 207 |
-
// <link></link>
|
| 208 |
-
// <text color="16777215" fontSize="31" bold="false" italic="false" underline="false"></text>
|
| 209 |
-
// </lowerThird>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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1,97 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Picture
|
| 4 |
-
{
|
| 5 |
-
// using external picture urls is not implemented yet
|
| 6 |
-
const INTERNAL_STORAGE = 'internal';
|
| 7 |
-
const EXTERNAL_STORAGE = 'external';
|
| 8 |
-
|
| 9 |
-
public $id;
|
| 10 |
-
|
| 11 |
-
public $width;
|
| 12 |
-
public $height;
|
| 13 |
-
public $alpha;
|
| 14 |
-
|
| 15 |
-
public $url;
|
| 16 |
-
public $thumbnailUrl;
|
| 17 |
-
public $webUrl;
|
| 18 |
-
|
| 19 |
-
public $url_240p;
|
| 20 |
-
public $url_360p;
|
| 21 |
-
public $url_480p;
|
| 22 |
-
public $url_720p;
|
| 23 |
-
|
| 24 |
-
public $storage;
|
| 25 |
-
|
| 26 |
-
function __construct($pictureId = null, $width = 1.0, $height = 1.0, $alpha = 1.0)
|
| 27 |
-
{
|
| 28 |
-
$this->id = $pictureId;
|
| 29 |
-
$this->width = $width;
|
| 30 |
-
$this->height = $height;
|
| 31 |
-
$this->alpha = $alpha;
|
| 32 |
-
$this->storage = Picture::INTERNAL_STORAGE;
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
public static function withInternalId($pictureId, $width = 1.0, $height = 1.0, $alpha = 1.0)
|
| 36 |
-
{
|
| 37 |
-
$pic = new Picture($pictureId, $width, $height, $alpha);
|
| 38 |
-
$pic->setStorage(Picture::INTERNAL_STORAGE);
|
| 39 |
-
return $pic;
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
public static function withPublicUrl($publicUrl, $width = 1.0, $height = 1.0, $alpha = 1.0)
|
| 43 |
-
{
|
| 44 |
-
$pic = new Picture(null, $width, $height, $alpha);
|
| 45 |
-
$pic->storage = Picture::EXTERNAL_STORAGE;
|
| 46 |
-
$pic->url = $publicUrl;
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
public static function fromXml($xmlString) {
|
| 50 |
-
$pictureXml = new SimpleXMLElement($xmlString);
|
| 51 |
-
$picture = new Picture();
|
| 52 |
-
$picture->id = (string)$pictureXml->id;
|
| 53 |
-
$picture->width = (string) $pictureXml['width'];
|
| 54 |
-
$picture->height = (string) $pictureXml['height'];
|
| 55 |
-
$picture->alpha = (string) $pictureXml['alpha'];
|
| 56 |
-
$picture->url = (string) $pictureXml->url;
|
| 57 |
-
$picture->webUrl = (string) $pictureXml->web_url;
|
| 58 |
-
$picture->thumbnailUrl = (string) $pictureXml->thumb_url;
|
| 59 |
-
$picture->url_240p = (string) $pictureXml->url_240p;
|
| 60 |
-
$picture->url_360p = (string) $pictureXml->url_360p;
|
| 61 |
-
$picture->url_480p = (string) $pictureXml->url_480p;
|
| 62 |
-
$picture->url_720p = (string) $pictureXml->url_720p;
|
| 63 |
-
$picture->storage = (string) $pictureXml->storage;
|
| 64 |
-
return $picture;
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
public function asXml() {
|
| 68 |
-
$xml = new SimpleXMLElement('<picture></picture>');
|
| 69 |
-
$xml->addChild('id', $this->id);
|
| 70 |
-
|
| 71 |
-
$xml->addChild('url', $this->url);
|
| 72 |
-
$xml->addChild('thumb_url', $this->thumbnailUrl);
|
| 73 |
-
$xml->addChild('web_url', $this->webUrl);
|
| 74 |
-
$xml->addChild('url_240p', $this->url_240p);
|
| 75 |
-
$xml->addChild('url_360p', $this->url_360p);
|
| 76 |
-
$xml->addChild('url_480p', $this->url_480p);
|
| 77 |
-
$xml->addChild('url_720p', $this->url_720p);
|
| 78 |
-
$xml->addChild('storage', $this->storage);
|
| 79 |
-
|
| 80 |
-
$xml->addAttribute('height', number_format($this->height, 4, '.', ''));
|
| 81 |
-
$xml->addAttribute('width', number_format($this->width, 4, '.', ''));
|
| 82 |
-
$xml->addAttribute('alpha', number_format($this->alpha, 4, '.', ''));
|
| 83 |
-
return $xml->asXML();
|
| 84 |
-
}
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
// <picture width = "0.0-1.0" height = "0.0-1.0" alpha ="0.0-1.0" >
|
| 88 |
-
// <id > unique_id</id >
|
| 89 |
-
// <url > original_image_url</url >
|
| 90 |
-
// <thumb_url > thumb_image_url</thumb_url >
|
| 91 |
-
// <web_url > web_image_url</web_url >
|
| 92 |
-
// <url_240p > http://user-data.clipgenerator.com/.../1c79deac_240p.jpg</url_240p>
|
| 93 |
-
// <url_360p > http://user-data.clipgenerator.com/.../1c79deac_240p.jpg</url_360p>
|
| 94 |
-
// <url_480p > http://user-data.clipgenerator.com/.../1c79deac_240p.jpg</url_480p>
|
| 95 |
-
// <url_720p > http://user-data.clipgenerator.com/.../1c79deac_240p.jpg</url_720p>
|
| 96 |
-
// <storage > external |internal </storage >
|
| 97 |
-
// </picture >
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/lib/clipgenerator/Video.php
DELETED
|
@@ -1,572 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Video
|
| 4 |
-
{
|
| 5 |
-
const FORMAT_240p = '240p';
|
| 6 |
-
const FORMAT_360p = '360p';
|
| 7 |
-
const FORMAT_480p = '480p';
|
| 8 |
-
const FORMAT_720p = '720p';
|
| 9 |
-
|
| 10 |
-
const RATIO_16x9 = '16x9';
|
| 11 |
-
const RATIO_4x3 = '4x3';
|
| 12 |
-
|
| 13 |
-
public $id;
|
| 14 |
-
|
| 15 |
-
// video metadata
|
| 16 |
-
public $title;
|
| 17 |
-
public $producer;
|
| 18 |
-
public $description;
|
| 19 |
-
public $keywords;
|
| 20 |
-
public $copyright;
|
| 21 |
-
public $content;
|
| 22 |
-
public $targetAudience;
|
| 23 |
-
|
| 24 |
-
// video configuration
|
| 25 |
-
public $songId;
|
| 26 |
-
public $songUrl;
|
| 27 |
-
|
| 28 |
-
public $designId;
|
| 29 |
-
public $designUrl;
|
| 30 |
-
|
| 31 |
-
public $filter;
|
| 32 |
-
public $maxClipLength;
|
| 33 |
-
|
| 34 |
-
// default font
|
| 35 |
-
public $defaultFontFamily = 'cgFontDefault';
|
| 36 |
-
public $defaultFontWeight = 'normal';
|
| 37 |
-
public $defaultFontStyle = 'normal';
|
| 38 |
-
|
| 39 |
-
// start page
|
| 40 |
-
public $startPageEnabled;
|
| 41 |
-
public $startPageDuration;
|
| 42 |
-
public $startPageShowLowerThirds;
|
| 43 |
-
|
| 44 |
-
// end page
|
| 45 |
-
public $endPageEnabled;
|
| 46 |
-
public $endPageDuration;
|
| 47 |
-
public $endPageShowLowerThirds;
|
| 48 |
-
public $endPageOnEndActionName;
|
| 49 |
-
public $endPageOnEndActionParameter;
|
| 50 |
-
|
| 51 |
-
// global lower thirds (will be shown on very frame)
|
| 52 |
-
public $globalLowerThirds;
|
| 53 |
-
|
| 54 |
-
// logo configuration
|
| 55 |
-
public $logo;
|
| 56 |
-
|
| 57 |
-
// video urls
|
| 58 |
-
public $downloadUrl;
|
| 59 |
-
public $thumbnailUrl;
|
| 60 |
-
|
| 61 |
-
public $format = Video::FORMAT_360p;
|
| 62 |
-
public $ratio = Video::RATIO_16x9;
|
| 63 |
-
public $frames = array();
|
| 64 |
-
|
| 65 |
-
public $fonts = array();
|
| 66 |
-
|
| 67 |
-
function __construct($title = null, $designId = null, $songId = null, $format = Video::FORMAT_360p, $ratio = Video::RATIO_16x9)
|
| 68 |
-
{
|
| 69 |
-
$this->title = $title;
|
| 70 |
-
$this->songId = $songId;
|
| 71 |
-
$this->designId = $designId;
|
| 72 |
-
|
| 73 |
-
$this->globalLowerThirds = array();
|
| 74 |
-
|
| 75 |
-
if (!empty($format)) $this->format = $format;
|
| 76 |
-
if (!empty($ratio)) $this->format = $ratio;
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
public function addGlobalLowerThird(LowerThird $lowerThird) {
|
| 80 |
-
array_push($this->globalLowerThirds, $lowerThird);
|
| 81 |
-
}
|
| 82 |
-
|
| 83 |
-
public function clearGlobalLowerThirds() {
|
| 84 |
-
$this->globalLowerThirds = array();
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
public function addFrame(Frame $frame)
|
| 88 |
-
{
|
| 89 |
-
array_push($this->frames, $frame);
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
public function clearFrames()
|
| 93 |
-
{
|
| 94 |
-
$this->log->debug("Clearing frames");
|
| 95 |
-
$this->frames = array();
|
| 96 |
-
}
|
| 97 |
-
|
| 98 |
-
public function addFont($fontFamily, $weight='normal', $style='normal', $src='') {
|
| 99 |
-
$font = array(
|
| 100 |
-
"fontFamily" => $fontFamily,
|
| 101 |
-
"fontWeight" => $weight,
|
| 102 |
-
"fontStyle" => $style,
|
| 103 |
-
"src" => $src
|
| 104 |
-
);
|
| 105 |
-
array_push($this->fonts, $font);
|
| 106 |
-
}
|
| 107 |
-
|
| 108 |
-
public static function fromXml($xmlString) {
|
| 109 |
-
$element = new SimpleXMLElement($xmlString);
|
| 110 |
-
$video = new Video();
|
| 111 |
-
|
| 112 |
-
// video id
|
| 113 |
-
$video->id = (string)$element->video->id;
|
| 114 |
-
|
| 115 |
-
// video metadata
|
| 116 |
-
$video->title = (string)$element->video->title;
|
| 117 |
-
$video->producer = (string)$element->video->producer;
|
| 118 |
-
$video->description = (string)$element->video->description;
|
| 119 |
-
$video->keywords = (string)$element->video->keywords;
|
| 120 |
-
$video->copyright = (string)$element->video->copyright;
|
| 121 |
-
$video->content = (string)$element->video->content;
|
| 122 |
-
$video->targetAudience = (string)$element->video->targetAudience;
|
| 123 |
-
$video->thumbnailUrl = (string)$element->video->thumbnail['url'];
|
| 124 |
-
$video->downloadUrl = (string)$element->video->download['url'];
|
| 125 |
-
|
| 126 |
-
// video timeline
|
| 127 |
-
$timeline = $element->timeline;
|
| 128 |
-
$config = $timeline->config;
|
| 129 |
-
$video->songId = (string)$config->song['id'];
|
| 130 |
-
$video->songUrl = trim((string)$config->song);
|
| 131 |
-
$video->designId = (string)$config->variation['id'];
|
| 132 |
-
$video->designUrl = trim((string)$config->variation);
|
| 133 |
-
|
| 134 |
-
$video->filter = (string)$config->filter;
|
| 135 |
-
$video->ratio = (string)$config->ratio;
|
| 136 |
-
$video->format = (string)$config->format['name'];
|
| 137 |
-
|
| 138 |
-
$video->maxClipLength = (string)$config->clipMaxLenght;
|
| 139 |
-
|
| 140 |
-
// start + end page
|
| 141 |
-
$video->startPageEnabled = strtolower((string)$config->startPage->enabled) == 'true' ? true : false;
|
| 142 |
-
$video->startPageShowLowerThirds = strtolower((string)$config->startPage->showLowerThirds) == 'true' ? true : false;
|
| 143 |
-
$video->startPageDuration = (string)$config->startPage->duration;
|
| 144 |
-
|
| 145 |
-
$video->endPageEnabled = strtolower((string)$config->endPage->enabled) == 'true' ? true : false;
|
| 146 |
-
$video->endPageShowLowerThirds = strtolower((string)$config->endPage->showLowerThirds) == 'true' ? true : false;
|
| 147 |
-
$video->endPageDuration = (string)$config->endPage->duration;
|
| 148 |
-
$video->endPageOnEndActionName = (string)$config->endPage->onEndAction['name'];
|
| 149 |
-
$video->endPageOnEndActionParameter = (string)$config->endPage->onEndAction['parameter'];
|
| 150 |
-
|
| 151 |
-
// read global lower thirds
|
| 152 |
-
|
| 153 |
-
if(isset($timeline->lowerThirds) && $timeline->lowerThirds->count() > 0) {
|
| 154 |
-
foreach ($timeline->lowerThirds->lowerThird as $lt) {
|
| 155 |
-
$lowerThirdString = $lt->asXml();
|
| 156 |
-
$lowerThird = LowerThird::fromXml($lowerThirdString);
|
| 157 |
-
$video->addGlobalLowerThird($lowerThird);
|
| 158 |
-
}
|
| 159 |
-
}
|
| 160 |
-
|
| 161 |
-
// read frames
|
| 162 |
-
|
| 163 |
-
if(isset($timeline->frames) && $timeline->frames->count() > 0) {
|
| 164 |
-
foreach ($timeline->frames->frame as $f) {
|
| 165 |
-
$frameString = $f->asXml();
|
| 166 |
-
$frame = Frame::fromXml($frameString);
|
| 167 |
-
$video->addFrame($frame);
|
| 168 |
-
}
|
| 169 |
-
}
|
| 170 |
-
|
| 171 |
-
// read logo
|
| 172 |
-
if(isset($element->logo)) {
|
| 173 |
-
$logoString = $element->logo->asXml();
|
| 174 |
-
$logo = Logo::fromXml($logoString);
|
| 175 |
-
$video->logo = $logo;
|
| 176 |
-
}
|
| 177 |
-
|
| 178 |
-
// read fonts
|
| 179 |
-
if(isset($element->fonts)) {
|
| 180 |
-
foreach ($element->fonts->font as $f) {
|
| 181 |
-
$video->addFont(
|
| 182 |
-
(string) $f['fontFamily'],
|
| 183 |
-
(string) $f['fontWeight'],
|
| 184 |
-
(string) $f['fontStyle'],
|
| 185 |
-
(string) $f['src']
|
| 186 |
-
);
|
| 187 |
-
}
|
| 188 |
-
}
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
return $video;
|
| 192 |
-
}
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
public function asXml() {
|
| 196 |
-
$xml = new SimpleXMLElement('<webcart version="2.0"></webcart>');
|
| 197 |
-
|
| 198 |
-
$video = $xml->addChild('video');
|
| 199 |
-
$video->addChild('id', $this->id);
|
| 200 |
-
$video->addChild('title', $this->title);
|
| 201 |
-
$video->addChild('producer', $this->producer);
|
| 202 |
-
$video->addChild('description', $this->description);
|
| 203 |
-
$video->addChild('keywords', $this->keywords);
|
| 204 |
-
$video->addChild('copyright', $this->copyright);
|
| 205 |
-
$video->addChild('content', $this->content);
|
| 206 |
-
$video->addChild('targetAudience', $this->targetAudience);
|
| 207 |
-
$video->addChild('thumbnail');
|
| 208 |
-
$video->thumbnail->addAttribute('url', $this->thumbnailUrl);
|
| 209 |
-
$video->addChild('download');
|
| 210 |
-
$video->download->addAttribute('url', $this->downloadUrl);
|
| 211 |
-
|
| 212 |
-
$timeline = $xml->addChild('timeline');
|
| 213 |
-
$config = $timeline->addChild('config');
|
| 214 |
-
$config->addChild('song', $this->songUrl);
|
| 215 |
-
$config->song->addAttribute('id', $this->songId);
|
| 216 |
-
$config->addChild('variation', $this->designUrl);
|
| 217 |
-
$config->variation->addAttribute('id', $this->designId);
|
| 218 |
-
$config->addChild('filter', $this->filter);
|
| 219 |
-
|
| 220 |
-
$config->addChild('format');
|
| 221 |
-
$config->format->addAttribute('name', $this->format);
|
| 222 |
-
$config->addChild('ratio', $this->ratio);
|
| 223 |
-
|
| 224 |
-
$startPage = $config->addChild('startPage');
|
| 225 |
-
$startPage->addChild('enabled', $this->startPageEnabled ? 'true' : 'false');
|
| 226 |
-
$startPage->addChild('showLowerThirds', $this->startPageShowLowerThirds ? 'true' : 'false');
|
| 227 |
-
$startPage->addChild('duration', $this->startPageDuration);
|
| 228 |
-
|
| 229 |
-
$endPage = $config->addChild('endPage');
|
| 230 |
-
$endPage->addChild('enabled', $this->endPageEnabled ? 'true' : 'false');
|
| 231 |
-
$endPage->addChild('showLowerThirds', $this->endPageShowLowerThirds ? 'true' : 'false');
|
| 232 |
-
$endPage->addChild('duration', $this->endPageDuration);
|
| 233 |
-
$endPage->addChild('onEndAction');
|
| 234 |
-
$endPage->onEndAction->addAttribute('name', $this->endPageOnEndActionName);
|
| 235 |
-
$endPage->onEndAction->addAttribute('parameter', $this->endPageOnEndActionParameter);
|
| 236 |
-
|
| 237 |
-
$config->addChild('clipMaxLenght', $this->maxClipLength);
|
| 238 |
-
|
| 239 |
-
// add global lower thirds
|
| 240 |
-
$lowerThirds = $timeline->addChild('lowerThirds');
|
| 241 |
-
foreach($this->globalLowerThirds as $lowerThird) {
|
| 242 |
-
$this->addChildFromString($lowerThirds, $lowerThird->asXml());
|
| 243 |
-
}
|
| 244 |
-
|
| 245 |
-
// add frames
|
| 246 |
-
$frames = $timeline->addChild('frames');
|
| 247 |
-
foreach($this->frames as $frame) {
|
| 248 |
-
$this->addChildFromString($frames, $frame->asXml());
|
| 249 |
-
}
|
| 250 |
-
|
| 251 |
-
// add logo
|
| 252 |
-
if (isset($this->logo))
|
| 253 |
-
$this->addChildFromString($xml, $this->logo->asXml());
|
| 254 |
-
|
| 255 |
-
// add fonts
|
| 256 |
-
$fontsElement = $xml->addChild('fonts');
|
| 257 |
-
$fontsElement->addAttribute("defaultFontFamily", $this->defaultFontFamily);
|
| 258 |
-
$fontsElement->addAttribute("defaultFontWeight", $this->defaultFontWeight);
|
| 259 |
-
$fontsElement->addAttribute("defaultFontStyle", $this->defaultFontStyle);
|
| 260 |
-
|
| 261 |
-
if (count($this->fonts) > 0) {
|
| 262 |
-
foreach($this->fonts as $font) {
|
| 263 |
-
$fontElement = $fontsElement->addChild("font");
|
| 264 |
-
$fontElement->addAttribute("fontFamily", $font['fontFamily']);
|
| 265 |
-
$fontElement->addAttribute("fontWeight", $font['fontWeight']);
|
| 266 |
-
$fontElement->addAttribute("fontStyle", $font['fontStyle']);
|
| 267 |
-
$fontElement->addAttribute("src", $font['src']);
|
| 268 |
-
}
|
| 269 |
-
}
|
| 270 |
-
|
| 271 |
-
// ignore formats, todo: really ignore this? formats will be injected by the backend when the xml is read
|
| 272 |
-
// so it does not affect the creation of clips at the moment
|
| 273 |
-
|
| 274 |
-
// todo: move this function to the backend, this is the wrong place
|
| 275 |
-
return $xml->asXML();
|
| 276 |
-
}
|
| 277 |
-
|
| 278 |
-
private function addChildFromString($parent, $childString) {
|
| 279 |
-
$domparent = dom_import_simplexml($parent);
|
| 280 |
-
$domchild = dom_import_simplexml(new SimpleXMLElement($childString));
|
| 281 |
-
$domchild = $domparent->ownerDocument->importNode($domchild, true);
|
| 282 |
-
$domparent->appendChild($domchild);
|
| 283 |
-
}
|
| 284 |
-
|
| 285 |
-
private function compactFonts($webcartXml) {
|
| 286 |
-
// list of system provided fonts
|
| 287 |
-
$SYSTEM_FONTS = array(
|
| 288 |
-
array('family'=> 'cgFontDefault', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/DefaultRegularFont.swf'),
|
| 289 |
-
array('family'=> 'cgFontDefault', 'weight'=>'bold', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/DefaultBoldFont.swf'),
|
| 290 |
-
array('family'=> 'cgFontDefault', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/DefaultItalicFont.swf'),
|
| 291 |
-
array('family'=> 'cgFontDefault', 'weight'=>'bold', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/DefaultBoldItalicFont.swf'),
|
| 292 |
-
array('family'=> 'cgFontActionMan', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/ActionManRegularFont.swf'),
|
| 293 |
-
array('family'=> 'cgFontActionMan', 'weight'=>'bold', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/ActionManBoldFont.swf'),
|
| 294 |
-
array('family'=> 'cgFontActionMan', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/ActionManItalicFont.swf'),
|
| 295 |
-
array('family'=> 'cgFontActionMan', 'weight'=>'bold', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/ActionManBoldItalicFont.swf'),
|
| 296 |
-
array('family'=> 'cgFontAnonymousPro', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/AnonymousProRegularFont.swf'),
|
| 297 |
-
array('family'=> 'cgFontAnonymousPro', 'weight'=>'bold', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/AnonymousProBoldFont.swf'),
|
| 298 |
-
array('family'=> 'cgFontAnonymousPro', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/AnonymousProItalicFont.swf'),
|
| 299 |
-
array('family'=> 'cgFontAnonymousPro', 'weight'=>'bold', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/AnonymousProBoldItalicFont.swf'),
|
| 300 |
-
array('family'=> 'cgFontSpecialElite', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/SpecialEliteRegularFont.swf'),
|
| 301 |
-
array('family'=> 'cgFontNobile', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/NobileRegularFont.swf'),
|
| 302 |
-
array('family'=> 'cgFontNobile', 'weight'=>'bold', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/NobileBoldFont.swf'),
|
| 303 |
-
array('family'=> 'cgFontNobile', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/NobileItalicFont.swf'),
|
| 304 |
-
array('family'=> 'cgFontNobile', 'weight'=>'bold', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/NobileBoldItalicFont.swf'),
|
| 305 |
-
array('family'=> 'cgFontAlegreya', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/AlegreyaRegularFont.swf'),
|
| 306 |
-
array('family'=> 'cgFontAlegreya', 'weight'=>'bold', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/AlegreyaBoldFont.swf'),
|
| 307 |
-
array('family'=> 'cgFontAlegreya', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/AlegreyaItalicFont.swf'),
|
| 308 |
-
array('family'=> 'cgFontAlegreya', 'weight'=>'bold', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/AlegreyaBoldItalicFont.swf'),
|
| 309 |
-
array('family'=> 'cgFontLeagueGothic', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/LeagueGothicRegularFont.swf'),
|
| 310 |
-
array('family'=> 'cgFontLeagueGothic', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/LeagueGothicItalicFont.swf'),
|
| 311 |
-
array('family'=> 'cgFontDancingScript', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/DancingScriptRegularFont.swf'),
|
| 312 |
-
array('family'=> 'cgFontClaireHand', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/ClaireHandRegularFont.swf'),
|
| 313 |
-
array('family'=> 'cgFontClaireHand', 'weight'=>'bold', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/ClaireHandBoldFont.swf'),
|
| 314 |
-
array('family'=> 'cgFontCicleGordita', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/CicleGorditaRegularFont.swf'),
|
| 315 |
-
array('family'=> 'cgFontCicleGordita', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/CicleGorditaItalicFont.swf'),
|
| 316 |
-
array('family'=> 'cgFontSortsMillGoudy', 'weight'=>'normal', 'style'=>'normal', 'src'=>'http://data.clipgenerator.com/fonts/v3/SortsMillGoudyRegularFont.swf'),
|
| 317 |
-
array('family'=> 'cgFontSortsMillGoudy', 'weight'=>'normal', 'style'=>'italic', 'src'=>'http://data.clipgenerator.com/fonts/v3/SortsMillGoudyItalicFont.swf'),
|
| 318 |
-
);
|
| 319 |
-
|
| 320 |
-
// create lookup list of system fonts
|
| 321 |
-
$systemFonts = array();
|
| 322 |
-
foreach ($SYSTEM_FONTS as $font) {
|
| 323 |
-
$key = $font['family'] . '.' . $font['weight'] . '.' . $font['style'] ;
|
| 324 |
-
$systemFonts[$key] = $font;
|
| 325 |
-
}
|
| 326 |
-
|
| 327 |
-
// create list of used fonts in the webcart
|
| 328 |
-
$usedFonts = array();
|
| 329 |
-
foreach ($webcartXml->xpath('//text') as $node) {
|
| 330 |
-
// todo: when isHTML is introduced in the backend, scan the insides of the text too.
|
| 331 |
-
$text = (string)$node;
|
| 332 |
-
$family = (string)$node['fontFamily'];
|
| 333 |
-
$weight = (string)$node['fontWeight'];
|
| 334 |
-
$style = (string)$node['fontStyle'];
|
| 335 |
-
$key = "$family.$weight.$style";
|
| 336 |
-
$font = array("family" => $family, "weight" => $weight, "style" => $style);
|
| 337 |
-
$usedFonts[$key] = $font;
|
| 338 |
-
}
|
| 339 |
-
|
| 340 |
-
// create list of already existing fonts in the webcart (may include custom fonts)
|
| 341 |
-
$suppliedFonts = array();
|
| 342 |
-
foreach ($webcartXml->xpath('/webcart/fonts//font') as $node) {
|
| 343 |
-
$family = (string)$node['fontFamily'];
|
| 344 |
-
$weight = (string)$node['fontWeight'];
|
| 345 |
-
$style = (string)$node['fontStyle'];
|
| 346 |
-
$src = (string)$node['src'];
|
| 347 |
-
$key = "$family.$weight.$style";
|
| 348 |
-
$font = array("family" => $family, "weight" => $weight, "style" => $style, "src" => $src);
|
| 349 |
-
$suppliedFonts[$key] = $font;
|
| 350 |
-
}
|
| 351 |
-
|
| 352 |
-
// check which font to include, and which not
|
| 353 |
-
$includeFonts = array();
|
| 354 |
-
foreach ($usedFonts as $key => $font) {
|
| 355 |
-
if (array_key_exists($key, $systemFonts)) {
|
| 356 |
-
array_push($includeFonts, $systemFonts[$key]);
|
| 357 |
-
} else if (array_key_exists($key, $suppliedFonts)) {
|
| 358 |
-
array_push($includeFonts, $suppliedFonts[$key]);
|
| 359 |
-
} else {
|
| 360 |
-
// ignore this case, if we cannot find the correct font, so it should be,
|
| 361 |
-
// in this case the player should fall back to the default font hopefully
|
| 362 |
-
// todo: log that a font was used that was not found
|
| 363 |
-
}
|
| 364 |
-
}
|
| 365 |
-
|
| 366 |
-
// actually modify the fonts element in webcart, to include
|
| 367 |
-
// new correct font list
|
| 368 |
-
$defaultFontFamily = $webcartXml->fonts['defaultFontFamily'];
|
| 369 |
-
$defaultFontWeight = $webcartXml->fonts['defaultFontWeight'];
|
| 370 |
-
$defaultFontStyle = $webcartXml->fonts['defaultFontStyle'];
|
| 371 |
-
// remove existing node
|
| 372 |
-
$webcartXml->fonts = null;
|
| 373 |
-
// add new one
|
| 374 |
-
$fontsNode = $webcartXml->addChild('fonts');
|
| 375 |
-
$fontsNode->addAttribute("defaultFontFamily", $defaultFontFamily);
|
| 376 |
-
$fontsNode->addAttribute("defaultFontWeight", $defaultFontWeight);
|
| 377 |
-
$fontsNode->addAttribute("defaultFontStyle", $defaultFontStyle);
|
| 378 |
-
|
| 379 |
-
foreach ($includeFonts as $font) {
|
| 380 |
-
$fontNode = $fontsNode->addChild('font');
|
| 381 |
-
$fontNode->addAttribute("fontFamily", $font['family']);
|
| 382 |
-
$fontNode->addAttribute("fontWeight", $font['weight']);
|
| 383 |
-
$fontNode->addAttribute("fontStyle", $font['style']);
|
| 384 |
-
$fontNode->addAttribute("src", $font['src']);
|
| 385 |
-
}
|
| 386 |
-
|
| 387 |
-
return $webcartXml;
|
| 388 |
-
}
|
| 389 |
-
}
|
| 390 |
-
//<webcart version="2.0">
|
| 391 |
-
// <video>
|
| 392 |
-
// <id>fzuUT5DsCG6b80xLC5B3s5iq4dfL4CLj</id>
|
| 393 |
-
// <title>super text</title>
|
| 394 |
-
// <producer>sergej</producer>
|
| 395 |
-
// <description>bezeichnung</description>
|
| 396 |
-
// <keywords>keywork</keywords>
|
| 397 |
-
// <copyright>copy</copyright>
|
| 398 |
-
// <content>inhalt</content>
|
| 399 |
-
// <targetAudience>zielgruppe</targetAudience>
|
| 400 |
-
// <thumbnail url="http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f_thumb.jpg"/>
|
| 401 |
-
// <download url=""/>
|
| 402 |
-
// </video>
|
| 403 |
-
// <timeline>
|
| 404 |
-
// <config>
|
| 405 |
-
// <song id="Land_aus_Glas_Clipgenerator_5_27_333.mp3" copyright="">
|
| 406 |
-
// http://data.clipgenerator.com/music/65/SUEp1qj3837vy3GH.mp3
|
| 407 |
-
// </song>
|
| 408 |
-
// <variation id="ce_showtime">http://data.clipgenerator.com/variations/v2/xml/ce_showtime.xml</variation>
|
| 409 |
-
// <filter>none</filter>
|
| 410 |
-
// <ratio>16x9</ratio>
|
| 411 |
-
// <format name="360p"/>
|
| 412 |
-
// <startPage>
|
| 413 |
-
// <enabled>false</enabled>
|
| 414 |
-
// <duration>5</duration>
|
| 415 |
-
// <showLowerThirds>false</showLowerThirds>
|
| 416 |
-
// </startPage>
|
| 417 |
-
// <endPage>
|
| 418 |
-
// <enabled>false</enabled>
|
| 419 |
-
// <duration>5</duration>
|
| 420 |
-
// <onEndAction name="showIntro" parameter=""/>
|
| 421 |
-
// <showLowerThirds>false</showLowerThirds>
|
| 422 |
-
// </endPage>
|
| 423 |
-
// <clipMaxLenght>0</clipMaxLenght>
|
| 424 |
-
// </config>
|
| 425 |
-
// <lowerThirds>
|
| 426 |
-
// <lowerThird width="0.3" height="0.1" horizontalAlign="left" verticalAlign="top" alpha="0.7">
|
| 427 |
-
// <color>0</color>
|
| 428 |
-
// <link>http://</link>
|
| 429 |
-
// <text color="16777215" fontSize="14" bold="false" italic="false" underline="false">SERGEJ</text>
|
| 430 |
-
// </lowerThird>
|
| 431 |
-
// </lowerThirds>
|
| 432 |
-
// <frames>
|
| 433 |
-
// <frame>
|
| 434 |
-
// <number>0</number>
|
| 435 |
-
// <picture width="1" height="1" alpha="1">
|
| 436 |
-
// <id>16441</id>
|
| 437 |
-
// <url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f.jpg</url>
|
| 438 |
-
// <thumb_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f_thumb.jpg
|
| 439 |
-
// </thumb_url>
|
| 440 |
-
// <web_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f_web.jpg</web_url>
|
| 441 |
-
// <url_240p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f_240p.jpg</url_240p>
|
| 442 |
-
// <url_360p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f_360p.jpg</url_360p>
|
| 443 |
-
// <url_480p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f_480p.jpg</url_480p>
|
| 444 |
-
// <url_720p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/07b0aa3f_720p.jpg</url_720p>
|
| 445 |
-
// </picture>
|
| 446 |
-
// <background>
|
| 447 |
-
// <color>65433</color>
|
| 448 |
-
// </background>
|
| 449 |
-
// <lowerThirds>
|
| 450 |
-
// <lowerThird width="0.45" height="0.39555555555556" horizontalAlign="center" verticalAlign="middle"
|
| 451 |
-
// alpha="0.7">
|
| 452 |
-
// <color>0</color>
|
| 453 |
-
// <link>http://</link>
|
| 454 |
-
// <text color="16777215" fontSize="31" bold="false" italic="false" underline="false">SUPER TEXT
|
| 455 |
-
// </text>
|
| 456 |
-
// </lowerThird>
|
| 457 |
-
// </lowerThirds>
|
| 458 |
-
// </frame>
|
| 459 |
-
// <frame>
|
| 460 |
-
// <number>1</number>
|
| 461 |
-
// <picture width="1" height="1" alpha="1">
|
| 462 |
-
// <id>18572</id>
|
| 463 |
-
// <url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/28f73d63.jpg</url>
|
| 464 |
-
// <thumb_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/28f73d63_thumb.jpg
|
| 465 |
-
// </thumb_url>
|
| 466 |
-
// <web_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/28f73d63_web.jpg</web_url>
|
| 467 |
-
// <url_240p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/28f73d63_240p.jpg</url_240p>
|
| 468 |
-
// <url_360p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/28f73d63_360p.jpg</url_360p>
|
| 469 |
-
// <url_480p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/28f73d63_480p.jpg</url_480p>
|
| 470 |
-
// <url_720p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/28f73d63_720p.jpg</url_720p>
|
| 471 |
-
// </picture>
|
| 472 |
-
// </frame>
|
| 473 |
-
// <frame>
|
| 474 |
-
// <number>2</number>
|
| 475 |
-
// <picture width="1" height="1" alpha="1">
|
| 476 |
-
// <id>18573</id>
|
| 477 |
-
// <url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/b84820f2.jpg</url>
|
| 478 |
-
// <thumb_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/b84820f2_thumb.jpg
|
| 479 |
-
// </thumb_url>
|
| 480 |
-
// <web_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/b84820f2_web.jpg</web_url>
|
| 481 |
-
// <url_240p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/b84820f2_240p.jpg</url_240p>
|
| 482 |
-
// <url_360p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/b84820f2_360p.jpg</url_360p>
|
| 483 |
-
// <url_480p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/b84820f2_480p.jpg</url_480p>
|
| 484 |
-
// <url_720p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/b84820f2_720p.jpg</url_720p>
|
| 485 |
-
// </picture>
|
| 486 |
-
// </frame>
|
| 487 |
-
// <frame>
|
| 488 |
-
// <number>3</number>
|
| 489 |
-
// <picture width="1" height="1" alpha="1">
|
| 490 |
-
// <id>18574</id>
|
| 491 |
-
// <url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/cf4f1064.jpg</url>
|
| 492 |
-
// <thumb_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/cf4f1064_thumb.jpg
|
| 493 |
-
// </thumb_url>
|
| 494 |
-
// <web_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/cf4f1064_web.jpg</web_url>
|
| 495 |
-
// <url_240p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/cf4f1064_240p.jpg</url_240p>
|
| 496 |
-
// <url_360p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/cf4f1064_360p.jpg</url_360p>
|
| 497 |
-
// <url_480p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/cf4f1064_480p.jpg</url_480p>
|
| 498 |
-
// <url_720p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/cf4f1064_720p.jpg</url_720p>
|
| 499 |
-
// </picture>
|
| 500 |
-
// <background>
|
| 501 |
-
// <color>204</color>
|
| 502 |
-
// </background>
|
| 503 |
-
// </frame>
|
| 504 |
-
// <frame>
|
| 505 |
-
// <number>4</number>
|
| 506 |
-
// <picture width="1" height="1" alpha="1">
|
| 507 |
-
// <id>18575</id>
|
| 508 |
-
// <url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/564641de.jpg</url>
|
| 509 |
-
// <thumb_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/564641de_thumb.jpg
|
| 510 |
-
// </thumb_url>
|
| 511 |
-
// <web_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/564641de_web.jpg</web_url>
|
| 512 |
-
// <url_240p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/564641de_240p.jpg</url_240p>
|
| 513 |
-
// <url_360p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/564641de_360p.jpg</url_360p>
|
| 514 |
-
// <url_480p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/564641de_480p.jpg</url_480p>
|
| 515 |
-
// <url_720p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/564641de_720p.jpg</url_720p>
|
| 516 |
-
// </picture>
|
| 517 |
-
// <background>
|
| 518 |
-
// <color>16711935</color>
|
| 519 |
-
// </background>
|
| 520 |
-
// </frame>
|
| 521 |
-
// <frame>
|
| 522 |
-
// <number>5</number>
|
| 523 |
-
// <picture width="1" height="1" alpha="1">
|
| 524 |
-
// <id>18576</id>
|
| 525 |
-
// <url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/d954d811.jpg</url>
|
| 526 |
-
// <thumb_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/d954d811_thumb.jpg
|
| 527 |
-
// </thumb_url>
|
| 528 |
-
// <web_url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/d954d811_web.jpg</web_url>
|
| 529 |
-
// <url_240p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/d954d811_240p.jpg</url_240p>
|
| 530 |
-
// <url_360p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/d954d811_360p.jpg</url_360p>
|
| 531 |
-
// <url_480p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/d954d811_480p.jpg</url_480p>
|
| 532 |
-
// <url_720p>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/picture/d954d811_720p.jpg</url_720p>
|
| 533 |
-
// </picture>
|
| 534 |
-
// <background>
|
| 535 |
-
// <color>65382</color>
|
| 536 |
-
// </background>
|
| 537 |
-
// </frame>
|
| 538 |
-
// </frames>
|
| 539 |
-
// </timeline>
|
| 540 |
-
// <logo width="0.1" height="0.1" alpha="1">
|
| 541 |
-
// <id>18194</id>
|
| 542 |
-
// <url>http://user-data.clipgenerator.com/l/g/5/j/127a00f2/logo/4ad842bc.png</url>
|
| 543 |
-
// <link>http://</link>
|
| 544 |
-
// <position verticalAlign="top" horizontalAlign="right"/>
|
| 545 |
-
// <showInStartPage>false</showInStartPage>
|
| 546 |
-
// <showInEndPage>false</showInEndPage>
|
| 547 |
-
// <showInTimeline>true</showInTimeline>
|
| 548 |
-
// </logo>
|
| 549 |
-
// <formats>
|
| 550 |
-
// <format name="240p" ratio="4x3" resolution="320x240" isPreviewVisible="true" canPreview="true"
|
| 551 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 552 |
-
// <format name="360p" ratio="4x3" resolution="480x360" isPreviewVisible="true" canPreview="true"
|
| 553 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 554 |
-
// <format name="480p" ratio="4x3" resolution="640x480" isPreviewVisible="true" canPreview="true"
|
| 555 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 556 |
-
// <format name="720p" ratio="4x3" resolution="960x720" isPreviewVisible="true" canPreview="true"
|
| 557 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 558 |
-
// <format name="1080p" ratio="4x3" resolution="1440x1080" isPreviewVisible="true" canPreview="true"
|
| 559 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 560 |
-
// <format name="240p" ratio="16x9" resolution="426x240" isPreviewVisible="true" canPreview="true"
|
| 561 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 562 |
-
// <format name="360p" ratio="16x9" resolution="640x360" isPreviewVisible="true" canPreview="true"
|
| 563 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 564 |
-
// <format name="480p" ratio="16x9" resolution="853x480" isPreviewVisible="true" canPreview="true"
|
| 565 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 566 |
-
// <format name="720p" ratio="16x9" resolution="1280x720" isPreviewVisible="true" canPreview="true"
|
| 567 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 568 |
-
// <format name="1080p" ratio="16x9" resolution="1920x1080" isPreviewVisible="false" canPreview="false"
|
| 569 |
-
// isDownloadVisible="true" canDownload="true"/>
|
| 570 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-0.1.0.php
DELETED
|
@@ -1,196 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Trivid GmbH
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
|
| 8 |
-
* It is also available through the world-wide-web at this URL:
|
| 9 |
-
* http://
|
| 10 |
-
*
|
| 11 |
-
* @category Trivid
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @copyright Copyright (c) 2013 Trivid GmbH (http://www.trivid.com)
|
| 14 |
-
*/
|
| 15 |
-
|
| 16 |
-
$installer = $this;
|
| 17 |
-
$installer->startSetup();
|
| 18 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title', array(
|
| 19 |
-
'group' => 'Clipgenerator',
|
| 20 |
-
'input' => 'text',
|
| 21 |
-
'type' => 'varchar',
|
| 22 |
-
'label' => 'Video Titel',
|
| 23 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 24 |
-
'visible' => TRUE,
|
| 25 |
-
'required' => FALSE,
|
| 26 |
-
'user_defined' => TRUE,
|
| 27 |
-
'searchable' => FALSE,
|
| 28 |
-
'filterable' => FALSE,
|
| 29 |
-
'comparable' => FALSE,
|
| 30 |
-
'visible_on_front' => FALSE,
|
| 31 |
-
'unique' => FALSE,
|
| 32 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 33 |
-
'is_configurable' => FALSE,
|
| 34 |
-
));
|
| 35 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description', array(
|
| 36 |
-
'group' => 'Clipgenerator',
|
| 37 |
-
'input' => 'textarea',
|
| 38 |
-
'type' => 'varchar',
|
| 39 |
-
'label' => 'Beschreibung',
|
| 40 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 41 |
-
'visible' => TRUE,
|
| 42 |
-
'required' => FALSE,
|
| 43 |
-
'user_defined' => TRUE,
|
| 44 |
-
'searchable' => FALSE,
|
| 45 |
-
'filterable' => FALSE,
|
| 46 |
-
'comparable' => FALSE,
|
| 47 |
-
'visible_on_front' => FALSE,
|
| 48 |
-
'unique' => FALSE,
|
| 49 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 50 |
-
'is_configurable' => FALSE,
|
| 51 |
-
));
|
| 52 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords', array(
|
| 53 |
-
'group' => 'Clipgenerator',
|
| 54 |
-
'input' => 'text',
|
| 55 |
-
'type' => 'varchar',
|
| 56 |
-
'label' => 'Video Keywords',
|
| 57 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 58 |
-
'visible' => TRUE,
|
| 59 |
-
'required' => FALSE,
|
| 60 |
-
'user_defined' => TRUE,
|
| 61 |
-
'searchable' => FALSE,
|
| 62 |
-
'filterable' => FALSE,
|
| 63 |
-
'comparable' => FALSE,
|
| 64 |
-
'visible_on_front' => FALSE,
|
| 65 |
-
'unique' => FALSE,
|
| 66 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 67 |
-
'is_configurable' => FALSE,
|
| 68 |
-
));
|
| 69 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo', array(
|
| 70 |
-
'group' => 'Clipgenerator',
|
| 71 |
-
'input' => 'text',
|
| 72 |
-
'type' => 'varchar',
|
| 73 |
-
'label' => 'Video Logo URL',
|
| 74 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 75 |
-
'visible' => TRUE,
|
| 76 |
-
'required' => FALSE,
|
| 77 |
-
'user_defined' => TRUE,
|
| 78 |
-
'searchable' => FALSE,
|
| 79 |
-
'filterable' => FALSE,
|
| 80 |
-
'comparable' => FALSE,
|
| 81 |
-
'visible_on_front' => FALSE,
|
| 82 |
-
'unique' => FALSE,
|
| 83 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 84 |
-
'is_configurable' => FALSE,
|
| 85 |
-
));
|
| 86 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show', array(
|
| 87 |
-
'group' => 'Clipgenerator',
|
| 88 |
-
'input' => 'boolean',
|
| 89 |
-
'type' => 'int',
|
| 90 |
-
'default' => 0,
|
| 91 |
-
'label' => 'Video ausgeben',
|
| 92 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 93 |
-
'visible' => TRUE,
|
| 94 |
-
'required' => FALSE,
|
| 95 |
-
'user_defined' => TRUE,
|
| 96 |
-
'searchable' => FALSE,
|
| 97 |
-
'filterable' => FALSE,
|
| 98 |
-
'comparable' => FALSE,
|
| 99 |
-
'visible_on_front' => FALSE,
|
| 100 |
-
'unique' => FALSE,
|
| 101 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 102 |
-
'is_configurable' => FALSE,
|
| 103 |
-
));
|
| 104 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design', array(
|
| 105 |
-
'group' => 'Clipgenerator',
|
| 106 |
-
'input' => 'select',
|
| 107 |
-
'type' => 'varchar',
|
| 108 |
-
'label' => 'Design',
|
| 109 |
-
'source' => 'trivid_clipgenerator_model_source_designs',
|
| 110 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 111 |
-
'visible' => TRUE,
|
| 112 |
-
'required' => FALSE,
|
| 113 |
-
'user_defined' => TRUE,
|
| 114 |
-
'searchable' => FALSE,
|
| 115 |
-
'filterable' => FALSE,
|
| 116 |
-
'comparable' => FALSE,
|
| 117 |
-
'visible_on_front' => FALSE,
|
| 118 |
-
'unique' => FALSE,
|
| 119 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 120 |
-
'is_configurable' => FALSE,
|
| 121 |
-
));
|
| 122 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select', array(
|
| 123 |
-
'group' => 'Clipgenerator',
|
| 124 |
-
'type' => 'text',
|
| 125 |
-
'input' => 'text',
|
| 126 |
-
'backend' => '',
|
| 127 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_images', //definition of renderer
|
| 128 |
-
'label' => 'Bildauswahl',
|
| 129 |
-
'class' => '',
|
| 130 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 131 |
-
'visible' => TRUE,
|
| 132 |
-
'required' => FALSE,
|
| 133 |
-
'user_defined' => TRUE,
|
| 134 |
-
'searchable' => FALSE,
|
| 135 |
-
'filterable' => FALSE,
|
| 136 |
-
'comparable' => FALSE,
|
| 137 |
-
'visible_on_front' => FALSE,
|
| 138 |
-
'unique' => FALSE,
|
| 139 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 140 |
-
'is_configurable' => FALSE,
|
| 141 |
-
));
|
| 142 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song', array(
|
| 143 |
-
'group' => 'Clipgenerator',
|
| 144 |
-
'input' => 'select',
|
| 145 |
-
'type' => 'varchar',
|
| 146 |
-
'label' => 'Musik',
|
| 147 |
-
'source' => 'trivid_clipgenerator_model_source_musics',
|
| 148 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 149 |
-
'visible' => TRUE,
|
| 150 |
-
'required' => FALSE,
|
| 151 |
-
'user_defined' => TRUE,
|
| 152 |
-
'searchable' => FALSE,
|
| 153 |
-
'filterable' => FALSE,
|
| 154 |
-
'comparable' => FALSE,
|
| 155 |
-
'visible_on_front' => FALSE,
|
| 156 |
-
'unique' => FALSE,
|
| 157 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 158 |
-
'is_configurable' => FALSE,
|
| 159 |
-
));
|
| 160 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select', array(
|
| 161 |
-
'group' => 'Clipgenerator',
|
| 162 |
-
'type' => 'varchar',
|
| 163 |
-
'backend' => '',
|
| 164 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_music', //definition of renderer
|
| 165 |
-
'label' => 'erweiterte Auswahl',
|
| 166 |
-
'class' => '',
|
| 167 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 168 |
-
'visible' => TRUE,
|
| 169 |
-
'required' => FALSE,
|
| 170 |
-
'user_defined' => TRUE,
|
| 171 |
-
'searchable' => FALSE,
|
| 172 |
-
'filterable' => FALSE,
|
| 173 |
-
'comparable' => FALSE,
|
| 174 |
-
'visible_on_front' => FALSE,
|
| 175 |
-
'unique' => FALSE,
|
| 176 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 177 |
-
'is_configurable' => FALSE,
|
| 178 |
-
));
|
| 179 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id', array(
|
| 180 |
-
'group' => 'Clipgenerator',
|
| 181 |
-
'input' => 'text',
|
| 182 |
-
'type' => 'varchar',
|
| 183 |
-
'label' => 'Video ID',
|
| 184 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 185 |
-
'visible' => TRUE,
|
| 186 |
-
'required' => FALSE,
|
| 187 |
-
'user_defined' => TRUE,
|
| 188 |
-
'searchable' => FALSE,
|
| 189 |
-
'filterable' => FALSE,
|
| 190 |
-
'comparable' => FALSE,
|
| 191 |
-
'visible_on_front' => FALSE,
|
| 192 |
-
'unique' => FALSE,
|
| 193 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 194 |
-
'is_configurable' => FALSE,
|
| 195 |
-
));
|
| 196 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.2.php
DELETED
|
@@ -1,202 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Install Script
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Creates all necessary product attributes.
|
| 21 |
-
*/
|
| 22 |
-
$installer = $this;
|
| 23 |
-
$installer->startSetup();
|
| 24 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title', array(
|
| 25 |
-
'group' => 'Clipgenerator',
|
| 26 |
-
'input' => 'text',
|
| 27 |
-
'type' => 'varchar',
|
| 28 |
-
'label' => 'Video Titel',
|
| 29 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 30 |
-
'visible' => TRUE,
|
| 31 |
-
'required' => FALSE,
|
| 32 |
-
'user_defined' => TRUE,
|
| 33 |
-
'searchable' => FALSE,
|
| 34 |
-
'filterable' => FALSE,
|
| 35 |
-
'comparable' => FALSE,
|
| 36 |
-
'visible_on_front' => FALSE,
|
| 37 |
-
'unique' => FALSE,
|
| 38 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 39 |
-
'is_configurable' => FALSE,
|
| 40 |
-
));
|
| 41 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description', array(
|
| 42 |
-
'group' => 'Clipgenerator',
|
| 43 |
-
'input' => 'textarea',
|
| 44 |
-
'type' => 'varchar',
|
| 45 |
-
'label' => 'Beschreibung',
|
| 46 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 47 |
-
'visible' => TRUE,
|
| 48 |
-
'required' => FALSE,
|
| 49 |
-
'user_defined' => TRUE,
|
| 50 |
-
'searchable' => FALSE,
|
| 51 |
-
'filterable' => FALSE,
|
| 52 |
-
'comparable' => FALSE,
|
| 53 |
-
'visible_on_front' => FALSE,
|
| 54 |
-
'unique' => FALSE,
|
| 55 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 56 |
-
'is_configurable' => FALSE,
|
| 57 |
-
));
|
| 58 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords', array(
|
| 59 |
-
'group' => 'Clipgenerator',
|
| 60 |
-
'input' => 'text',
|
| 61 |
-
'type' => 'varchar',
|
| 62 |
-
'label' => 'Video Keywords',
|
| 63 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 64 |
-
'visible' => TRUE,
|
| 65 |
-
'required' => FALSE,
|
| 66 |
-
'user_defined' => TRUE,
|
| 67 |
-
'searchable' => FALSE,
|
| 68 |
-
'filterable' => FALSE,
|
| 69 |
-
'comparable' => FALSE,
|
| 70 |
-
'visible_on_front' => FALSE,
|
| 71 |
-
'unique' => FALSE,
|
| 72 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 73 |
-
'is_configurable' => FALSE,
|
| 74 |
-
));
|
| 75 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo', array(
|
| 76 |
-
'group' => 'Clipgenerator',
|
| 77 |
-
'input' => 'text',
|
| 78 |
-
'type' => 'varchar',
|
| 79 |
-
'label' => 'Video Logo URL',
|
| 80 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 81 |
-
'visible' => TRUE,
|
| 82 |
-
'required' => FALSE,
|
| 83 |
-
'user_defined' => TRUE,
|
| 84 |
-
'searchable' => FALSE,
|
| 85 |
-
'filterable' => FALSE,
|
| 86 |
-
'comparable' => FALSE,
|
| 87 |
-
'visible_on_front' => FALSE,
|
| 88 |
-
'unique' => FALSE,
|
| 89 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 90 |
-
'is_configurable' => FALSE,
|
| 91 |
-
));
|
| 92 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show', array(
|
| 93 |
-
'group' => 'Clipgenerator',
|
| 94 |
-
'input' => 'boolean',
|
| 95 |
-
'type' => 'int',
|
| 96 |
-
'default' => 0,
|
| 97 |
-
'label' => 'Video ausgeben',
|
| 98 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 99 |
-
'visible' => TRUE,
|
| 100 |
-
'required' => FALSE,
|
| 101 |
-
'user_defined' => TRUE,
|
| 102 |
-
'searchable' => FALSE,
|
| 103 |
-
'filterable' => FALSE,
|
| 104 |
-
'comparable' => FALSE,
|
| 105 |
-
'visible_on_front' => FALSE,
|
| 106 |
-
'unique' => FALSE,
|
| 107 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 108 |
-
'is_configurable' => FALSE,
|
| 109 |
-
));
|
| 110 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design', array(
|
| 111 |
-
'group' => 'Clipgenerator',
|
| 112 |
-
'input' => 'select',
|
| 113 |
-
'type' => 'varchar',
|
| 114 |
-
'label' => 'Design',
|
| 115 |
-
'source' => 'trivid_clipgenerator_model_source_designs',
|
| 116 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 117 |
-
'visible' => TRUE,
|
| 118 |
-
'required' => FALSE,
|
| 119 |
-
'user_defined' => TRUE,
|
| 120 |
-
'searchable' => FALSE,
|
| 121 |
-
'filterable' => FALSE,
|
| 122 |
-
'comparable' => FALSE,
|
| 123 |
-
'visible_on_front' => FALSE,
|
| 124 |
-
'unique' => FALSE,
|
| 125 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 126 |
-
'is_configurable' => FALSE,
|
| 127 |
-
));
|
| 128 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select', array(
|
| 129 |
-
'group' => 'Clipgenerator',
|
| 130 |
-
'type' => 'text',
|
| 131 |
-
'input' => 'text',
|
| 132 |
-
'backend' => '',
|
| 133 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_images', //definition of renderer
|
| 134 |
-
'label' => 'Bildauswahl',
|
| 135 |
-
'class' => '',
|
| 136 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 137 |
-
'visible' => TRUE,
|
| 138 |
-
'required' => FALSE,
|
| 139 |
-
'user_defined' => TRUE,
|
| 140 |
-
'searchable' => FALSE,
|
| 141 |
-
'filterable' => FALSE,
|
| 142 |
-
'comparable' => FALSE,
|
| 143 |
-
'visible_on_front' => FALSE,
|
| 144 |
-
'unique' => FALSE,
|
| 145 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 146 |
-
'is_configurable' => FALSE,
|
| 147 |
-
));
|
| 148 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song', array(
|
| 149 |
-
'group' => 'Clipgenerator',
|
| 150 |
-
'input' => 'select',
|
| 151 |
-
'type' => 'varchar',
|
| 152 |
-
'label' => 'Musik',
|
| 153 |
-
'source' => 'trivid_clipgenerator_model_source_musics',
|
| 154 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 155 |
-
'visible' => TRUE,
|
| 156 |
-
'required' => FALSE,
|
| 157 |
-
'user_defined' => TRUE,
|
| 158 |
-
'searchable' => FALSE,
|
| 159 |
-
'filterable' => FALSE,
|
| 160 |
-
'comparable' => FALSE,
|
| 161 |
-
'visible_on_front' => FALSE,
|
| 162 |
-
'unique' => FALSE,
|
| 163 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 164 |
-
'is_configurable' => FALSE,
|
| 165 |
-
));
|
| 166 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select', array(
|
| 167 |
-
'group' => 'Clipgenerator',
|
| 168 |
-
'type' => 'varchar',
|
| 169 |
-
'backend' => '',
|
| 170 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_music', //definition of renderer
|
| 171 |
-
'label' => 'erweiterte Auswahl',
|
| 172 |
-
'class' => '',
|
| 173 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 174 |
-
'visible' => TRUE,
|
| 175 |
-
'required' => FALSE,
|
| 176 |
-
'user_defined' => TRUE,
|
| 177 |
-
'searchable' => FALSE,
|
| 178 |
-
'filterable' => FALSE,
|
| 179 |
-
'comparable' => FALSE,
|
| 180 |
-
'visible_on_front' => FALSE,
|
| 181 |
-
'unique' => FALSE,
|
| 182 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 183 |
-
'is_configurable' => FALSE,
|
| 184 |
-
));
|
| 185 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id', array(
|
| 186 |
-
'group' => 'Clipgenerator',
|
| 187 |
-
'input' => 'text',
|
| 188 |
-
'type' => 'varchar',
|
| 189 |
-
'label' => 'Video ID',
|
| 190 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 191 |
-
'visible' => TRUE,
|
| 192 |
-
'required' => FALSE,
|
| 193 |
-
'user_defined' => TRUE,
|
| 194 |
-
'searchable' => FALSE,
|
| 195 |
-
'filterable' => FALSE,
|
| 196 |
-
'comparable' => FALSE,
|
| 197 |
-
'visible_on_front' => FALSE,
|
| 198 |
-
'unique' => FALSE,
|
| 199 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 200 |
-
'is_configurable' => FALSE,
|
| 201 |
-
));
|
| 202 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.0
|
| 17 |
-
* @since File available since Release 1.0.0
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Creates all necessary product attributes.
|
| 21 |
-
*/
|
| 22 |
-
$installer = $this;
|
| 23 |
-
$installer->startSetup();
|
| 24 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title', array(
|
| 25 |
-
'group' => 'Clipgenerator',
|
| 26 |
-
'input' => 'text',
|
| 27 |
-
'type' => 'varchar',
|
| 28 |
-
'label' => 'Video Titel',
|
| 29 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 30 |
-
'visible' => TRUE,
|
| 31 |
-
'required' => FALSE,
|
| 32 |
-
'user_defined' => TRUE,
|
| 33 |
-
'searchable' => FALSE,
|
| 34 |
-
'filterable' => FALSE,
|
| 35 |
-
'comparable' => FALSE,
|
| 36 |
-
'visible_on_front' => FALSE,
|
| 37 |
-
'unique' => FALSE,
|
| 38 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 39 |
-
'is_configurable' => FALSE,
|
| 40 |
-
));
|
| 41 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description', array(
|
| 42 |
-
'group' => 'Clipgenerator',
|
| 43 |
-
'input' => 'textarea',
|
| 44 |
-
'type' => 'varchar',
|
| 45 |
-
'label' => 'Beschreibung',
|
| 46 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 47 |
-
'visible' => TRUE,
|
| 48 |
-
'required' => FALSE,
|
| 49 |
-
'user_defined' => TRUE,
|
| 50 |
-
'searchable' => FALSE,
|
| 51 |
-
'filterable' => FALSE,
|
| 52 |
-
'comparable' => FALSE,
|
| 53 |
-
'visible_on_front' => FALSE,
|
| 54 |
-
'unique' => FALSE,
|
| 55 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 56 |
-
'is_configurable' => FALSE,
|
| 57 |
-
));
|
| 58 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords', array(
|
| 59 |
-
'group' => 'Clipgenerator',
|
| 60 |
-
'input' => 'text',
|
| 61 |
-
'type' => 'varchar',
|
| 62 |
-
'label' => 'Video Keywords',
|
| 63 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 64 |
-
'visible' => TRUE,
|
| 65 |
-
'required' => FALSE,
|
| 66 |
-
'user_defined' => TRUE,
|
| 67 |
-
'searchable' => FALSE,
|
| 68 |
-
'filterable' => FALSE,
|
| 69 |
-
'comparable' => FALSE,
|
| 70 |
-
'visible_on_front' => FALSE,
|
| 71 |
-
'unique' => FALSE,
|
| 72 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 73 |
-
'is_configurable' => FALSE,
|
| 74 |
-
));
|
| 75 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo', array(
|
| 76 |
-
'group' => 'Clipgenerator',
|
| 77 |
-
'input' => 'text',
|
| 78 |
-
'type' => 'varchar',
|
| 79 |
-
'label' => 'Video Logo URL',
|
| 80 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 81 |
-
'visible' => TRUE,
|
| 82 |
-
'required' => FALSE,
|
| 83 |
-
'user_defined' => TRUE,
|
| 84 |
-
'searchable' => FALSE,
|
| 85 |
-
'filterable' => FALSE,
|
| 86 |
-
'comparable' => FALSE,
|
| 87 |
-
'visible_on_front' => FALSE,
|
| 88 |
-
'unique' => FALSE,
|
| 89 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 90 |
-
'is_configurable' => FALSE,
|
| 91 |
-
));
|
| 92 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show', array(
|
| 93 |
-
'group' => 'Clipgenerator',
|
| 94 |
-
'input' => 'boolean',
|
| 95 |
-
'type' => 'int',
|
| 96 |
-
'default' => 0,
|
| 97 |
-
'label' => 'Video ausgeben',
|
| 98 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 99 |
-
'visible' => TRUE,
|
| 100 |
-
'required' => FALSE,
|
| 101 |
-
'user_defined' => TRUE,
|
| 102 |
-
'searchable' => FALSE,
|
| 103 |
-
'filterable' => FALSE,
|
| 104 |
-
'comparable' => FALSE,
|
| 105 |
-
'visible_on_front' => FALSE,
|
| 106 |
-
'unique' => FALSE,
|
| 107 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 108 |
-
'is_configurable' => FALSE,
|
| 109 |
-
));
|
| 110 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design', array(
|
| 111 |
-
'group' => 'Clipgenerator',
|
| 112 |
-
'input' => 'select',
|
| 113 |
-
'type' => 'varchar',
|
| 114 |
-
'label' => 'Design',
|
| 115 |
-
'source' => 'trivid_clipgenerator_model_source_designs',
|
| 116 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 117 |
-
'visible' => TRUE,
|
| 118 |
-
'required' => FALSE,
|
| 119 |
-
'user_defined' => TRUE,
|
| 120 |
-
'searchable' => FALSE,
|
| 121 |
-
'filterable' => FALSE,
|
| 122 |
-
'comparable' => FALSE,
|
| 123 |
-
'visible_on_front' => FALSE,
|
| 124 |
-
'unique' => FALSE,
|
| 125 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 126 |
-
'is_configurable' => FALSE,
|
| 127 |
-
));
|
| 128 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select', array(
|
| 129 |
-
'group' => 'Clipgenerator',
|
| 130 |
-
'type' => 'text',
|
| 131 |
-
'input' => 'text',
|
| 132 |
-
'backend' => '',
|
| 133 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_images', //definition of renderer
|
| 134 |
-
'label' => 'Bildauswahl',
|
| 135 |
-
'class' => '',
|
| 136 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 137 |
-
'visible' => TRUE,
|
| 138 |
-
'required' => FALSE,
|
| 139 |
-
'user_defined' => TRUE,
|
| 140 |
-
'searchable' => FALSE,
|
| 141 |
-
'filterable' => FALSE,
|
| 142 |
-
'comparable' => FALSE,
|
| 143 |
-
'visible_on_front' => FALSE,
|
| 144 |
-
'unique' => FALSE,
|
| 145 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 146 |
-
'is_configurable' => FALSE,
|
| 147 |
-
));
|
| 148 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song', array(
|
| 149 |
-
'group' => 'Clipgenerator',
|
| 150 |
-
'input' => 'select',
|
| 151 |
-
'type' => 'varchar',
|
| 152 |
-
'label' => 'Musik',
|
| 153 |
-
'source' => 'trivid_clipgenerator_model_source_musics',
|
| 154 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 155 |
-
'visible' => TRUE,
|
| 156 |
-
'required' => FALSE,
|
| 157 |
-
'user_defined' => TRUE,
|
| 158 |
-
'searchable' => FALSE,
|
| 159 |
-
'filterable' => FALSE,
|
| 160 |
-
'comparable' => FALSE,
|
| 161 |
-
'visible_on_front' => FALSE,
|
| 162 |
-
'unique' => FALSE,
|
| 163 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 164 |
-
'is_configurable' => FALSE,
|
| 165 |
-
));
|
| 166 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select', array(
|
| 167 |
-
'group' => 'Clipgenerator',
|
| 168 |
-
'type' => 'varchar',
|
| 169 |
-
'backend' => '',
|
| 170 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_music', //definition of renderer
|
| 171 |
-
'label' => 'erweiterte Auswahl',
|
| 172 |
-
'class' => '',
|
| 173 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 174 |
-
'visible' => TRUE,
|
| 175 |
-
'required' => FALSE,
|
| 176 |
-
'user_defined' => TRUE,
|
| 177 |
-
'searchable' => FALSE,
|
| 178 |
-
'filterable' => FALSE,
|
| 179 |
-
'comparable' => FALSE,
|
| 180 |
-
'visible_on_front' => FALSE,
|
| 181 |
-
'unique' => FALSE,
|
| 182 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 183 |
-
'is_configurable' => FALSE,
|
| 184 |
-
));
|
| 185 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id', array(
|
| 186 |
-
'group' => 'Clipgenerator',
|
| 187 |
-
'input' => 'text',
|
| 188 |
-
'type' => 'varchar',
|
| 189 |
-
'label' => 'Video ID',
|
| 190 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 191 |
-
'visible' => TRUE,
|
| 192 |
-
'required' => FALSE,
|
| 193 |
-
'user_defined' => TRUE,
|
| 194 |
-
'searchable' => FALSE,
|
| 195 |
-
'filterable' => FALSE,
|
| 196 |
-
'comparable' => FALSE,
|
| 197 |
-
'visible_on_front' => FALSE,
|
| 198 |
-
'unique' => FALSE,
|
| 199 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 200 |
-
'is_configurable' => FALSE,
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.4.php
DELETED
|
@@ -1,202 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Install Script
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.4
|
| 17 |
-
* @since File available since Release 1.0.4
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Creates all necessary product attributes.
|
| 21 |
-
*/
|
| 22 |
-
$installer = $this;
|
| 23 |
-
$installer->startSetup();
|
| 24 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title', array(
|
| 25 |
-
'group' => 'Clipgenerator',
|
| 26 |
-
'input' => 'text',
|
| 27 |
-
'type' => 'varchar',
|
| 28 |
-
'label' => 'Video Titel',
|
| 29 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 30 |
-
'visible' => TRUE,
|
| 31 |
-
'required' => FALSE,
|
| 32 |
-
'user_defined' => TRUE,
|
| 33 |
-
'searchable' => FALSE,
|
| 34 |
-
'filterable' => FALSE,
|
| 35 |
-
'comparable' => FALSE,
|
| 36 |
-
'visible_on_front' => FALSE,
|
| 37 |
-
'unique' => FALSE,
|
| 38 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 39 |
-
'is_configurable' => FALSE,
|
| 40 |
-
));
|
| 41 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description', array(
|
| 42 |
-
'group' => 'Clipgenerator',
|
| 43 |
-
'input' => 'textarea',
|
| 44 |
-
'type' => 'varchar',
|
| 45 |
-
'label' => 'Beschreibung',
|
| 46 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 47 |
-
'visible' => TRUE,
|
| 48 |
-
'required' => FALSE,
|
| 49 |
-
'user_defined' => TRUE,
|
| 50 |
-
'searchable' => FALSE,
|
| 51 |
-
'filterable' => FALSE,
|
| 52 |
-
'comparable' => FALSE,
|
| 53 |
-
'visible_on_front' => FALSE,
|
| 54 |
-
'unique' => FALSE,
|
| 55 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 56 |
-
'is_configurable' => FALSE,
|
| 57 |
-
));
|
| 58 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords', array(
|
| 59 |
-
'group' => 'Clipgenerator',
|
| 60 |
-
'input' => 'text',
|
| 61 |
-
'type' => 'varchar',
|
| 62 |
-
'label' => 'Video Keywords',
|
| 63 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 64 |
-
'visible' => TRUE,
|
| 65 |
-
'required' => FALSE,
|
| 66 |
-
'user_defined' => TRUE,
|
| 67 |
-
'searchable' => FALSE,
|
| 68 |
-
'filterable' => FALSE,
|
| 69 |
-
'comparable' => FALSE,
|
| 70 |
-
'visible_on_front' => FALSE,
|
| 71 |
-
'unique' => FALSE,
|
| 72 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 73 |
-
'is_configurable' => FALSE,
|
| 74 |
-
));
|
| 75 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo', array(
|
| 76 |
-
'group' => 'Clipgenerator',
|
| 77 |
-
'input' => 'text',
|
| 78 |
-
'type' => 'varchar',
|
| 79 |
-
'label' => 'Video Logo URL',
|
| 80 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 81 |
-
'visible' => TRUE,
|
| 82 |
-
'required' => FALSE,
|
| 83 |
-
'user_defined' => TRUE,
|
| 84 |
-
'searchable' => FALSE,
|
| 85 |
-
'filterable' => FALSE,
|
| 86 |
-
'comparable' => FALSE,
|
| 87 |
-
'visible_on_front' => FALSE,
|
| 88 |
-
'unique' => FALSE,
|
| 89 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 90 |
-
'is_configurable' => FALSE,
|
| 91 |
-
));
|
| 92 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show', array(
|
| 93 |
-
'group' => 'Clipgenerator',
|
| 94 |
-
'input' => 'boolean',
|
| 95 |
-
'type' => 'int',
|
| 96 |
-
'default' => 0,
|
| 97 |
-
'label' => 'Video ausgeben',
|
| 98 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 99 |
-
'visible' => TRUE,
|
| 100 |
-
'required' => FALSE,
|
| 101 |
-
'user_defined' => TRUE,
|
| 102 |
-
'searchable' => FALSE,
|
| 103 |
-
'filterable' => FALSE,
|
| 104 |
-
'comparable' => FALSE,
|
| 105 |
-
'visible_on_front' => FALSE,
|
| 106 |
-
'unique' => FALSE,
|
| 107 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 108 |
-
'is_configurable' => FALSE,
|
| 109 |
-
));
|
| 110 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design', array(
|
| 111 |
-
'group' => 'Clipgenerator',
|
| 112 |
-
'input' => 'select',
|
| 113 |
-
'type' => 'varchar',
|
| 114 |
-
'label' => 'Design',
|
| 115 |
-
'source' => 'trivid_clipgenerator_model_source_designs',
|
| 116 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 117 |
-
'visible' => TRUE,
|
| 118 |
-
'required' => FALSE,
|
| 119 |
-
'user_defined' => TRUE,
|
| 120 |
-
'searchable' => FALSE,
|
| 121 |
-
'filterable' => FALSE,
|
| 122 |
-
'comparable' => FALSE,
|
| 123 |
-
'visible_on_front' => FALSE,
|
| 124 |
-
'unique' => FALSE,
|
| 125 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 126 |
-
'is_configurable' => FALSE,
|
| 127 |
-
));
|
| 128 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select', array(
|
| 129 |
-
'group' => 'Clipgenerator',
|
| 130 |
-
'type' => 'text',
|
| 131 |
-
'input' => 'text',
|
| 132 |
-
'backend' => '',
|
| 133 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_images', //definition of renderer
|
| 134 |
-
'label' => 'Bildauswahl',
|
| 135 |
-
'class' => '',
|
| 136 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 137 |
-
'visible' => TRUE,
|
| 138 |
-
'required' => FALSE,
|
| 139 |
-
'user_defined' => TRUE,
|
| 140 |
-
'searchable' => FALSE,
|
| 141 |
-
'filterable' => FALSE,
|
| 142 |
-
'comparable' => FALSE,
|
| 143 |
-
'visible_on_front' => FALSE,
|
| 144 |
-
'unique' => FALSE,
|
| 145 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 146 |
-
'is_configurable' => FALSE,
|
| 147 |
-
));
|
| 148 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song', array(
|
| 149 |
-
'group' => 'Clipgenerator',
|
| 150 |
-
'input' => 'select',
|
| 151 |
-
'type' => 'varchar',
|
| 152 |
-
'label' => 'Musik',
|
| 153 |
-
'source' => 'trivid_clipgenerator_model_source_musics',
|
| 154 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 155 |
-
'visible' => TRUE,
|
| 156 |
-
'required' => FALSE,
|
| 157 |
-
'user_defined' => TRUE,
|
| 158 |
-
'searchable' => FALSE,
|
| 159 |
-
'filterable' => FALSE,
|
| 160 |
-
'comparable' => FALSE,
|
| 161 |
-
'visible_on_front' => FALSE,
|
| 162 |
-
'unique' => FALSE,
|
| 163 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 164 |
-
'is_configurable' => FALSE,
|
| 165 |
-
));
|
| 166 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select', array(
|
| 167 |
-
'group' => 'Clipgenerator',
|
| 168 |
-
'type' => 'varchar',
|
| 169 |
-
'backend' => '',
|
| 170 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_music', //definition of renderer
|
| 171 |
-
'label' => 'erweiterte Auswahl',
|
| 172 |
-
'class' => '',
|
| 173 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 174 |
-
'visible' => TRUE,
|
| 175 |
-
'required' => FALSE,
|
| 176 |
-
'user_defined' => TRUE,
|
| 177 |
-
'searchable' => FALSE,
|
| 178 |
-
'filterable' => FALSE,
|
| 179 |
-
'comparable' => FALSE,
|
| 180 |
-
'visible_on_front' => FALSE,
|
| 181 |
-
'unique' => FALSE,
|
| 182 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 183 |
-
'is_configurable' => FALSE,
|
| 184 |
-
));
|
| 185 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id', array(
|
| 186 |
-
'group' => 'Clipgenerator',
|
| 187 |
-
'input' => 'text',
|
| 188 |
-
'type' => 'varchar',
|
| 189 |
-
'label' => 'Video ID',
|
| 190 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 191 |
-
'visible' => TRUE,
|
| 192 |
-
'required' => FALSE,
|
| 193 |
-
'user_defined' => TRUE,
|
| 194 |
-
'searchable' => FALSE,
|
| 195 |
-
'filterable' => FALSE,
|
| 196 |
-
'comparable' => FALSE,
|
| 197 |
-
'visible_on_front' => FALSE,
|
| 198 |
-
'unique' => FALSE,
|
| 199 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 200 |
-
'is_configurable' => FALSE,
|
| 201 |
-
));
|
| 202 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Trivid/Clipgenerator/sql/clipgenerator_setup/mysql4-install-1.0.5.php
DELETED
|
@@ -1,202 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Install Script
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.5
|
| 17 |
-
* @since File available since Release 1.0.5
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Creates all necessary product attributes.
|
| 21 |
-
*/
|
| 22 |
-
$installer = $this;
|
| 23 |
-
$installer->startSetup();
|
| 24 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title', array(
|
| 25 |
-
'group' => 'Clipgenerator',
|
| 26 |
-
'input' => 'text',
|
| 27 |
-
'type' => 'varchar',
|
| 28 |
-
'label' => 'Video Titel',
|
| 29 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 30 |
-
'visible' => TRUE,
|
| 31 |
-
'required' => FALSE,
|
| 32 |
-
'user_defined' => TRUE,
|
| 33 |
-
'searchable' => FALSE,
|
| 34 |
-
'filterable' => FALSE,
|
| 35 |
-
'comparable' => FALSE,
|
| 36 |
-
'visible_on_front' => FALSE,
|
| 37 |
-
'unique' => FALSE,
|
| 38 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 39 |
-
'is_configurable' => FALSE,
|
| 40 |
-
));
|
| 41 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description', array(
|
| 42 |
-
'group' => 'Clipgenerator',
|
| 43 |
-
'input' => 'textarea',
|
| 44 |
-
'type' => 'varchar',
|
| 45 |
-
'label' => 'Beschreibung',
|
| 46 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 47 |
-
'visible' => TRUE,
|
| 48 |
-
'required' => FALSE,
|
| 49 |
-
'user_defined' => TRUE,
|
| 50 |
-
'searchable' => FALSE,
|
| 51 |
-
'filterable' => FALSE,
|
| 52 |
-
'comparable' => FALSE,
|
| 53 |
-
'visible_on_front' => FALSE,
|
| 54 |
-
'unique' => FALSE,
|
| 55 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 56 |
-
'is_configurable' => FALSE,
|
| 57 |
-
));
|
| 58 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords', array(
|
| 59 |
-
'group' => 'Clipgenerator',
|
| 60 |
-
'input' => 'text',
|
| 61 |
-
'type' => 'varchar',
|
| 62 |
-
'label' => 'Video Keywords',
|
| 63 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 64 |
-
'visible' => TRUE,
|
| 65 |
-
'required' => FALSE,
|
| 66 |
-
'user_defined' => TRUE,
|
| 67 |
-
'searchable' => FALSE,
|
| 68 |
-
'filterable' => FALSE,
|
| 69 |
-
'comparable' => FALSE,
|
| 70 |
-
'visible_on_front' => FALSE,
|
| 71 |
-
'unique' => FALSE,
|
| 72 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 73 |
-
'is_configurable' => FALSE,
|
| 74 |
-
));
|
| 75 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo', array(
|
| 76 |
-
'group' => 'Clipgenerator',
|
| 77 |
-
'input' => 'text',
|
| 78 |
-
'type' => 'varchar',
|
| 79 |
-
'label' => 'Video Logo URL',
|
| 80 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 81 |
-
'visible' => TRUE,
|
| 82 |
-
'required' => FALSE,
|
| 83 |
-
'user_defined' => TRUE,
|
| 84 |
-
'searchable' => FALSE,
|
| 85 |
-
'filterable' => FALSE,
|
| 86 |
-
'comparable' => FALSE,
|
| 87 |
-
'visible_on_front' => FALSE,
|
| 88 |
-
'unique' => FALSE,
|
| 89 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 90 |
-
'is_configurable' => FALSE,
|
| 91 |
-
));
|
| 92 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show', array(
|
| 93 |
-
'group' => 'Clipgenerator',
|
| 94 |
-
'input' => 'boolean',
|
| 95 |
-
'type' => 'int',
|
| 96 |
-
'default' => 0,
|
| 97 |
-
'label' => 'Video ausgeben',
|
| 98 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 99 |
-
'visible' => TRUE,
|
| 100 |
-
'required' => FALSE,
|
| 101 |
-
'user_defined' => TRUE,
|
| 102 |
-
'searchable' => FALSE,
|
| 103 |
-
'filterable' => FALSE,
|
| 104 |
-
'comparable' => FALSE,
|
| 105 |
-
'visible_on_front' => FALSE,
|
| 106 |
-
'unique' => FALSE,
|
| 107 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 108 |
-
'is_configurable' => FALSE,
|
| 109 |
-
));
|
| 110 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design', array(
|
| 111 |
-
'group' => 'Clipgenerator',
|
| 112 |
-
'input' => 'select',
|
| 113 |
-
'type' => 'varchar',
|
| 114 |
-
'label' => 'Design',
|
| 115 |
-
'source' => 'trivid_clipgenerator_model_source_designs',
|
| 116 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 117 |
-
'visible' => TRUE,
|
| 118 |
-
'required' => FALSE,
|
| 119 |
-
'user_defined' => TRUE,
|
| 120 |
-
'searchable' => FALSE,
|
| 121 |
-
'filterable' => FALSE,
|
| 122 |
-
'comparable' => FALSE,
|
| 123 |
-
'visible_on_front' => FALSE,
|
| 124 |
-
'unique' => FALSE,
|
| 125 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 126 |
-
'is_configurable' => FALSE,
|
| 127 |
-
));
|
| 128 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select', array(
|
| 129 |
-
'group' => 'Clipgenerator',
|
| 130 |
-
'type' => 'text',
|
| 131 |
-
'input' => 'text',
|
| 132 |
-
'backend' => '',
|
| 133 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_images', //definition of renderer
|
| 134 |
-
'label' => 'Bildauswahl',
|
| 135 |
-
'class' => '',
|
| 136 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 137 |
-
'visible' => TRUE,
|
| 138 |
-
'required' => FALSE,
|
| 139 |
-
'user_defined' => TRUE,
|
| 140 |
-
'searchable' => FALSE,
|
| 141 |
-
'filterable' => FALSE,
|
| 142 |
-
'comparable' => FALSE,
|
| 143 |
-
'visible_on_front' => FALSE,
|
| 144 |
-
'unique' => FALSE,
|
| 145 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 146 |
-
'is_configurable' => FALSE,
|
| 147 |
-
));
|
| 148 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song', array(
|
| 149 |
-
'group' => 'Clipgenerator',
|
| 150 |
-
'input' => 'select',
|
| 151 |
-
'type' => 'varchar',
|
| 152 |
-
'label' => 'Musik',
|
| 153 |
-
'source' => 'trivid_clipgenerator_model_source_musics',
|
| 154 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 155 |
-
'visible' => TRUE,
|
| 156 |
-
'required' => FALSE,
|
| 157 |
-
'user_defined' => TRUE,
|
| 158 |
-
'searchable' => FALSE,
|
| 159 |
-
'filterable' => FALSE,
|
| 160 |
-
'comparable' => FALSE,
|
| 161 |
-
'visible_on_front' => FALSE,
|
| 162 |
-
'unique' => FALSE,
|
| 163 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 164 |
-
'is_configurable' => FALSE,
|
| 165 |
-
));
|
| 166 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select', array(
|
| 167 |
-
'group' => 'Clipgenerator',
|
| 168 |
-
'type' => 'varchar',
|
| 169 |
-
'backend' => '',
|
| 170 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_music', //definition of renderer
|
| 171 |
-
'label' => 'erweiterte Auswahl',
|
| 172 |
-
'class' => '',
|
| 173 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 174 |
-
'visible' => TRUE,
|
| 175 |
-
'required' => FALSE,
|
| 176 |
-
'user_defined' => TRUE,
|
| 177 |
-
'searchable' => FALSE,
|
| 178 |
-
'filterable' => FALSE,
|
| 179 |
-
'comparable' => FALSE,
|
| 180 |
-
'visible_on_front' => FALSE,
|
| 181 |
-
'unique' => FALSE,
|
| 182 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 183 |
-
'is_configurable' => FALSE,
|
| 184 |
-
));
|
| 185 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id', array(
|
| 186 |
-
'group' => 'Clipgenerator',
|
| 187 |
-
'input' => 'text',
|
| 188 |
-
'type' => 'varchar',
|
| 189 |
-
'label' => 'Video ID',
|
| 190 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 191 |
-
'visible' => TRUE,
|
| 192 |
-
'required' => FALSE,
|
| 193 |
-
'user_defined' => TRUE,
|
| 194 |
-
'searchable' => FALSE,
|
| 195 |
-
'filterable' => FALSE,
|
| 196 |
-
'comparable' => FALSE,
|
| 197 |
-
'visible_on_front' => FALSE,
|
| 198 |
-
'unique' => FALSE,
|
| 199 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 200 |
-
'is_configurable' => FALSE,
|
| 201 |
-
));
|
| 202 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Install Script
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* LICENSE: is available through the world-wide-web at the following URI:
|
| 8 |
-
* http://www.clipgenerator.com/static/public/legal.php If you did not receive a copy of
|
| 9 |
-
* the Clipgenerator - End User License Agreement and are unable to obtain it through the web, please
|
| 10 |
-
* send a note to info@trivid.com so we can mail you a copy immediately.
|
| 11 |
-
*
|
| 12 |
-
* @package Trivid
|
| 13 |
-
* @author Trivid GmbH <author@example.com>
|
| 14 |
-
* @copyright 2013 Trivid GmbH
|
| 15 |
-
* @license http://www.clipgenerator.com/static/public/legal.php Clipgenerator - End User License Agreement
|
| 16 |
-
* @version 1.0.6
|
| 17 |
-
* @since File available since Release 1.0.6
|
| 18 |
-
*/
|
| 19 |
-
/**
|
| 20 |
-
* Creates all necessary product attributes.
|
| 21 |
-
*/
|
| 22 |
-
$installer = $this;
|
| 23 |
-
$installer->startSetup();
|
| 24 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title', array(
|
| 25 |
-
'group' => 'Clipgenerator',
|
| 26 |
-
'input' => 'text',
|
| 27 |
-
'type' => 'varchar',
|
| 28 |
-
'label' => 'Video Titel',
|
| 29 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 30 |
-
'visible' => TRUE,
|
| 31 |
-
'required' => FALSE,
|
| 32 |
-
'user_defined' => TRUE,
|
| 33 |
-
'searchable' => FALSE,
|
| 34 |
-
'filterable' => FALSE,
|
| 35 |
-
'comparable' => FALSE,
|
| 36 |
-
'visible_on_front' => FALSE,
|
| 37 |
-
'unique' => FALSE,
|
| 38 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 39 |
-
'is_configurable' => FALSE,
|
| 40 |
-
));
|
| 41 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description', array(
|
| 42 |
-
'group' => 'Clipgenerator',
|
| 43 |
-
'input' => 'textarea',
|
| 44 |
-
'type' => 'varchar',
|
| 45 |
-
'label' => 'Beschreibung',
|
| 46 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 47 |
-
'visible' => TRUE,
|
| 48 |
-
'required' => FALSE,
|
| 49 |
-
'user_defined' => TRUE,
|
| 50 |
-
'searchable' => FALSE,
|
| 51 |
-
'filterable' => FALSE,
|
| 52 |
-
'comparable' => FALSE,
|
| 53 |
-
'visible_on_front' => FALSE,
|
| 54 |
-
'unique' => FALSE,
|
| 55 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 56 |
-
'is_configurable' => FALSE,
|
| 57 |
-
));
|
| 58 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords', array(
|
| 59 |
-
'group' => 'Clipgenerator',
|
| 60 |
-
'input' => 'text',
|
| 61 |
-
'type' => 'varchar',
|
| 62 |
-
'label' => 'Video Keywords',
|
| 63 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 64 |
-
'visible' => TRUE,
|
| 65 |
-
'required' => FALSE,
|
| 66 |
-
'user_defined' => TRUE,
|
| 67 |
-
'searchable' => FALSE,
|
| 68 |
-
'filterable' => FALSE,
|
| 69 |
-
'comparable' => FALSE,
|
| 70 |
-
'visible_on_front' => FALSE,
|
| 71 |
-
'unique' => FALSE,
|
| 72 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 73 |
-
'is_configurable' => FALSE,
|
| 74 |
-
));
|
| 75 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo', array(
|
| 76 |
-
'group' => 'Clipgenerator',
|
| 77 |
-
'input' => 'text',
|
| 78 |
-
'type' => 'varchar',
|
| 79 |
-
'label' => 'Video Logo URL',
|
| 80 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 81 |
-
'visible' => TRUE,
|
| 82 |
-
'required' => FALSE,
|
| 83 |
-
'user_defined' => TRUE,
|
| 84 |
-
'searchable' => FALSE,
|
| 85 |
-
'filterable' => FALSE,
|
| 86 |
-
'comparable' => FALSE,
|
| 87 |
-
'visible_on_front' => FALSE,
|
| 88 |
-
'unique' => FALSE,
|
| 89 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 90 |
-
'is_configurable' => FALSE,
|
| 91 |
-
));
|
| 92 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show', array(
|
| 93 |
-
'group' => 'Clipgenerator',
|
| 94 |
-
'input' => 'boolean',
|
| 95 |
-
'type' => 'int',
|
| 96 |
-
'default' => 0,
|
| 97 |
-
'label' => 'Video ausgeben',
|
| 98 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 99 |
-
'visible' => TRUE,
|
| 100 |
-
'required' => FALSE,
|
| 101 |
-
'user_defined' => TRUE,
|
| 102 |
-
'searchable' => FALSE,
|
| 103 |
-
'filterable' => FALSE,
|
| 104 |
-
'comparable' => FALSE,
|
| 105 |
-
'visible_on_front' => FALSE,
|
| 106 |
-
'unique' => FALSE,
|
| 107 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 108 |
-
'is_configurable' => FALSE,
|
| 109 |
-
));
|
| 110 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design', array(
|
| 111 |
-
'group' => 'Clipgenerator',
|
| 112 |
-
'input' => 'select',
|
| 113 |
-
'type' => 'varchar',
|
| 114 |
-
'label' => 'Design',
|
| 115 |
-
'source' => 'trivid_clipgenerator_model_source_designs',
|
| 116 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 117 |
-
'visible' => TRUE,
|
| 118 |
-
'required' => FALSE,
|
| 119 |
-
'user_defined' => TRUE,
|
| 120 |
-
'searchable' => FALSE,
|
| 121 |
-
'filterable' => FALSE,
|
| 122 |
-
'comparable' => FALSE,
|
| 123 |
-
'visible_on_front' => FALSE,
|
| 124 |
-
'unique' => FALSE,
|
| 125 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 126 |
-
'is_configurable' => FALSE,
|
| 127 |
-
));
|
| 128 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select', array(
|
| 129 |
-
'group' => 'Clipgenerator',
|
| 130 |
-
'type' => 'text',
|
| 131 |
-
'input' => 'text',
|
| 132 |
-
'backend' => '',
|
| 133 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_images', //definition of renderer
|
| 134 |
-
'label' => 'Bildauswahl',
|
| 135 |
-
'class' => '',
|
| 136 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 137 |
-
'visible' => TRUE,
|
| 138 |
-
'required' => FALSE,
|
| 139 |
-
'user_defined' => TRUE,
|
| 140 |
-
'searchable' => FALSE,
|
| 141 |
-
'filterable' => FALSE,
|
| 142 |
-
'comparable' => FALSE,
|
| 143 |
-
'visible_on_front' => FALSE,
|
| 144 |
-
'unique' => FALSE,
|
| 145 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 146 |
-
'is_configurable' => FALSE,
|
| 147 |
-
));
|
| 148 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song', array(
|
| 149 |
-
'group' => 'Clipgenerator',
|
| 150 |
-
'input' => 'select',
|
| 151 |
-
'type' => 'varchar',
|
| 152 |
-
'label' => 'Musik',
|
| 153 |
-
'source' => 'trivid_clipgenerator_model_source_musics',
|
| 154 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 155 |
-
'visible' => TRUE,
|
| 156 |
-
'required' => FALSE,
|
| 157 |
-
'user_defined' => TRUE,
|
| 158 |
-
'searchable' => FALSE,
|
| 159 |
-
'filterable' => FALSE,
|
| 160 |
-
'comparable' => FALSE,
|
| 161 |
-
'visible_on_front' => FALSE,
|
| 162 |
-
'unique' => FALSE,
|
| 163 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 164 |
-
'is_configurable' => FALSE,
|
| 165 |
-
));
|
| 166 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select', array(
|
| 167 |
-
'group' => 'Clipgenerator',
|
| 168 |
-
'type' => 'varchar',
|
| 169 |
-
'backend' => '',
|
| 170 |
-
'input_renderer' => 'clipgenerator/catalog_product_helper_form_music', //definition of renderer
|
| 171 |
-
'label' => 'erweiterte Auswahl',
|
| 172 |
-
'class' => '',
|
| 173 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 174 |
-
'visible' => TRUE,
|
| 175 |
-
'required' => FALSE,
|
| 176 |
-
'user_defined' => TRUE,
|
| 177 |
-
'searchable' => FALSE,
|
| 178 |
-
'filterable' => FALSE,
|
| 179 |
-
'comparable' => FALSE,
|
| 180 |
-
'visible_on_front' => FALSE,
|
| 181 |
-
'unique' => FALSE,
|
| 182 |
-
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 183 |
-
'is_configurable' => FALSE,
|
| 184 |
-
));
|
| 185 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id', array(
|
| 186 |
-
'group' => 'Clipgenerator',
|
| 187 |
-
'input' => 'text',
|
| 188 |
-
'type' => 'varchar',
|
| 189 |
-
'label' => 'Video ID',
|
| 190 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 191 |
-
'visible' => TRUE,
|
| 192 |
-
'required' => FALSE,
|
| 193 |
-
'user_defined' => TRUE,
|
| 194 |
-
'searchable' => FALSE,
|
| 195 |
-
'filterable' => FALSE,
|
| 196 |
-
'comparable' => FALSE,
|
| 197 |
-
'visible_on_front' => FALSE,
|
| 198 |
-
'unique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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/layout/clipgenerator.xml
DELETED
|
@@ -1,10 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<layout>
|
| 3 |
-
<clipgenerator_adminhtml_orderform_index>
|
| 4 |
-
<update handle="clipgenerator_ordeform_index"/>
|
| 5 |
-
<reference name="content">
|
| 6 |
-
<block type="adminhtml/template" name="orderform"
|
| 7 |
-
template="clipgenerator/orderform.phtml"/>
|
| 8 |
-
</reference>
|
| 9 |
-
</clipgenerator_adminhtml_orderform_index>
|
| 10 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/clipgenerator/contingent.phtml
DELETED
|
@@ -1,27 +0,0 @@
|
|
| 1 |
-
<?php $user = Mage::helper('clipgenerator')->getUser(); ?>
|
| 2 |
-
<?php if($user): ?>
|
| 3 |
-
<div>
|
| 4 |
-
<label><?= Mage::helper('clipgenerator')->__('Verfügbare Video Slots') ?>
|
| 5 |
-
:</label>
|
| 6 |
-
<?= (int)$user['freeVideoSlots'] . " von " . (int)$user['availableVideoSlots'] ?>
|
| 7 |
-
</div>
|
| 8 |
-
<div>
|
| 9 |
-
<label><?= Mage::helper('clipgenerator')->__('Verfügbare Video Downloads') ?>
|
| 10 |
-
:</label>
|
| 11 |
-
<?php if ($user['renderJobsLeft']): ?>
|
| 12 |
-
<?= $user['renderJobsLeft'] ?>
|
| 13 |
-
<?php else: ?>
|
| 14 |
-
<?= Mage::helper('clipgenerator')->__('keine verfügbar') ?>
|
| 15 |
-
<?php endif; ?>
|
| 16 |
-
</div>
|
| 17 |
-
<?php else: ?>
|
| 18 |
-
<div>
|
| 19 |
-
<a href="<?=Mage::helper("adminhtml")->getUrl("clipgenerator/adminhtml_orderform/index");?>"><?=Mage::helper('clipgenerator')->__('Bestellen Sie sich jetzt Ihr Videopaket!')?></a>
|
| 20 |
-
</div>
|
| 21 |
-
<?php endif; ?>
|
| 22 |
-
<script type="text/javascript" src="/js/jscolor/jscolor.js"></script>
|
| 23 |
-
<script type="text/javascript">
|
| 24 |
-
document.observe('dom:loaded', function () {
|
| 25 |
-
var myPicker = new jscolor.color(document.getElementById('clipgenerator_settings_clipgenerator_player_bgcolor'), {});
|
| 26 |
-
});
|
| 27 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/clipgenerator/images.phtml
DELETED
|
@@ -1,108 +0,0 @@
|
|
| 1 |
-
<style type="text/css">
|
| 2 |
-
#picchooser {
|
| 3 |
-
width: 600px;
|
| 4 |
-
overflow: scroll;
|
| 5 |
-
height: 110px;
|
| 6 |
-
border: 4px solid #e5e5e5;
|
| 7 |
-
}
|
| 8 |
-
|
| 9 |
-
.url, .hidden {
|
| 10 |
-
display: none;
|
| 11 |
-
}
|
| 12 |
-
|
| 13 |
-
#picchooser div {
|
| 14 |
-
display: inline;
|
| 15 |
-
position:relative;
|
| 16 |
-
}
|
| 17 |
-
.pic { border:3px solid #fff; }
|
| 18 |
-
.pico { border:3px solid #999; }
|
| 19 |
-
.nr { position:absolute; top:-55px; left:55px; font-size:30px; }
|
| 20 |
-
</style>
|
| 21 |
-
<?php
|
| 22 |
-
$_product = Mage::registry('current_product');
|
| 23 |
-
$_images = $_product->getMediaGalleryImages();
|
| 24 |
-
$selected = $_product->getData('clipgenerator_images_select');
|
| 25 |
-
$selArr = explode(';', trim($selected, ';'));
|
| 26 |
-
?>
|
| 27 |
-
|
| 28 |
-
<?php if ($_images): ?>
|
| 29 |
-
<div id="picchooser">
|
| 30 |
-
<?php foreach ($_images as $_image): ?>
|
| 31 |
-
<?php $pos = array_search($_image->getUrl(), $selArr); ?>
|
| 32 |
-
<div>
|
| 33 |
-
<span class="nr">
|
| 34 |
-
<?php if($pos !== false): ?>
|
| 35 |
-
<?=$pos+1?>
|
| 36 |
-
<?php endif; ?>
|
| 37 |
-
</span>
|
| 38 |
-
<?php if (strstr($selected, $_image->getUrl())): ?>
|
| 39 |
-
<img class="pico" src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail', $_image->getFile())->resize(80, 80); ?>" />
|
| 40 |
-
<?php else: ?>
|
| 41 |
-
<img class="pic" src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail', $_image->getFile())->resize(80, 80); ?>" />
|
| 42 |
-
<?php endif; ?>
|
| 43 |
-
<span class="url"><?= $_image->getUrl() ?></span>
|
| 44 |
-
</div>
|
| 45 |
-
<?php endforeach; ?>
|
| 46 |
-
</div>
|
| 47 |
-
<?php else: ?>
|
| 48 |
-
<?= Mage::helper('clipgenerator')->__('Bitte laden Sie zuerst Bilder hoch.'); ?>
|
| 49 |
-
<?php endif; ?>
|
| 50 |
-
|
| 51 |
-
<script type="text/javascript">
|
| 52 |
-
var title = "<?= str_replace('"', '\'', $_product->getName()) ?>";
|
| 53 |
-
var description = <?= json_encode(str_replace('"', '\'', strip_tags($_product->getDescription()))) ?>;
|
| 54 |
-
var keywords = <?= json_encode(str_replace(array("\r\n", "\r", "\n"), " ", $_product->getMetaKeyword())) ?>;
|
| 55 |
-
var vTitle = "<?=$_product->getData('clipgenerator_title')?>";
|
| 56 |
-
var vDesc = <?= json_encode($_product->getData('clipgenerator_description')) ?>;
|
| 57 |
-
var vKey = "<?= $_product->getData('clipgenerator_keywords')?>";
|
| 58 |
-
$('clipgenerator_images_select').addClassName('hidden');
|
| 59 |
-
document.observe('dom:loaded', function () {
|
| 60 |
-
if(title != '' && !vTitle) {
|
| 61 |
-
$('clipgenerator_title').writeAttribute('value', title);
|
| 62 |
-
}
|
| 63 |
-
if(description != '' && !vDesc) {
|
| 64 |
-
$('clipgenerator_description').innerHTML = description;
|
| 65 |
-
}
|
| 66 |
-
if(keywords != '' && !vKey) {
|
| 67 |
-
$('clipgenerator_keywords').writeAttribute('value', keywords);
|
| 68 |
-
}
|
| 69 |
-
$('clipgenerator_video_id').up().up().hide();
|
| 70 |
-
$$('.pico').each(function (el) {
|
| 71 |
-
el.setOpacity(0.5);
|
| 72 |
-
});
|
| 73 |
-
$('picchooser').observe('click', function (event) {
|
| 74 |
-
pic = Event.element(event);
|
| 75 |
-
if (pic.readAttribute('class') == 'pic') {
|
| 76 |
-
pic.setOpacity(0.5);
|
| 77 |
-
pic.addClassName('pico');
|
| 78 |
-
pic.removeClassName('pic');
|
| 79 |
-
addUrl = ';' + pic.up().select('.url')[0].innerHTML;
|
| 80 |
-
$('clipgenerator_images_select').writeAttribute('value', $('clipgenerator_images_select').readAttribute('value') + addUrl);
|
| 81 |
-
reCount();
|
| 82 |
-
} else if (pic.readAttribute('class') == 'pico') {
|
| 83 |
-
pic.addClassName('pic');
|
| 84 |
-
pic.removeClassName('pico');
|
| 85 |
-
pic.setOpacity(1);
|
| 86 |
-
rmUrl = ';' + pic.up().select('.url')[0].innerHTML;
|
| 87 |
-
$('clipgenerator_images_select').writeAttribute('value', $('clipgenerator_images_select').readAttribute('value').replace(rmUrl, ''));
|
| 88 |
-
pic.up().select('.nr')[0].innerHTML = '';
|
| 89 |
-
reCount();
|
| 90 |
-
}
|
| 91 |
-
});
|
| 92 |
-
});
|
| 93 |
-
|
| 94 |
-
function reCount() {
|
| 95 |
-
var arrImg = $('clipgenerator_images_select').readAttribute('value').split(';');
|
| 96 |
-
counter = 0;
|
| 97 |
-
arrImg.each(function(el) {
|
| 98 |
-
if(el) {
|
| 99 |
-
$$('.url').each(function(nel) {
|
| 100 |
-
if(nel.innerHTML == el) {
|
| 101 |
-
counter = counter + 1;
|
| 102 |
-
nel.up().select('.nr')[0].innerHTML = counter;
|
| 103 |
-
}
|
| 104 |
-
});
|
| 105 |
-
}
|
| 106 |
-
});
|
| 107 |
-
}
|
| 108 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/clipgenerator/music.phtml
DELETED
|
@@ -1,243 +0,0 @@
|
|
| 1 |
-
<script type="text/javascript" src="/js/scriptaculous/sound.js"></script>
|
| 2 |
-
<?php
|
| 3 |
-
$clipgen = Mage::helper('clipgenerator');
|
| 4 |
-
$music = $clipgen->getMusic();
|
| 5 |
-
?>
|
| 6 |
-
<style type="text/css">
|
| 7 |
-
#musicchoose {
|
| 8 |
-
width: 608px;
|
| 9 |
-
}
|
| 10 |
-
|
| 11 |
-
#songs {
|
| 12 |
-
width: 608px;
|
| 13 |
-
height: 300px;
|
| 14 |
-
overflow: scroll;
|
| 15 |
-
background-color: #d3d3d3;
|
| 16 |
-
}
|
| 17 |
-
|
| 18 |
-
#songs div {
|
| 19 |
-
width: 275px;
|
| 20 |
-
float: left;
|
| 21 |
-
padding: 5px;
|
| 22 |
-
margin: 5px;
|
| 23 |
-
background-color: #ffffff;
|
| 24 |
-
height: 50px;
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
#songs div img {
|
| 28 |
-
width: 50px;
|
| 29 |
-
height: 50px;
|
| 30 |
-
float: left;
|
| 31 |
-
padding-right: 5px;
|
| 32 |
-
}
|
| 33 |
-
|
| 34 |
-
#select li {
|
| 35 |
-
display: block;
|
| 36 |
-
float: left;
|
| 37 |
-
width: 116px;
|
| 38 |
-
text-align: center;
|
| 39 |
-
margin: 0;
|
| 40 |
-
padding: 2px 0;
|
| 41 |
-
color: #666;
|
| 42 |
-
font-weight: bold;
|
| 43 |
-
border: 1px solid #d3d3d3;
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
-
.clear {
|
| 47 |
-
width: 100%;
|
| 48 |
-
clear: both;
|
| 49 |
-
height: 0px;
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
-
.choosesong {
|
| 53 |
-
cursor: pointer;
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
#songs .actsong {
|
| 57 |
-
color: #ffffff;
|
| 58 |
-
background-color: #999;
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
#contentmusic {
|
| 62 |
-
position: relative;
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
#musicleftmenu {
|
| 66 |
-
position: absolute;
|
| 67 |
-
left: -202px;
|
| 68 |
-
top: 0;
|
| 69 |
-
height: 298px;
|
| 70 |
-
width: 200px;
|
| 71 |
-
border: 1px solid #d3d3d3;
|
| 72 |
-
overflow: scroll;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
#musicleftmenu li {
|
| 76 |
-
padding: 4px 10px;
|
| 77 |
-
color: #666;
|
| 78 |
-
font-weight: bold;
|
| 79 |
-
}
|
| 80 |
-
|
| 81 |
-
#select li:hover, #select li.act, #musicleftmenu li.act, #musicleftmenu li:hover {
|
| 82 |
-
cursor: pointer;
|
| 83 |
-
background-color: #d3d3d3;
|
| 84 |
-
color: #fff;
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
.control {
|
| 88 |
-
float: right;
|
| 89 |
-
display: none;
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
.actsong .control {
|
| 93 |
-
display: inline;
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
.cprev {
|
| 97 |
-
display: none;
|
| 98 |
-
}
|
| 99 |
-
|
| 100 |
-
.hidden {
|
| 101 |
-
display: none;
|
| 102 |
-
}
|
| 103 |
-
</style>
|
| 104 |
-
<span><?= $clipgen->__('für die Preview ist der Quicktime Player erforderlich') ?></span>
|
| 105 |
-
<div id="musicchoose">
|
| 106 |
-
<ul id="select">
|
| 107 |
-
<li class="genres"><?= $clipgen->__('Genre') ?></li>
|
| 108 |
-
<li class="moods"><?= $clipgen->__('Mood') ?></li>
|
| 109 |
-
<li class="speeds"><?= $clipgen->__('Speed') ?></li>
|
| 110 |
-
<li class="themes"><?= $clipgen->__('Theme') ?></li>
|
| 111 |
-
</ul>
|
| 112 |
-
<div class="clear"> </div>
|
| 113 |
-
<div id="contentmusic">
|
| 114 |
-
<ul id="musicleftmenu">
|
| 115 |
-
<li class="act"><?= $clipgen->__('Alle') ?></li>
|
| 116 |
-
</ul>
|
| 117 |
-
<div id="songs">
|
| 118 |
-
|
| 119 |
-
</div>
|
| 120 |
-
</div>
|
| 121 |
-
</div>
|
| 122 |
-
<pre>
|
| 123 |
-
</pre>
|
| 124 |
-
<?php
|
| 125 |
-
$_product = Mage::registry('current_product');
|
| 126 |
-
$video = $_product->getData('clipgenerator_video_id');
|
| 127 |
-
$html = '<iframe id="clipgeneratorvideo" style="width:400px; height:300px; border:0px none;" src="http://data.clipgenerator.com/player/v3/Player.swf?autoplay=off&webcartURL=http%3A%2F%2Fcg-v3.clipgenerator.com%2FgetWebcart%3FvideoId%3D' . $video . '"></iframe>';
|
| 128 |
-
?>
|
| 129 |
-
<?php if($video): ?>
|
| 130 |
-
<div class="preview">
|
| 131 |
-
<br /><br />
|
| 132 |
-
<label>Video Embed Code:</label> <textarea style="height:60px;"><?=$html?></textarea>
|
| 133 |
-
<label>Preview:</label><br />
|
| 134 |
-
<?=$html?>
|
| 135 |
-
</div>
|
| 136 |
-
<?php endif; ?>
|
| 137 |
-
<script type="text/javascript">
|
| 138 |
-
// music storage
|
| 139 |
-
var storage = <?=json_encode($music)?>;
|
| 140 |
-
var currentTab = 'genres';
|
| 141 |
-
var controlStart = 'play';
|
| 142 |
-
var controlStop = 'stop';
|
| 143 |
-
|
| 144 |
-
function songTimeFormat(seconds) {
|
| 145 |
-
var minutes = ((seconds / 60) + "").split('.');
|
| 146 |
-
var sec = seconds % 60;
|
| 147 |
-
if (sec < 10) {
|
| 148 |
-
sec = "0" + sec;
|
| 149 |
-
}
|
| 150 |
-
return minutes[0] + ":" + sec;
|
| 151 |
-
}
|
| 152 |
-
|
| 153 |
-
function addSong(song) {
|
| 154 |
-
$('songs').insert('<div class="choosesong"><img src="' + song['cover'] + '" /><strong class="title">' + song['title'] + '</strong><br/>' + song['label'] + '<br/> Dauer: ' + songTimeFormat(song['length']) + '<span class="control">play</span><span class="cprev">' + song['previewUrl'] + '</span></div>');
|
| 155 |
-
}
|
| 156 |
-
|
| 157 |
-
storage['songs'].each(function (song) {
|
| 158 |
-
addSong(song);
|
| 159 |
-
});
|
| 160 |
-
|
| 161 |
-
function findProp(arr, id) {
|
| 162 |
-
var found = false;
|
| 163 |
-
arr.some(function (e) {
|
| 164 |
-
if (e == id) {
|
| 165 |
-
found = true;
|
| 166 |
-
return true;
|
| 167 |
-
}
|
| 168 |
-
});
|
| 169 |
-
return found;
|
| 170 |
-
}
|
| 171 |
-
|
| 172 |
-
document.observe('dom:loaded', function () {
|
| 173 |
-
if($('clipgenerator_music_select')) {
|
| 174 |
-
$('clipgenerator_music_select').addClassName('hidden');
|
| 175 |
-
}
|
| 176 |
-
$('select').observe('click', function (event) {
|
| 177 |
-
var load = Event.element(event).readAttribute('class');
|
| 178 |
-
$$('#select li').invoke('removeClassName', 'act');
|
| 179 |
-
Event.element(event).addClassName('act');
|
| 180 |
-
currentTab = load;
|
| 181 |
-
if (storage[load].length != 0) {
|
| 182 |
-
// clear lists
|
| 183 |
-
$('musicleftmenu').update('');
|
| 184 |
-
if(load == 'speeds') {
|
| 185 |
-
$H(storage[load]).each(function (el, index) {
|
| 186 |
-
$('musicleftmenu').insert('<li class="' + el[0] + '">' + el[1] + '</li>');
|
| 187 |
-
});
|
| 188 |
-
} else {
|
| 189 |
-
storage[load].each(function (el) {
|
| 190 |
-
$('musicleftmenu').insert('<li class="' + el['id'] + '">' + el['title'] + '</li>');
|
| 191 |
-
});
|
| 192 |
-
}
|
| 193 |
-
}
|
| 194 |
-
});
|
| 195 |
-
$('musicleftmenu').observe('click', function (event) {
|
| 196 |
-
id = Event.element(event).readAttribute('class');
|
| 197 |
-
$$('#musicleftmenu li').invoke('removeClassName', 'act');
|
| 198 |
-
Event.element(event).addClassName('act');
|
| 199 |
-
if (storage[currentTab].length != 0) {
|
| 200 |
-
$('songs').update('');
|
| 201 |
-
storage['songs'].each(function (song) {
|
| 202 |
-
if (findProp(song[currentTab], id)) {
|
| 203 |
-
addSong(song);
|
| 204 |
-
}
|
| 205 |
-
});
|
| 206 |
-
}
|
| 207 |
-
});
|
| 208 |
-
|
| 209 |
-
$('songs').observe('click', function (event) {
|
| 210 |
-
classEl = Event.element(event).readAttribute('class');
|
| 211 |
-
if (classEl == 'choosesong') {
|
| 212 |
-
$$('.actsong').invoke('removeClassName', 'actsong');
|
| 213 |
-
Event.element(event).addClassName('actsong');
|
| 214 |
-
var elArr = Event.element(event).childElements();
|
| 215 |
-
var findString = elArr[1].innerHTML;
|
| 216 |
-
$$('#clipgenerator_settings_clipgenerator_song option, #clipgenerator_song option').each(function (el) {
|
| 217 |
-
if (findString == el.innerHTML) {
|
| 218 |
-
el.selected = true;
|
| 219 |
-
} else {
|
| 220 |
-
el.selected = false;
|
| 221 |
-
}
|
| 222 |
-
});
|
| 223 |
-
Sound.enable();
|
| 224 |
-
Sound.play('', {replace: true});
|
| 225 |
-
Sound.disable();
|
| 226 |
-
} else if (classEl == 'control') {
|
| 227 |
-
if (Event.element(event).innerHTML == controlStop) {
|
| 228 |
-
$$('.control').invoke('update', controlStart);
|
| 229 |
-
Sound.enable();
|
| 230 |
-
Sound.play('', {replace: true});
|
| 231 |
-
Sound.disable();
|
| 232 |
-
} else {
|
| 233 |
-
$$('.control').invoke('update', controlStart);
|
| 234 |
-
Event.element(event).update(controlStop);
|
| 235 |
-
myEl = Event.element(event);
|
| 236 |
-
var els = myEl.up().select('.cprev');
|
| 237 |
-
Sound.enable();
|
| 238 |
-
Sound.play(els[0].innerHTML, {replace: true});
|
| 239 |
-
}
|
| 240 |
-
}
|
| 241 |
-
});
|
| 242 |
-
});
|
| 243 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/clipgenerator/orderform.phtml
DELETED
|
@@ -1,288 +0,0 @@
|
|
| 1 |
-
<style type="text/css">
|
| 2 |
-
.clipform {
|
| 3 |
-
width: 750px;
|
| 4 |
-
}
|
| 5 |
-
|
| 6 |
-
.cols3, .cols4 {
|
| 7 |
-
width: 640px;
|
| 8 |
-
font-family: Verdana;
|
| 9 |
-
}
|
| 10 |
-
|
| 11 |
-
.clipform h1 {
|
| 12 |
-
font-size: 17px;
|
| 13 |
-
}
|
| 14 |
-
|
| 15 |
-
.clipform h2 {
|
| 16 |
-
font-size: 16px;
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
.cols3 .col {
|
| 20 |
-
width: 200px;
|
| 21 |
-
float: left;
|
| 22 |
-
margin-right: 10px;
|
| 23 |
-
text-align: center;
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
.cols4 .col {
|
| 27 |
-
width: 150px;
|
| 28 |
-
float: left;
|
| 29 |
-
margin-right: 10px;
|
| 30 |
-
text-align: center;
|
| 31 |
-
font-size:10px;
|
| 32 |
-
}
|
| 33 |
-
|
| 34 |
-
.cols3 .col div, .cols4 .col div {
|
| 35 |
-
border: 1px solid #000;
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
.clear {
|
| 39 |
-
width: 100%;
|
| 40 |
-
height: 1px;
|
| 41 |
-
clear: both;
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
.logotrivid {
|
| 45 |
-
float: left;
|
| 46 |
-
margin: 40px 20px 0 0;
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
.welcome {
|
| 50 |
-
float: left;
|
| 51 |
-
width: 500px;
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
.inwrap {
|
| 55 |
-
margin: 10px 0 20px 20px;
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
.mdown {
|
| 59 |
-
margin-bottom: 18px;
|
| 60 |
-
}
|
| 61 |
-
.centerwrap {
|
| 62 |
-
text-align: center;
|
| 63 |
-
}
|
| 64 |
-
.centerwrap .clipform {
|
| 65 |
-
margin:0 auto;
|
| 66 |
-
text-align: left;
|
| 67 |
-
padding:0 10px;
|
| 68 |
-
}
|
| 69 |
-
.price {
|
| 70 |
-
font-size:16px;
|
| 71 |
-
font-weight:bold;
|
| 72 |
-
}
|
| 73 |
-
label {
|
| 74 |
-
font-size: 11px;
|
| 75 |
-
}
|
| 76 |
-
#alert { display:none; border:1px solid #ff0000; background-color:#FFB6C1; margin:20px 0 10px 0; padding:5px; }
|
| 77 |
-
</style>
|
| 78 |
-
<div class="centerwrap">
|
| 79 |
-
<div class="clipform">
|
| 80 |
-
<div>
|
| 81 |
-
<img class="logotrivid" src="http://www.trivid.jp/wp-content/uploads/2013/02/trivid_logo.png"
|
| 82 |
-
title="Trivid GmbH" alt="Trivid GmbH" />
|
| 83 |
-
|
| 84 |
-
<div class="welcome">
|
| 85 |
-
<h1>Sehr geehrter Shop-Betreiber,</h1>
|
| 86 |
-
vielen Dank für Ihr Interesse an der Clipgenerator<sup>TM</sup> simpleCOMMERCE Video-Lösung für Magento. Um Clipgenerator<sup>TM</sup> für Ihren Shop nutzen zu können, benötigen Sie einen API-Zugang den Sie nachfolgend kostenpflichtig bestellen können. Direkt im Anschluss an die Bestellung erhalten Sie von uns einen temporären API-Zugang, damit Sie sofort loslegen können.
|
| 87 |
-
Die Rechnungsstellung erfolgt innerhalb von 2-3 Werktagen per E-Mail an die angegebene E-Mail-Adresse.
|
| 88 |
-
</div>
|
| 89 |
-
</div>
|
| 90 |
-
<div class="clear mdown"> </div>
|
| 91 |
-
<form action="http://magento.clipgenerator.com/" method="POST" id="orderf">
|
| 92 |
-
<ol>
|
| 93 |
-
<li>
|
| 94 |
-
<h2>1. Paket auswählen</h2>
|
| 95 |
-
|
| 96 |
-
<div class="inwrap">
|
| 97 |
-
<div class="cols4">
|
| 98 |
-
<div class="col">
|
| 99 |
-
<div>
|
| 100 |
-
<strong>simpleCOMMERCE 150</strong><br />
|
| 101 |
-
für insgesamt 150 Produktvideos<br />
|
| 102 |
-
<span class="price">39 EUR</span><br />
|
| 103 |
-
/Monat
|
| 104 |
-
</div>
|
| 105 |
-
<input type="radio" name="editor-package" value="Magento-video-150" /> <label>simpleCOMMERCE
|
| 106 |
-
150</label>
|
| 107 |
-
</div>
|
| 108 |
-
<div class="col">
|
| 109 |
-
<div>
|
| 110 |
-
<strong>simpleCOMMERCE 300</strong><br />
|
| 111 |
-
für insgesamt 300 Produktvideos<br />
|
| 112 |
-
<span class="price">59 EUR</span><br />
|
| 113 |
-
/Monat
|
| 114 |
-
</div>
|
| 115 |
-
<input type="radio" name="editor-package" value="Magento-video-300" /> <label>simpleCOMMERCE
|
| 116 |
-
300</label>
|
| 117 |
-
</div>
|
| 118 |
-
<div class="col">
|
| 119 |
-
<div>
|
| 120 |
-
<strong>simpleCOMMERCE 750</strong><br />
|
| 121 |
-
für insgesamt 750 Produktvideos<br />
|
| 122 |
-
<span class="price">139 EUR</span><br />
|
| 123 |
-
/Monat
|
| 124 |
-
</div>
|
| 125 |
-
<input type="radio" name="editor-package" value="Magento-video-750" /> <label>simpleCOMMERCE
|
| 126 |
-
750</label>
|
| 127 |
-
</div>
|
| 128 |
-
<div class="col">
|
| 129 |
-
<div>
|
| 130 |
-
<strong>simpleCOMMERCE 1500</strong><br />
|
| 131 |
-
für insgesamt 1500 Produktvideos<br />
|
| 132 |
-
<span class="price">289 EUR</span><br />
|
| 133 |
-
/Monat
|
| 134 |
-
</div>
|
| 135 |
-
<input type="radio" name="editor-package" value="Magento-video-1500" /> <label>simpleCOMMERCE
|
| 136 |
-
1500</label>
|
| 137 |
-
</div>
|
| 138 |
-
</div>
|
| 139 |
-
<div class="clear"> </div>
|
| 140 |
-
<br />
|
| 141 |
-
|
| 142 |
-
<h2>In jedem Paket enthalten:</h2>
|
| 143 |
-
<ul>
|
| 144 |
-
<li>unbegrenzte Aktualisierung und Synchronisierung von Videos bei jeder Änderung</li>
|
| 145 |
-
<li>unbegrenzte Anzahl Aufrufe Produkt-Videos</li>
|
| 146 |
-
<li>nklusive Video-Hosting & Video-Streaming</li>
|
| 147 |
-
<li>zusätzlich statische Video-Dateien in allen Formaten</li>
|
| 148 |
-
<li>hohe Video-Qualität und Video-Player mit vielen Funktionen</li>
|
| 149 |
-
<li>wechselnde Video-Designs</li>
|
| 150 |
-
<li>150 Musik-Titel, voll lizensiert und abwechselnd unterlegt</li>
|
| 151 |
-
<li>Suchmaschinen-Optimierung (SEO) durch dynamische Sitemaps, Thumbnails, Titel und Keywords</li>
|
| 152 |
-
<li>Video-Ausgabe-Format als url, embed code oder Player mit Share-Funktionen für Social-Media</li>
|
| 153 |
-
</ul>
|
| 154 |
-
</div>
|
| 155 |
-
</li>
|
| 156 |
-
<li>
|
| 157 |
-
<h2>2. Optional: Download-Pakete</h2>
|
| 158 |
-
|
| 159 |
-
<div class="inwrap">
|
| 160 |
-
Damit Sie die erstellten, immer aktuellen Produkt-Videos auch an anderer Stelle verwenden können, bieten wir den Download als Video-Datei an (mp4-Format). Ausgewählte Produkt-Videos können Sie somit auch offline verwenden (z.B. für Präsentationen am POS) oder außerhalb Ihres Shops (z.B. auf YouTube oder anderen Verkaufs-oder Vergleichs-Portalen) veröffentlichen.
|
| 161 |
-
<div class="cols4">
|
| 162 |
-
<div class="col">
|
| 163 |
-
<div>
|
| 164 |
-
<br/>keine Video Downloads bestellen<br/><span class="price"> </span>
|
| 165 |
-
</div>
|
| 166 |
-
<input type="radio" name="downloads-package" value="" /> <label>ohne</label>
|
| 167 |
-
</div>
|
| 168 |
-
<div class="col">
|
| 169 |
-
<div>
|
| 170 |
-
<strong>30 Video Downloads</strong><br />
|
| 171 |
-
<span class="price">59 EUR</span><br />
|
| 172 |
-
Gesamtpreis<br />
|
| 173 |
-
(1,96 EUR / Video)
|
| 174 |
-
</div>
|
| 175 |
-
<input type="radio" name="downloads-package" value="Magento-downloads-30" /> <label>30 Video
|
| 176 |
-
Downloads</label>
|
| 177 |
-
</div>
|
| 178 |
-
<div class="col">
|
| 179 |
-
<div>
|
| 180 |
-
<strong>50 Video Downloads</strong><br />
|
| 181 |
-
<span class="price">79 EUR</span><br />
|
| 182 |
-
Gesamtpreis<br />
|
| 183 |
-
(1,58 EUR / Video)
|
| 184 |
-
</div>
|
| 185 |
-
<input type="radio" name="downloads-package" value="Magento-downloads-50" /> <label>50 Video
|
| 186 |
-
Downloads</label>
|
| 187 |
-
</div>
|
| 188 |
-
<div class="col">
|
| 189 |
-
<div>
|
| 190 |
-
<strong>100 Video Downloads</strong><br />
|
| 191 |
-
<span class="price">139 EUR</span><br />
|
| 192 |
-
Gesamtpreis<br />
|
| 193 |
-
(1,39 EUR / Video)
|
| 194 |
-
</div>
|
| 195 |
-
<input type="radio" name="downloads-package" value="Magento-downloads-100" /> <label>100 Video
|
| 196 |
-
Downloads</label>
|
| 197 |
-
</div>
|
| 198 |
-
</div>
|
| 199 |
-
<div class="clear"> </div>
|
| 200 |
-
</div>
|
| 201 |
-
</li>
|
| 202 |
-
<li>
|
| 203 |
-
<h2>3. Ihre Angaben zur Bestellung</h2>
|
| 204 |
-
|
| 205 |
-
<div class="inwrap">
|
| 206 |
-
<div>
|
| 207 |
-
Bitte geben Sie nachfolgend die Rechnungsadresse ein, die für diese Bestellung verwendet werden soll.
|
| 208 |
-
</div>
|
| 209 |
-
<div id="alert">Bitte geben Sie alle Pflichtfelder an!</div>
|
| 210 |
-
<div>
|
| 211 |
-
<label>Name (Pflichtfeld)</label><br />
|
| 212 |
-
<input name="name" type="text" /><br />
|
| 213 |
-
<label>Firma (Pflichtfeld)</label><br />
|
| 214 |
-
<input name="company" type="text" /><br />
|
| 215 |
-
<label>USt-IdNr (Pflichtfeld)</label><br />
|
| 216 |
-
<input name="ust-idnr" type="text" /><br />
|
| 217 |
-
<label>Adresse (Pflichtfeld)</label><br />
|
| 218 |
-
<input name="address" type="text" /><br />
|
| 219 |
-
<label>PLZ, Ort (Pflichtfeld)</label><br />
|
| 220 |
-
<input name="city" type="text" /><br />
|
| 221 |
-
<label>E-Mail-Adresse (Pflichtfeld)</label><br />
|
| 222 |
-
<input name="email" id="mailfield" type="text" /><br />
|
| 223 |
-
<label>Telefon (Pflichtfeld)</label><br />
|
| 224 |
-
<input name="phone" type="text" /><br />
|
| 225 |
-
<label>Raum für Anmerkungen zu Ihrer
|
| 226 |
-
Bestellung</label><br />
|
| 227 |
-
<textarea name="message"></textarea><br />
|
| 228 |
-
<input type="checkbox" name="confirmation" /> Hiermit
|
| 229 |
-
bestätige ich die Bestellung.<br />
|
| 230 |
-
<button id="submit">Kostenpflichtig bestellen</button>
|
| 231 |
-
<br /><br />
|
| 232 |
-
|
| 233 |
-
<div>
|
| 234 |
-
<strong>Zahlungsbedingungen:</strong><br />
|
| 235 |
-
Die simpleCOMMERCE-Lizenz kann jederzeit mit einer Frist von 30 Tagen zum Monatsende gekündigt werden. Eine Erst-Laufzeit von mindestens 12 Monaten wird mit einem Basispreis/Flatrate im voraus für die Laufzeit erhoben per Rechnung erhoben. Zahlbar sofort nach Rechnungsstellung ohne Abzug.
|
| 236 |
-
Die simpleCOMMERCE- / Clipgenerator-Lösung beinhaltet die ausschließlichen, zeitlich unbegrenzten, internationalen Nutzungsrechte für Musik, Video-Effekte und Designs. Das automatisierte Video-Verfahren mit Clipgenerator ist patentiert und rechtlich geschützt. Das Nutzungsrecht geht erst nach vollständiger Bezahlung der Leistungen auf den Kunden über.
|
| 237 |
-
Es gelten unsere allgemeinen Geschäftsbedingungen, die Sie auf unserer Website unter “www.trivid.com/agb” abrufen können oder auf Nachfrage zugeschickt erhalten.
|
| 238 |
-
</div>
|
| 239 |
-
</div>
|
| 240 |
-
</div>
|
| 241 |
-
</li>
|
| 242 |
-
</ol>
|
| 243 |
-
</form>
|
| 244 |
-
</div>
|
| 245 |
-
</div>
|
| 246 |
-
<script src="http://code.jquery.com/jquery.js"></script>
|
| 247 |
-
|
| 248 |
-
<script type="text/javascript">
|
| 249 |
-
// send form
|
| 250 |
-
jQuery.noConflict();
|
| 251 |
-
var adminUrl = '<?=Mage::helper("adminhtml")->getUrl("clipgenerator/adminhtml_orderform/index");?>';
|
| 252 |
-
var successUrl = '<?=Mage::helper("adminhtml")->getUrl("adminhtml/system_config/edit/section/clipgenerator");?>';
|
| 253 |
-
|
| 254 |
-
jQuery('#submit').click(function(event) {
|
| 255 |
-
jQuery.ajax({
|
| 256 |
-
type: 'POST',
|
| 257 |
-
url: 'http://magento.clipgenerator.com/',
|
| 258 |
-
crossDomain: true,
|
| 259 |
-
data: jQuery('#orderf').serialize(),
|
| 260 |
-
dataType: 'json',
|
| 261 |
-
success: function (responseData, textStatus, jqXHR) {
|
| 262 |
-
if(responseData['apiId'] && responseData['apiUser'] && responseData['apiSecret']) {
|
| 263 |
-
jQuery.ajax({
|
| 264 |
-
type: 'POST',
|
| 265 |
-
crossDomain: true,
|
| 266 |
-
url: adminUrl,
|
| 267 |
-
data: {
|
| 268 |
-
'form_key': '<?=Mage::getSingleton('core/session')->getFormKey();?>',
|
| 269 |
-
'isAjax': true,
|
| 270 |
-
'apiId': responseData['apiId'],
|
| 271 |
-
'apiUser': responseData['apiUser'],
|
| 272 |
-
'apiSecret': responseData['apiSecret'],
|
| 273 |
-
'email': jQuery('#mailfield').val()
|
| 274 |
-
},
|
| 275 |
-
dataType: 'json',
|
| 276 |
-
success: function(result) {
|
| 277 |
-
window.location = successUrl;
|
| 278 |
-
}
|
| 279 |
-
});
|
| 280 |
-
}
|
| 281 |
-
},
|
| 282 |
-
error: function (responseData, textStatus, errorThrown) {
|
| 283 |
-
alert('Ein Fehler ist aufgetreten! Prüfen Sie Ihre Daten.');
|
| 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href="?uninstall=1"><?= $this->__('Uninstall') ?></a> | <a href="?install=1"><?= $this->__('Install') ?></a><br/>
|
| 2 |
+
<?php
|
| 3 |
+
if($_GET['uninstall'] == 1) {
|
| 4 |
+
$setup = Mage::getResourceModel('catalog/setup','catalog_setup');
|
| 5 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title');
|
| 6 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description');
|
| 7 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords');
|
| 8 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo');
|
| 9 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show');
|
| 10 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design');
|
| 11 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select');
|
| 12 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song');
|
| 13 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select');
|
| 14 |
+
$setup->removeAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id');
|
| 15 |
+
$setup->endSetup();
|
| 16 |
+
echo '<strong>' . $this->__('Attributes uninstalled.') . '</strong><br /><br />';
|
| 17 |
+
} else if ($_GET['install'] == 1) {
|
| 18 |
+
$installer = Mage::getResourceModel('catalog/setup','catalog_setup');
|
| 19 |
+
$installer->startSetup();
|
| 20 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_title', array(
|
| 21 |
+
'group' => 'Clipgenerator',
|
| 22 |
+
'input' => 'text',
|
| 23 |
+
'type' => 'varchar',
|
| 24 |
+
'label' => 'Video Titel',
|
| 25 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 26 |
+
'visible' => TRUE,
|
| 27 |
+
'required' => FALSE,
|
| 28 |
+
'user_defined' => TRUE,
|
| 29 |
+
'searchable' => FALSE,
|
| 30 |
+
'filterable' => FALSE,
|
| 31 |
+
'comparable' => FALSE,
|
| 32 |
+
'visible_on_front' => FALSE,
|
| 33 |
+
'unique' => FALSE,
|
| 34 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 35 |
+
'is_configurable' => FALSE,
|
| 36 |
+
));
|
| 37 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_description', array(
|
| 38 |
+
'group' => 'Clipgenerator',
|
| 39 |
+
'input' => 'textarea',
|
| 40 |
+
'type' => 'varchar',
|
| 41 |
+
'label' => 'Beschreibung',
|
| 42 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 43 |
+
'visible' => TRUE,
|
| 44 |
+
'required' => FALSE,
|
| 45 |
+
'user_defined' => TRUE,
|
| 46 |
+
'searchable' => FALSE,
|
| 47 |
+
'filterable' => FALSE,
|
| 48 |
+
'comparable' => FALSE,
|
| 49 |
+
'visible_on_front' => FALSE,
|
| 50 |
+
'unique' => FALSE,
|
| 51 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 52 |
+
'is_configurable' => FALSE,
|
| 53 |
+
));
|
| 54 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_keywords', array(
|
| 55 |
+
'group' => 'Clipgenerator',
|
| 56 |
+
'input' => 'text',
|
| 57 |
+
'type' => 'varchar',
|
| 58 |
+
'label' => 'Video Keywords',
|
| 59 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 60 |
+
'visible' => TRUE,
|
| 61 |
+
'required' => FALSE,
|
| 62 |
+
'user_defined' => TRUE,
|
| 63 |
+
'searchable' => FALSE,
|
| 64 |
+
'filterable' => FALSE,
|
| 65 |
+
'comparable' => FALSE,
|
| 66 |
+
'visible_on_front' => FALSE,
|
| 67 |
+
'unique' => FALSE,
|
| 68 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 69 |
+
'is_configurable' => FALSE,
|
| 70 |
+
));
|
| 71 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_logo', array(
|
| 72 |
+
'group' => 'Clipgenerator',
|
| 73 |
+
'input' => 'text',
|
| 74 |
+
'type' => 'varchar',
|
| 75 |
+
'label' => 'Video Logo URL',
|
| 76 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 77 |
+
'visible' => TRUE,
|
| 78 |
+
'required' => FALSE,
|
| 79 |
+
'user_defined' => TRUE,
|
| 80 |
+
'searchable' => FALSE,
|
| 81 |
+
'filterable' => FALSE,
|
| 82 |
+
'comparable' => FALSE,
|
| 83 |
+
'visible_on_front' => FALSE,
|
| 84 |
+
'unique' => FALSE,
|
| 85 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 86 |
+
'is_configurable' => FALSE,
|
| 87 |
+
));
|
| 88 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_show', array(
|
| 89 |
+
'group' => 'Clipgenerator',
|
| 90 |
+
'input' => 'boolean',
|
| 91 |
+
'type' => 'int',
|
| 92 |
+
'default' => 0,
|
| 93 |
+
'label' => 'Video ausgeben',
|
| 94 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 95 |
+
'visible' => TRUE,
|
| 96 |
+
'required' => FALSE,
|
| 97 |
+
'user_defined' => TRUE,
|
| 98 |
+
'searchable' => FALSE,
|
| 99 |
+
'filterable' => FALSE,
|
| 100 |
+
'comparable' => FALSE,
|
| 101 |
+
'visible_on_front' => FALSE,
|
| 102 |
+
'unique' => FALSE,
|
| 103 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 104 |
+
'is_configurable' => FALSE,
|
| 105 |
+
));
|
| 106 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_design', array(
|
| 107 |
+
'group' => 'Clipgenerator',
|
| 108 |
+
'input' => 'select',
|
| 109 |
+
'type' => 'varchar',
|
| 110 |
+
'label' => 'Design',
|
| 111 |
+
'source' => 'trivid_clipgenerator_model_source_designs',
|
| 112 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 113 |
+
'visible' => TRUE,
|
| 114 |
+
'required' => FALSE,
|
| 115 |
+
'user_defined' => TRUE,
|
| 116 |
+
'searchable' => FALSE,
|
| 117 |
+
'filterable' => FALSE,
|
| 118 |
+
'comparable' => FALSE,
|
| 119 |
+
'visible_on_front' => FALSE,
|
| 120 |
+
'unique' => FALSE,
|
| 121 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 122 |
+
'is_configurable' => FALSE,
|
| 123 |
+
));
|
| 124 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_images_select', array(
|
| 125 |
+
'group' => 'Clipgenerator',
|
| 126 |
+
'type' => 'text',
|
| 127 |
+
'input' => 'text',
|
| 128 |
+
'backend' => '',
|
| 129 |
+
'input_renderer' => 'clipgenerator/catalog_product_helper_form_images', //definition of renderer
|
| 130 |
+
'label' => 'Bildauswahl',
|
| 131 |
+
'class' => '',
|
| 132 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 133 |
+
'visible' => TRUE,
|
| 134 |
+
'required' => FALSE,
|
| 135 |
+
'user_defined' => TRUE,
|
| 136 |
+
'searchable' => FALSE,
|
| 137 |
+
'filterable' => FALSE,
|
| 138 |
+
'comparable' => FALSE,
|
| 139 |
+
'visible_on_front' => FALSE,
|
| 140 |
+
'unique' => FALSE,
|
| 141 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 142 |
+
'is_configurable' => FALSE,
|
| 143 |
+
));
|
| 144 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_song', array(
|
| 145 |
+
'group' => 'Clipgenerator',
|
| 146 |
+
'input' => 'select',
|
| 147 |
+
'type' => 'varchar',
|
| 148 |
+
'label' => 'Musik',
|
| 149 |
+
'source' => 'trivid_clipgenerator_model_source_musics',
|
| 150 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 151 |
+
'visible' => TRUE,
|
| 152 |
+
'required' => FALSE,
|
| 153 |
+
'user_defined' => TRUE,
|
| 154 |
+
'searchable' => FALSE,
|
| 155 |
+
'filterable' => FALSE,
|
| 156 |
+
'comparable' => FALSE,
|
| 157 |
+
'visible_on_front' => FALSE,
|
| 158 |
+
'unique' => FALSE,
|
| 159 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 160 |
+
'is_configurable' => FALSE,
|
| 161 |
+
));
|
| 162 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_music_select', array(
|
| 163 |
+
'group' => 'Clipgenerator',
|
| 164 |
+
'type' => 'varchar',
|
| 165 |
+
'backend' => '',
|
| 166 |
+
'input_renderer' => 'clipgenerator/catalog_product_helper_form_music', //definition of renderer
|
| 167 |
+
'label' => 'erweiterte Auswahl',
|
| 168 |
+
'class' => '',
|
| 169 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 170 |
+
'visible' => TRUE,
|
| 171 |
+
'required' => FALSE,
|
| 172 |
+
'user_defined' => TRUE,
|
| 173 |
+
'searchable' => FALSE,
|
| 174 |
+
'filterable' => FALSE,
|
| 175 |
+
'comparable' => FALSE,
|
| 176 |
+
'visible_on_front' => FALSE,
|
| 177 |
+
'unique' => FALSE,
|
| 178 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 179 |
+
'is_configurable' => FALSE,
|
| 180 |
+
));
|
| 181 |
+
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'clipgenerator_video_id', array(
|
| 182 |
+
'group' => 'Clipgenerator',
|
| 183 |
+
'input' => 'text',
|
| 184 |
+
'type' => 'varchar',
|
| 185 |
+
'label' => 'Video ID',
|
| 186 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
|
| 187 |
+
'visible' => TRUE,
|
| 188 |
+
'required' => FALSE,
|
| 189 |
+
'user_defined' => TRUE,
|
| 190 |
+
'searchable' => FALSE,
|
| 191 |
+
'filterable' => FALSE,
|
| 192 |
+
'comparable' => FALSE,
|
| 193 |
+
'visible_on_front' => FALSE,
|
| 194 |
+
'unique' => FALSE,
|
| 195 |
+
'apply_to' => 'simple,configurable,bundle,grouped',
|
| 196 |
+
'is_configurable' => FALSE,
|
| 197 |
+
));
|
| 198 |
+
$installer->endSetup();
|
| 199 |
+
echo '<strong>' . $this->__('Attributes installed.') . '</strong><br /><br />';
|
| 200 |
+
}
|
| 201 |
+
?>
|
| 202 |
+
<p><?= $this->__('ATTENTION: All Clipgenerator settings in your products will be deleted.') ?></p>
|
app/etc/modules/Trivid_Clipgenerator.xml
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
<modules>
|
| 4 |
-
<Trivid_Clipgenerator>
|
| 5 |
-
<active>true</active>
|
| 6 |
-
<codePool>community</codePool>
|
| 7 |
-
</Trivid_Clipgenerator>
|
| 8 |
-
</modules>
|
| 9 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/de_DE/Trivid_Clipgenerator.csv
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
"Genre","Genre"
|
| 2 |
-
"Mood","Stimmung"
|
| 3 |
-
"Instruments","Instrumente"
|
| 4 |
-
"Speed","Tempo"
|
| 5 |
-
"Theme","Thema"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>clipgenerator</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.clipgenerator.com/static/public/legal.php">Clipgenerator - End User License Agreement</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -53,17 +53,12 @@
|
|
| 53 |

|
| 54 |
<h3>Anleitung</h3>
|
| 55 |
Eine Anleitung zur Nutzung des Clipgenerator™-Plugin für Magento können Sie <a href="http://www.trivid.com/wp-content/uploads/2013/10/clipgenerator-plugin-handbuch.pdf">hier</a> herunterladen.</description>
|
| 56 |
-
<notes>*
|
| 57 |
-
*
|
| 58 |
-
* PHP Version 5.2.0 - 6.0.0
|
| 59 |
-
* Advanced Block Config v1.0.3
|
| 60 |
-
* fixes loading api resp. 1.0.4
|
| 61 |
-
* v3 Player 1.0.5
|
| 62 |
-
* player bg color, preview&embed code 1.0.6</notes>
|
| 63 |
<authors><author><name>Trivid GmbH</name><user>trivid_gmbh</user><email>magento@clipgenerator.com</email></author></authors>
|
| 64 |
-
<date>
|
| 65 |
-
<time>
|
| 66 |
-
<contents><target name="magecommunity"><dir><dir name="Trivid"><dir name="Clipgenerator"><dir><dir name="
|
| 67 |
<compatible/>
|
| 68 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 69 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>clipgenerator</name>
|
| 4 |
+
<version>1.0.7</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.clipgenerator.com/static/public/legal.php">Clipgenerator - End User License Agreement</license>
|
| 7 |
<channel>community</channel>
|
| 53 |

|
| 54 |
<h3>Anleitung</h3>
|
| 55 |
Eine Anleitung zur Nutzung des Clipgenerator™-Plugin für Magento können Sie <a href="http://www.trivid.com/wp-content/uploads/2013/10/clipgenerator-plugin-handbuch.pdf">hier</a> herunterladen.</description>
|
| 56 |
+
<notes>* Uninstall helper in configuration
|
| 57 |
+
* Version 1.0.7</notes>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
<authors><author><name>Trivid GmbH</name><user>trivid_gmbh</user><email>magento@clipgenerator.com</email></author></authors>
|
| 59 |
+
<date>2014-02-27</date>
|
| 60 |
+
<time>23:16:02</time>
|
| 61 |
+
<contents><target name="magecommunity"><dir><dir name="Trivid"><dir name="Clipgenerator"><dir><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Uninstallhelper.php" hash="0f822bdaecb686fab023f95673d03213"/></dir></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="b1fa9c82895328ebf7a06c83c390cbe0"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="clipgenerator"><file name="uninstall.phtml" hash="8884d93dfe102dc5ab4c8fc0c3059fa3"/></dir></dir><dir name="layout"><file name="clipgenerator.xml" hash=""/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Trivid_Clipgenerator.csv" hash=""/></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Trivid_Clipgenerator.xml" hash=""/></dir></dir></target></contents>
|
| 62 |
<compatible/>
|
| 63 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 64 |
</package>
|
