Version Notes
* Added block to obfuscate emails from webbots. usage: {{block type='eabi_livehandler/email' address='user@domain.com'}}
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Eabi_Livehandler |
| Version | 0.1.7 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.6 to 0.1.7
app/code/community/Eabi/Livehandler/Block/Email.php
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
+
* or OpenGPL v3 license (GNU Public License V3.0)
|
| 10 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 11 |
+
* It is also available through the world-wide-web at this URL:
|
| 12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 13 |
+
* or
|
| 14 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
| 15 |
+
* If you did not receive a copy of the license and are unable to
|
| 16 |
+
* obtain it through the world-wide-web, please send an email
|
| 17 |
+
* to info@e-abi.ee so we can send you a copy immediately.
|
| 18 |
+
*
|
| 19 |
+
* DISCLAIMER
|
| 20 |
+
*
|
| 21 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
| 22 |
+
* versions in the future.
|
| 23 |
+
*
|
| 24 |
+
* @category Eabi
|
| 25 |
+
* @package Eabi_Livehandler
|
| 26 |
+
* @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
|
| 27 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 28 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
|
| 29 |
+
* @author Matis Halmann
|
| 30 |
+
*
|
| 31 |
+
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
/**
|
| 35 |
+
* Description of Email
|
| 36 |
+
*
|
| 37 |
+
* @author Matis
|
| 38 |
+
*/
|
| 39 |
+
class Eabi_Livehandler_Block_Email extends Mage_Core_Block_Template {
|
| 40 |
+
protected $_addressEncoded;
|
| 41 |
+
protected $_key;
|
| 42 |
+
|
| 43 |
+
public function _construct() {
|
| 44 |
+
$this->setTemplate('eabi_livehandler/email.phtml');
|
| 45 |
+
parent::_construct();
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
*
|
| 50 |
+
* @return Eabi_Livehandler_Helper_Data
|
| 51 |
+
*/
|
| 52 |
+
protected function _getEabi() {
|
| 53 |
+
return Mage::helper('eabi');
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
public function getHtmlId() {
|
| 57 |
+
$id = $this->getData('html_id');
|
| 58 |
+
if (!$id) {
|
| 59 |
+
$id = uniqid();
|
| 60 |
+
$this->setData('html_id', $id);
|
| 61 |
+
}
|
| 62 |
+
return $id;
|
| 63 |
+
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
protected function _encodeAddress() {
|
| 67 |
+
$encoding = 'UTF-8';
|
| 68 |
+
$address = $this->getAddress();
|
| 69 |
+
$addressAssocArray = array();
|
| 70 |
+
for ($i = 0; $i < mb_strlen($address, $encoding); $i++) {
|
| 71 |
+
$addressAssocArray[(string)$i] = mb_substr($address, $i, 1, $encoding);
|
| 72 |
+
}
|
| 73 |
+
$this->_arrayShuffleAssoc($addressAssocArray);
|
| 74 |
+
$addressArray = array();
|
| 75 |
+
foreach ($addressAssocArray as $letter) {
|
| 76 |
+
$addressArray[] = $letter;
|
| 77 |
+
}
|
| 78 |
+
$this->_addressEncoded = $addressArray;
|
| 79 |
+
$this->_key = array_keys($addressAssocArray);
|
| 80 |
+
return $addressArray;
|
| 81 |
+
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
public function getAddressEncoded() {
|
| 85 |
+
if (!$this->_addressEncoded) {
|
| 86 |
+
$this->_encodeAddress();
|
| 87 |
+
}
|
| 88 |
+
return $this->_addressEncoded;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
public function getAddressKey() {
|
| 92 |
+
if (!$this->_addressEncoded) {
|
| 93 |
+
$this->_encodeAddress();
|
| 94 |
+
}
|
| 95 |
+
return $this->_key;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
public function directToJson($value) {
|
| 100 |
+
return json_encode($value);
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
protected function _arrayShuffleAssoc(&$array) {
|
| 104 |
+
$keys = array_keys($array);
|
| 105 |
+
|
| 106 |
+
shuffle($keys);
|
| 107 |
+
|
| 108 |
+
foreach($keys as $key) {
|
| 109 |
+
$new[$key] = $array[$key];
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
$array = $new;
|
| 113 |
+
|
| 114 |
+
return true;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
}
|
app/code/community/Eabi/Livehandler/etc/config.xml
CHANGED
|
@@ -36,7 +36,7 @@
|
|
| 36 |
<config>
|
| 37 |
<modules>
|
| 38 |
<Eabi_Livehandler>
|
| 39 |
-
<version>0.1.
|
| 40 |
</Eabi_Livehandler>
|
| 41 |
</modules>
|
| 42 |
|
| 36 |
<config>
|
| 37 |
<modules>
|
| 38 |
<Eabi_Livehandler>
|
| 39 |
+
<version>0.1.7</version>
|
| 40 |
</Eabi_Livehandler>
|
| 41 |
</modules>
|
| 42 |
|
app/design/frontend/base/default/template/eabi_livehandler/email.phtml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
*
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* or OpenGPL v3 license (GNU Public License V3.0)
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
+
* or
|
| 13 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
| 14 |
+
* If you did not receive a copy of the license and are unable to
|
| 15 |
+
* obtain it through the world-wide-web, please send an email
|
| 16 |
+
* to info@e-abi.ee so we can send you a copy immediately.
|
| 17 |
+
*
|
| 18 |
+
* DISCLAIMER
|
| 19 |
+
*
|
| 20 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
| 21 |
+
* versions in the future.
|
| 22 |
+
*
|
| 23 |
+
* @category Eabi
|
| 24 |
+
* @package Eabi_Livehandler
|
| 25 |
+
* @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
|
| 26 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 27 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
|
| 28 |
+
* @author Matis Halmann
|
| 29 |
+
*
|
| 30 |
+
|
| 31 |
+
*/
|
| 32 |
+
/* @var $this Eabi_Livehandler_Block_Email */
|
| 33 |
+
?><?php if ($this->getAddress()) : ?>
|
| 34 |
+
<a id="<?php echo $this->getHtmlId();?>" href="#">...</a>
|
| 35 |
+
<script type="text/javascript">
|
| 36 |
+
// <![CDATA[
|
| 37 |
+
(function() { var d = <?php echo $this->directToJson($this->getHtmlId()); ?>, e = <?php echo $this->directToJson($this->getAddressEncoded()); ?>, k = <?php echo $this->directToJson($this->getAddressKey()); ?>, m = new Array(e.length); for (var i = 0; i < e.length; i++) { m[k[i]] = e[i];} $(d).writeAttribute('href', 'mailto:' + m.join('')); $(d).update(m.join('')); }());
|
| 38 |
+
// ]]>
|
| 39 |
+
</script>
|
| 40 |
+
<?php endif; ?>
|
app/etc/modules/Eabi_Livehandler.xml
CHANGED
|
@@ -38,7 +38,7 @@
|
|
| 38 |
<Eabi_Livehandler>
|
| 39 |
<active>true</active>
|
| 40 |
<codePool>community</codePool>
|
| 41 |
-
<version>0.1.
|
| 42 |
</Eabi_Livehandler>
|
| 43 |
</modules>
|
| 44 |
</config>
|
| 38 |
<Eabi_Livehandler>
|
| 39 |
<active>true</active>
|
| 40 |
<codePool>community</codePool>
|
| 41 |
+
<version>0.1.7</version>
|
| 42 |
</Eabi_Livehandler>
|
| 43 |
</modules>
|
| 44 |
</config>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Eabi_Livehandler</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -12,11 +12,11 @@
|
|
| 12 |
<p>You can navigate between orders by pressing directional keys or by pressing left/right icons on the order view</p>
|
| 13 |
<p>Possibility to create your own action buttons, which allows to save lots of time when managing orders</p>
|
| 14 |
<p>Possibility to purchase action buttons like <strong>Add order comment</strong>, <strong>Create invoice</strong>, <strong>Ship order</strong> and more</p></description>
|
| 15 |
-
<notes>*
|
| 16 |
<authors><author><name>Matis Matis</name><user>auto-converted</user><email>info@e-abi.ee</email></author></authors>
|
| 17 |
-
<date>2014-
|
| 18 |
-
<time>
|
| 19 |
-
<contents><target name="magecommunity"><dir name="Eabi"><dir name="Livehandler"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Button.php" hash="aa2cdefca35fc906943b76063cdf8537"/><file name="Remove.php" hash="e0da5a9c856c10d65143d565f3414347"/></dir></dir></dir></dir><file name="Footer.php" hash="2965dff82f3be4b53b00d282d423b9ef"/></dir><dir name="Helper"><file name="Data.php" hash="5efe08d888222257f24131478d405c0c"/></dir><dir name="Model"><dir name="Action"><dir name="Postoffice"><file name="Print.php" hash="13c64015d6460221d0266ef40698280c"/><file name="Send.php" hash="e990ba8fa14afa1528cf8cd2c74cedbc"/></dir><file name="Abstract.php" hash="4d3fd6cc78037008610d590f742fae51"/></dir><dir name="Adminhtml"><file name="Gridmanager.php" hash="daa2aa0217b91045aa2cf3d21a5f64f1"/></dir><dir name="Directory"><file name="Collection.php" hash="28aca7ecf41b56fd2624139fa3746139"/></dir><dir name="File"><file name="Object.php" hash="278cd8f5cfee8554930de1a04fcd794f"/></dir><dir name="Mysql4"><dir name="Entry"><file name="Collection.php" hash="98020b9eeb67626c42af1a75699f88c5"/></dir><file name="Entry.php" hash="94e8d257cb4f5f7d9cc83150d4b9bb26"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Button.php" hash="2d401233ebdc077e398c5e09165217b9"/></dir></dir></dir><file name="Abstract.php" hash="cac0cec1ce45d10474a14d37efa0da82"/><file name="Entry.php" hash="6b9ff0824a667e04897afe39dadf2db7"/><file name="Ordergrid.php" hash="8377da25f8c9849b2f16ae3dea2edbd0"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LivehandlerController.php" hash="e0f36d42a5e87a6359ca179b1cf35d10"/><file name="RemoveController.php" hash="a8578a2b448e91b84b7d8ad93cc1ff75"/></dir><file name="IndexController.php" hash="d3c35dfae888e0f3200a46e27a7291e8"/></dir><dir name="etc"><file name="config.xml" hash="
|
| 20 |
<compatible/>
|
| 21 |
<dependencies/>
|
| 22 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Eabi_Livehandler</name>
|
| 4 |
+
<version>0.1.7</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
| 7 |
<channel>community</channel>
|
| 12 |
<p>You can navigate between orders by pressing directional keys or by pressing left/right icons on the order view</p>
|
| 13 |
<p>Possibility to create your own action buttons, which allows to save lots of time when managing orders</p>
|
| 14 |
<p>Possibility to purchase action buttons like <strong>Add order comment</strong>, <strong>Create invoice</strong>, <strong>Ship order</strong> and more</p></description>
|
| 15 |
+
<notes>* Added block to obfuscate emails from webbots. usage: {{block type='eabi_livehandler/email' address='user@domain.com'}}</notes>
|
| 16 |
<authors><author><name>Matis Matis</name><user>auto-converted</user><email>info@e-abi.ee</email></author></authors>
|
| 17 |
+
<date>2014-04-16</date>
|
| 18 |
+
<time>15:28:05</time>
|
| 19 |
+
<contents><target name="magecommunity"><dir name="Eabi"><dir name="Livehandler"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Button.php" hash="aa2cdefca35fc906943b76063cdf8537"/><file name="Remove.php" hash="e0da5a9c856c10d65143d565f3414347"/></dir></dir></dir></dir><file name="Email.php" hash="965f4da0dca02af97b5fe4810d05d5a9"/><file name="Footer.php" hash="2965dff82f3be4b53b00d282d423b9ef"/></dir><dir name="Helper"><file name="Data.php" hash="5efe08d888222257f24131478d405c0c"/></dir><dir name="Model"><dir name="Action"><dir name="Postoffice"><file name="Print.php" hash="13c64015d6460221d0266ef40698280c"/><file name="Send.php" hash="e990ba8fa14afa1528cf8cd2c74cedbc"/></dir><file name="Abstract.php" hash="4d3fd6cc78037008610d590f742fae51"/></dir><dir name="Adminhtml"><file name="Gridmanager.php" hash="daa2aa0217b91045aa2cf3d21a5f64f1"/></dir><dir name="Directory"><file name="Collection.php" hash="28aca7ecf41b56fd2624139fa3746139"/></dir><dir name="File"><file name="Object.php" hash="278cd8f5cfee8554930de1a04fcd794f"/></dir><dir name="Mysql4"><dir name="Entry"><file name="Collection.php" hash="98020b9eeb67626c42af1a75699f88c5"/></dir><file name="Entry.php" hash="94e8d257cb4f5f7d9cc83150d4b9bb26"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Button.php" hash="2d401233ebdc077e398c5e09165217b9"/></dir></dir></dir><file name="Abstract.php" hash="cac0cec1ce45d10474a14d37efa0da82"/><file name="Entry.php" hash="6b9ff0824a667e04897afe39dadf2db7"/><file name="Ordergrid.php" hash="8377da25f8c9849b2f16ae3dea2edbd0"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LivehandlerController.php" hash="e0f36d42a5e87a6359ca179b1cf35d10"/><file name="RemoveController.php" hash="a8578a2b448e91b84b7d8ad93cc1ff75"/></dir><file name="IndexController.php" hash="d3c35dfae888e0f3200a46e27a7291e8"/></dir><dir name="etc"><file name="config.xml" hash="60f049a2544f33e05774358eb88fe5ca"/><file name="system.xml" hash="3aae85cb6b4fc84224fdef9e55e3a20c"/></dir><dir name="sql"><dir name="eabi_livehandler_setup"><file name="mysql4-install-0.1.0.php" hash="3542a9b16298e0cb7ab1b75081da09a6"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="66d9663cf4ebfa01f4060090b3af511c"/></dir></dir><file name="CHANGELOG.txt" hash="d2c529c652576f6592990ced43ed51cb"/><file name="LICENCE.txt" hash="7a9e279147a63af4f63a16ca67fae07b"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="1fc2fe104ffc719adbcf240db22c9b83"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="73db0149877ed655a282a0ed9acefe57"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="73db0149877ed655a282a0ed9acefe57"/></dir><dir name="template"><dir name="eabi_livehandler"><file name="email.phtml" hash="347c0f21d269fe76346d40b3b6eb7a11"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eabi_Livehandler.xml" hash="359443e7afc4ab9a67b982ae69604dcb"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Eabi_Livehandler.csv" hash="e846cb14835c2c9df355d7c81da2135c"/></dir><dir name="et_EE"><file name="Eabi_Livehandler.csv" hash="e1a2e6c5568ec76ecb3c4078e23710b7"/></dir><dir name="fi_FI"><file name="Eabi_Livehandler.csv" hash="e846cb14835c2c9df355d7c81da2135c"/></dir><dir name="lt_LT"><file name="Eabi_Livehandler.csv" hash="e846cb14835c2c9df355d7c81da2135c"/></dir><dir name="sv_SE"><file name="Eabi_Livehandler.csv" hash="bcb64aae292b417a7914612e57305559"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="eabi_admintools.css" hash="0868ed1bfcc8afff6643d5a3b8aab5b9"/></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="eabi_js"><file name="crossBrowser_initKeyboardEvent.js" hash="8600c5536225fd70c56ef313ee430e08"/></dir><dir name="livepipe"><file name="contextmenu.js" hash="a5dbab9663d94d9d848e84b524c1f925"/><file name="cookie.js" hash="eab2042ac637aec7777c7c64e3e2bb1a"/><file name="event_behavior.js" hash="a59a00ad652efb1596b5bd2e6f5cfe48"/><file name="hotkey.js" hash="c6193fc03e4cd4c94ee4fb37e3d5ed6b"/><file name="livepipe.js" hash="6e569402b2686976e7390f0b7a25b1eb"/><file name="progressbar.js" hash="69719eccbecbc0378d9919c53a3ef7dd"/><file name="rating.js" hash="adb5ce773c37b40fb590a877d949be7a"/><file name="resizable.js" hash="38fd18daa37e5612495cc7b42fd32b3d"/><file name="scrollbar.js" hash="7a2603c2107944b8a70e41e7a84133ba"/><file name="selection.js" hash="3f48981cccffdb5fcc5f5ff27d0b0b68"/><file name="selectmultiple.js" hash="d8f044eb344061bdcce405f671b15654"/><file name="tabs.js" hash="22abb9a3ec3933d54ff9ede0338ca7f3"/><file name="textarea.js" hash="9825782bf78d38efa53200a206d8cd77"/><file name="window.js" hash="f6eba488d6a80e05f59d97a0cef59730"/></dir></dir></target></contents>
|
| 20 |
<compatible/>
|
| 21 |
<dependencies/>
|
| 22 |
</package>
|
