Version Notes
Initial release
Download this release
Release Info
Developer | James Anelay |
Extension | Powr_Pack |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Powr/Pack/Block/IdGenerator.php +23 -0
- app/code/community/Powr/Pack/Block/Widget.php +11 -0
- app/code/community/Powr/Pack/Helper/Data.php +11 -0
- app/code/community/Powr/Pack/Helper/Idgenerator.php +30 -0
- app/code/community/Powr/Pack/Model/Resource/Setup.php +15 -0
- app/code/community/Powr/Pack/Test/Block/Widget.php +14 -0
- app/code/community/Powr/Pack/Test/Config/Main.php +41 -0
- app/code/community/Powr/Pack/Test/Config/Wiget.php +41 -0
- app/code/community/Powr/Pack/Test/Helper/Idgenerator.php +18 -0
- app/code/community/Powr/Pack/controllers/Adminhtml/PowrController.php +13 -0
- app/code/community/Powr/Pack/etc/adminhtml.xml +36 -0
- app/code/community/Powr/Pack/etc/config.xml +75 -0
- app/code/community/Powr/Pack/etc/widget.xml +140 -0
- app/code/community/Powr/Pack/sql/powr_pack_setup/install-0.1.0.php +10 -0
- app/design/adminhtml/default/default/layout/powr/pack.xml +14 -0
- app/design/adminhtml/default/default/template/powr/pack/iframe.phtml +7 -0
- app/design/frontend/base/default/layout/powr/pack.xml +14 -0
- app/design/frontend/base/default/template/powr/pack/widget.phtml +3 -0
- app/etc/modules/Powr_Pack.xml +9 -0
- package.xml +18 -0
app/code/community/Powr/Pack/Block/IdGenerator.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Block_IdGenerator extends Mage_Adminhtml_Block_Template
|
9 |
+
{
|
10 |
+
public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element){
|
11 |
+
if($element->hasValue()){
|
12 |
+
$id = $element->getValue();
|
13 |
+
} else {
|
14 |
+
$id = Mage::helper('powr_pack/idgenerator')->getRandomId();
|
15 |
+
}
|
16 |
+
|
17 |
+
$html = '<input id="'.$element->getHtmlId().'" name="'.$element->getName().'" value="'.$id.'" class="widget-option input-text" type="text">';
|
18 |
+
|
19 |
+
$element->setData('after_element_html', $html);
|
20 |
+
return $element;
|
21 |
+
|
22 |
+
}
|
23 |
+
}
|
app/code/community/Powr/Pack/Block/Widget.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Block_Widget extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface
|
9 |
+
{
|
10 |
+
|
11 |
+
}
|
app/code/community/Powr/Pack/Helper/Data.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Helper_Data extends Mage_Core_Helper_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
}
|
app/code/community/Powr/Pack/Helper/Idgenerator.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Helper_Idgenerator extends Mage_Core_Helper_Abstract
|
9 |
+
{
|
10 |
+
public function getRandomId(){
|
11 |
+
$randomValuesArray = $this->generateArrayOfRandomValues();
|
12 |
+
$randomString = $this->addCurrentTimeToAvoidDuplicateKeysAndConvertToString($randomValuesArray);
|
13 |
+
return $randomString;
|
14 |
+
}
|
15 |
+
|
16 |
+
private function addCurrentTimeToAvoidDuplicateKeysAndConvertToString($pass){
|
17 |
+
return implode($pass) . time();
|
18 |
+
}
|
19 |
+
|
20 |
+
private function generateArrayOfRandomValues(){
|
21 |
+
$alphabet = 'abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789';
|
22 |
+
$randomArray = array();
|
23 |
+
$alphaLength = strlen($alphabet) - 1;
|
24 |
+
for ($i = 0; $i < 10; $i++) {
|
25 |
+
$n = rand(0, $alphaLength);
|
26 |
+
$randomArray[] = $alphabet[$n];
|
27 |
+
}
|
28 |
+
return $randomArray;
|
29 |
+
}
|
30 |
+
}
|
app/code/community/Powr/Pack/Model/Resource/Setup.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php class Powr_Pack_Model_Resource_Setup extends Mage_Sales_Model_Resource_Setup
|
2 |
+
{
|
3 |
+
public function addInstallationSuccessfulNotification(){
|
4 |
+
$inboxModel = Mage::getModel('adminnotification/inbox');
|
5 |
+
if(!method_exists($inboxModel,'addNotice')){
|
6 |
+
return;
|
7 |
+
}
|
8 |
+
$message = "You have successfully installed Powr_Pack and can configure your widgets at Cms > Powr Pack";
|
9 |
+
$inboxModel->addNotice(
|
10 |
+
$message,
|
11 |
+
$message,
|
12 |
+
true
|
13 |
+
);
|
14 |
+
}
|
15 |
+
}
|
app/code/community/Powr/Pack/Test/Block/Widget.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Test_Block_Widget extends EcomDev_PHPUnit_Test_Case
|
9 |
+
{
|
10 |
+
public function testWidgetBlockImplementsWidgetBlockInterface(){
|
11 |
+
$blockClass = new ReflectionClass('Powr_Pack_Block_Widget');
|
12 |
+
$this->assertTrue($blockClass->implementsInterface('Mage_Widget_Block_Interface'));
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Powr/Pack/Test/Config/Main.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Power_Pack_Test_Config_Main extends EcomDev_PHPUnit_Test_Case_Config
|
9 |
+
{
|
10 |
+
public function testTheModuleIsActive()
|
11 |
+
{
|
12 |
+
$this->assertModuleIsActive('', 'Powr_Pack');
|
13 |
+
}
|
14 |
+
|
15 |
+
public function testLayoutFilesDefined()
|
16 |
+
{
|
17 |
+
$area = 'frontend';
|
18 |
+
$layoutFile = 'powr/pack.xml';
|
19 |
+
$this->assertLayoutFileDefined($area, $layoutFile);
|
20 |
+
$this->assertLayoutFileExists($area, $layoutFile);
|
21 |
+
}
|
22 |
+
|
23 |
+
public function testBlockAliasDefined(){
|
24 |
+
$this->assertBlockAlias(
|
25 |
+
'powr_pack/block',
|
26 |
+
'Powr_Pack_Block_Block'
|
27 |
+
);
|
28 |
+
$this->assertHelperAlias(
|
29 |
+
'powr_pack',
|
30 |
+
'Powr_Pack_Helper_Data'
|
31 |
+
);
|
32 |
+
$this->assertModelAlias(
|
33 |
+
'powr_pack/model',
|
34 |
+
'Powr_Pack_Model_Model'
|
35 |
+
);
|
36 |
+
}
|
37 |
+
|
38 |
+
public function testAdminLayoutUpdateIsSet(){
|
39 |
+
$this->assertLayoutFileDefined('adminhtml', 'powr/pack.xml');
|
40 |
+
}
|
41 |
+
}
|
app/code/community/Powr/Pack/Test/Config/Wiget.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Test_Config_Wiget extends EcomDev_PHPUnit_Test_Case_Config
|
9 |
+
{
|
10 |
+
public function testPowrWidgetNodeExists(){
|
11 |
+
$widgetConfig = Mage::getModel('widget/widget');
|
12 |
+
$widgetsArray = $widgetConfig->getWidgetsArray();
|
13 |
+
$this->assertArrayContainsPowrWidget($widgetsArray);
|
14 |
+
}
|
15 |
+
|
16 |
+
private function assertArrayContainsPowrWidget($widgetsArray){
|
17 |
+
$configContainsPowrWidget = false;
|
18 |
+
foreach($widgetsArray as $widget) {
|
19 |
+
if($widget['code'] = 'powr_pack_all_pack' && $widget['type'] == 'powr_pack/widget_pack')
|
20 |
+
{
|
21 |
+
$configContainsPowrWidget = true;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
$this->assertTrue($configContainsPowrWidget);
|
25 |
+
}
|
26 |
+
|
27 |
+
public function testPowrWidgetContainsRequiredParams()
|
28 |
+
{
|
29 |
+
$widgetConfig = Mage::getModel('widget/widget');
|
30 |
+
$widgetXml = $widgetConfig->getWidgetsXml();
|
31 |
+
foreach ($widgetXml as $code => $widget) {
|
32 |
+
if ($code == 'powr_pack_all_pack') {
|
33 |
+
$params = $widget->parameters;
|
34 |
+
$reflection = new ReflectionObject($params);
|
35 |
+
$this->assertTrue($reflection->hasProperty('plugin_type'));
|
36 |
+
$this->assertTrue($reflection->hasProperty('id'));
|
37 |
+
$this->assertTrue($reflection->hasProperty('template'));
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
app/code/community/Powr/Pack/Test/Helper/Idgenerator.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Test_Helper_Idgenerator extends EcomDev_PHPUnit_Test_Case
|
9 |
+
{
|
10 |
+
public function testIfGeneratorFunctionExits(){
|
11 |
+
$this->assertTrue(method_exists(Mage::helper('powr_pack/idgenerator'),'getRandomId'));
|
12 |
+
}
|
13 |
+
|
14 |
+
public function testFunctionReturnsString(){
|
15 |
+
$randomId = Mage::helper('powr_pack/idgenerator')->getRandomId();
|
16 |
+
$this->assertTrue(is_string($randomId));
|
17 |
+
}
|
18 |
+
}
|
app/code/community/Powr/Pack/controllers/Adminhtml/PowrController.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Powr_Pack_Adminhtml_PowrController extends Mage_Adminhtml_Controller_Action{
|
9 |
+
public function indexAction(){
|
10 |
+
$this->loadLayout();
|
11 |
+
$this->renderLayout();
|
12 |
+
}
|
13 |
+
}
|
app/code/community/Powr/Pack/etc/adminhtml.xml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
-->
|
8 |
+
<config>
|
9 |
+
<acl>
|
10 |
+
<resources>
|
11 |
+
<admin>
|
12 |
+
<children>
|
13 |
+
<cms>
|
14 |
+
<children>
|
15 |
+
<powr translate="title" module="powr_pack">
|
16 |
+
<title>Powr Pack</title>
|
17 |
+
<sort_order>15</sort_order>
|
18 |
+
</powr>
|
19 |
+
</children>
|
20 |
+
</cms>
|
21 |
+
</children>
|
22 |
+
</admin>
|
23 |
+
</resources>
|
24 |
+
</acl>
|
25 |
+
<menu>
|
26 |
+
<cms>
|
27 |
+
<children>
|
28 |
+
<powr translate="title" module="powr_pack">
|
29 |
+
<title>Powr Pack</title>
|
30 |
+
<sort_order>15</sort_order>
|
31 |
+
<action>adminhtml/powr</action>
|
32 |
+
</powr>
|
33 |
+
</children>
|
34 |
+
</cms>
|
35 |
+
</menu>
|
36 |
+
</config>
|
app/code/community/Powr/Pack/etc/config.xml
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
-->
|
8 |
+
<config>
|
9 |
+
<modules>
|
10 |
+
<Powr_Pack>
|
11 |
+
<version>1.0.0</version>
|
12 |
+
</Powr_Pack>
|
13 |
+
</modules>
|
14 |
+
|
15 |
+
<global>
|
16 |
+
<blocks>
|
17 |
+
<powr_pack>
|
18 |
+
<class>Powr_Pack_Block</class>
|
19 |
+
</powr_pack>
|
20 |
+
</blocks>
|
21 |
+
|
22 |
+
<helpers>
|
23 |
+
<powr_pack>
|
24 |
+
<class>Powr_Pack_Helper</class>
|
25 |
+
</powr_pack>
|
26 |
+
</helpers>
|
27 |
+
|
28 |
+
<models>
|
29 |
+
<powr_pack>
|
30 |
+
<class>Powr_Pack_Model</class>
|
31 |
+
</powr_pack>
|
32 |
+
</models>
|
33 |
+
|
34 |
+
<resources>
|
35 |
+
<powr_pack_setup>
|
36 |
+
<setup>
|
37 |
+
<module>Powr_Pack</module>
|
38 |
+
<class>Powr_Pack_Model_Resource_Setup</class>
|
39 |
+
</setup>
|
40 |
+
</powr_pack_setup>
|
41 |
+
</resources>
|
42 |
+
</global>
|
43 |
+
|
44 |
+
<frontend>
|
45 |
+
<layout>
|
46 |
+
<updates>
|
47 |
+
<powr_pack>
|
48 |
+
<file>powr/pack.xml</file>
|
49 |
+
</powr_pack>
|
50 |
+
</updates>
|
51 |
+
</layout>
|
52 |
+
</frontend>
|
53 |
+
|
54 |
+
<adminhtml>
|
55 |
+
<layout>
|
56 |
+
<updates>
|
57 |
+
<powr_pack>
|
58 |
+
<file>powr/pack.xml</file>
|
59 |
+
</powr_pack>
|
60 |
+
</updates>
|
61 |
+
</layout>
|
62 |
+
</adminhtml>
|
63 |
+
|
64 |
+
<admin>
|
65 |
+
<routers>
|
66 |
+
<adminhtml>
|
67 |
+
<args>
|
68 |
+
<modules>
|
69 |
+
<powr_pack before="Mage_Adminhtml">Powr_Pack_Adminhtml</powr_pack>
|
70 |
+
</modules>
|
71 |
+
</args>
|
72 |
+
</adminhtml>
|
73 |
+
</routers>
|
74 |
+
</admin>
|
75 |
+
</config>
|
app/code/community/Powr/Pack/etc/widget.xml
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
-->
|
8 |
+
<widgets>
|
9 |
+
<powr_pack_all_pack type="powr_pack/widget">
|
10 |
+
<name>Powr Pack Widget</name>
|
11 |
+
<description>Add a powr plugin widget</description>
|
12 |
+
<parameters>
|
13 |
+
<id translate="label">
|
14 |
+
<required>1</required>
|
15 |
+
<visible>1</visible>
|
16 |
+
<label>Unique Identifier</label>
|
17 |
+
<type>label</type>
|
18 |
+
<helper_block>
|
19 |
+
<type>powr_pack/idGenerator</type>
|
20 |
+
</helper_block>
|
21 |
+
</id>
|
22 |
+
<plugin_type>
|
23 |
+
<required>1</required>
|
24 |
+
<visible>1</visible>
|
25 |
+
<label>Type</label>
|
26 |
+
<type>select</type>
|
27 |
+
<value>powr-survey</value>
|
28 |
+
<description>Once selected don't change this - create a new widget instead</description>
|
29 |
+
<values>
|
30 |
+
<default>
|
31 |
+
<value>powr-about-us</value>
|
32 |
+
<label>About Us</label>
|
33 |
+
</default>
|
34 |
+
<button>
|
35 |
+
<value>powr-button</value>
|
36 |
+
<label>Button</label>
|
37 |
+
</button>
|
38 |
+
<comments>
|
39 |
+
<value>powr-comments</value>
|
40 |
+
<label>Comments</label>
|
41 |
+
</comments>
|
42 |
+
<countdown_timer>
|
43 |
+
<value>powr-countdown-timer</value>
|
44 |
+
<label>Countdown Timer</label>
|
45 |
+
</countdown_timer>
|
46 |
+
<ecommerce>
|
47 |
+
<value>powr-ecommerce</value>
|
48 |
+
<label>Ecommerce</label>
|
49 |
+
</ecommerce>
|
50 |
+
<faq>
|
51 |
+
<value>powr-faq</value>
|
52 |
+
<label>Faq</label>
|
53 |
+
</faq>
|
54 |
+
<file_embed>
|
55 |
+
<value>powr-file-embed</value>
|
56 |
+
<label>File Embed</label>
|
57 |
+
</file_embed>
|
58 |
+
<form_builder>
|
59 |
+
<value>powr-form-builder</value>
|
60 |
+
<label>Form Builder</label>
|
61 |
+
</form_builder>
|
62 |
+
<gallery>
|
63 |
+
<value>powr-media-gallery</value>
|
64 |
+
<label>Media Gallery</label>
|
65 |
+
</gallery>
|
66 |
+
<graph>
|
67 |
+
<value>powr-graph</value>
|
68 |
+
<label>Graph</label>
|
69 |
+
</graph>
|
70 |
+
<hit_counter>
|
71 |
+
<value>powr-hit-counter</value>
|
72 |
+
<label>Hit Counter</label>
|
73 |
+
</hit_counter>
|
74 |
+
<map>
|
75 |
+
<value>powr-map</value>
|
76 |
+
<label>Map</label>
|
77 |
+
</map>
|
78 |
+
<slider>
|
79 |
+
<value>powr-multi-slider</value>
|
80 |
+
<label>Multi Slider</label>
|
81 |
+
</slider>
|
82 |
+
<music_player>
|
83 |
+
<value>powr-music-player</value>
|
84 |
+
<label>Music Player</label>
|
85 |
+
</music_player>
|
86 |
+
<paypal_button>
|
87 |
+
<value>powr-paypal-button</value>
|
88 |
+
<label>PayPal Button</label>
|
89 |
+
</paypal_button>
|
90 |
+
<photo_editor>
|
91 |
+
<value>powr-photo-editor</value>
|
92 |
+
<label>Photo Editor</label>
|
93 |
+
</photo_editor>
|
94 |
+
<plan_comparison>
|
95 |
+
<value>powr-plan-comparison</value>
|
96 |
+
<label>Plan Comparison</label>
|
97 |
+
</plan_comparison>
|
98 |
+
<popup>
|
99 |
+
<value>powr-popup</value>
|
100 |
+
<label>Popup</label>
|
101 |
+
</popup>
|
102 |
+
<social_feed>
|
103 |
+
<value>powr-social-feed</value>
|
104 |
+
<label>Social Feed</label>
|
105 |
+
</social_feed>
|
106 |
+
<social_media_icons>
|
107 |
+
<value>powr-social-media-icons</value>
|
108 |
+
<label>Social Media Icons</label>
|
109 |
+
</social_media_icons>
|
110 |
+
<tabs>
|
111 |
+
<value>powr-tabs</value>
|
112 |
+
<label>Tabs</label>
|
113 |
+
</tabs>
|
114 |
+
<twitter_feed>
|
115 |
+
<value>powr-twitter-feed</value>
|
116 |
+
<label>Twitter Feed</label>
|
117 |
+
</twitter_feed>
|
118 |
+
<weather>
|
119 |
+
<value>powr-weather</value>
|
120 |
+
<label>Weather</label>
|
121 |
+
</weather>
|
122 |
+
</values>
|
123 |
+
</plugin_type>
|
124 |
+
|
125 |
+
<template>
|
126 |
+
<required>1</required>
|
127 |
+
<visible>1</visible>
|
128 |
+
<label>Template</label>
|
129 |
+
<type>select</type>
|
130 |
+
<value>powr/pack/widget.phtml</value>
|
131 |
+
<values>
|
132 |
+
<default translate="label">
|
133 |
+
<value>powr/pack/widget.phtml</value>
|
134 |
+
<label>Default Widget Template</label>
|
135 |
+
</default>
|
136 |
+
</values>
|
137 |
+
</template>
|
138 |
+
</parameters>
|
139 |
+
</powr_pack_all_pack>
|
140 |
+
</widgets>
|
app/code/community/Powr/Pack/sql/powr_pack_setup/install-0.1.0.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
/** @var $installer Powr_Formbuilder_Model_Resource_Setup */
|
9 |
+
$installer = $this;
|
10 |
+
$installer->addInstallationSuccessfulNotification();
|
app/design/adminhtml/default/default/layout/powr/pack.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
5 |
+
* @license Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
-->
|
8 |
+
<layout>
|
9 |
+
<adminhtml_powr_index>
|
10 |
+
<reference name="content">
|
11 |
+
<block type="adminhtml/template" name="powr.iframe" template="powr/pack/iframe.phtml"/>
|
12 |
+
</reference>
|
13 |
+
</adminhtml_powr_index>
|
14 |
+
</layout>
|
app/design/adminhtml/default/default/template/powr/pack/iframe.phtml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) POWr (http://www.powr.io)
|
4 |
+
* @license Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
?>
|
7 |
+
<iframe src="https://www.powr.io/magento/form-builder/show" frameborder="0" style="min-height:1000px;width:100%" height="100%" width="100%"></iframe>
|
app/design/frontend/base/default/layout/powr/pack.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<block type="core/text" name="powr.js">
|
6 |
+
<action method="setText">
|
7 |
+
<text>
|
8 |
+
<![CDATA[<script src="//www.powr.io/powr.js" external-type="magento"></script>]]>
|
9 |
+
</text>
|
10 |
+
</action>
|
11 |
+
</block>
|
12 |
+
</reference>
|
13 |
+
</default>
|
14 |
+
</layout>
|
app/design/frontend/base/default/template/powr/pack/widget.phtml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php if($this->hasId() && $this->hasPluginType()):?>
|
2 |
+
<div class="<?php echo $this->getPluginType();?>" id="3<?php echo $this->getId();?>"></div>
|
3 |
+
<?php endif;?>
|
app/etc/modules/Powr_Pack.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Powr_Pack>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Powr_Pack>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Powr_Pack</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="https://opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Powr Pack - Library of free and customizable forms, galleries, social streams, e-commerce, countdowns, and more.</summary>
|
10 |
+
<description>Powr Pack - Library of free and customizable forms, galleries, social streams, e-commerce, countdowns, and more.</description>
|
11 |
+
<notes>Initial release</notes>
|
12 |
+
<authors><author><name>James Anelay</name><user>TheExtensionLab</user><email>james@theextensionlab.com</email></author></authors>
|
13 |
+
<date>2017-03-07</date>
|
14 |
+
<time>11:52:12</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Powr_Pack.xml" hash="573d3454ba70854d85d1ee0b55d49a7f"/><file name="Powr_Pack.xml" hash="573d3454ba70854d85d1ee0b55d49a7f"/></dir></target><target name="magecommunity"><dir name="Powr"><dir name="Pack"><dir name="Block"><file name="IdGenerator.php" hash="ce3644364e6b1ee9c719c21efe8055b3"/><file name="Widget.php" hash="8831430872530ce37b53670e806a2d98"/></dir><dir name="Helper"><file name="Data.php" hash="8ac6f7649e7afe34a87081cbc0410180"/><file name="Idgenerator.php" hash="dc0281db68cdd1f21fe71e3a86da1c1e"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="a62fd38acf77ebcfad3fc46d95bac96b"/></dir></dir><dir name="Test"><dir name="Block"><file name="Widget.php" hash="2611ca7ce627159d1c6e881b1052a6cd"/></dir><dir name="Config"><file name="Main.php" hash="65c2d058b9ce3ef4f293498b491b7b96"/><file name="Wiget.php" hash="d99dfb5f64ff4f2b8c2c714bd4ad6fbe"/></dir><dir name="Helper"><file name="Idgenerator.php" hash="bebbbdbc2fac740ada0b3e967b3b4caf"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PowrController.php" hash="507b77e14aab3bef6e8cf1daa0c6707d"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="5c277e3b0772c7fa4f1d4ff313217cda"/><file name="config.xml" hash="7ec319e43630824ac77b960246971c10"/><file name="widget.xml" hash="a8642aafc78231e6a45106330af9a722"/></dir><dir name="sql"><dir name="powr_pack_setup"><file name="install-0.1.0.php" hash="212fc4ab0522fc809a19c9979e90898d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="powr"><dir name="pack"><file name="iframe.phtml" hash="18c3635a51c5aa260c3127c850fa0d7f"/></dir></dir></dir><dir name="layout"><dir name="powr"><file name="pack.xml" hash="34db918a5e634ea5b41d68befc2c5061"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="powr"><file name="pack.xml" hash="ecbb5ab530c095e8ecd9b4f576dea063"/></dir></dir><dir name="template"><dir name="powr"><dir name="pack"><file name="widget.phtml" hash="907c3149813ebf68d2d911cd879a9bc6"/></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|