Version Notes
Recaptcha extension - version 2
Download this release
Release Info
Developer | Magento Core Team |
Extension | Fontis_Recaptcha |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.3.1
- app/code/community/Fontis/Recaptcha/Block/Review/Form.php +1 -1
- app/code/community/Fontis/Recaptcha/Helper/Data.php +11 -11
- app/code/community/Fontis/Recaptcha/Model/Source/Recaptchalanguage.php +1 -1
- app/code/community/Fontis/Recaptcha/Model/Source/Recaptchatheme.php +1 -1
- app/code/community/Fontis/Recaptcha/controllers/AccountController.php +1 -1
- app/code/community/Fontis/Recaptcha/controllers/ContactsController.php +2 -2
- app/code/community/Fontis/Recaptcha/controllers/ProductController.php +1 -1
- app/code/community/Fontis/Recaptcha/controllers/ReviewController.php +1 -1
- app/code/community/Fontis/Recaptcha/etc/config.xml +3 -3
- app/code/community/Fontis/Recaptcha/etc/system.xml +1 -1
- app/design/frontend/base/default/layout/fontis_recaptcha.xml +59 -0
- app/design/frontend/{default → base}/default/template/fontis/recaptcha/contacts.phtml +6 -11
- app/design/frontend/base/default/template/fontis/recaptcha/form.phtml +141 -0
- app/design/frontend/{default → base}/default/template/fontis/recaptcha/recaptcha.phtml +4 -4
- app/design/frontend/{default → base}/default/template/fontis/recaptcha/register.phtml +9 -10
- app/design/frontend/{default → base}/default/template/fontis/recaptcha/send.phtml +4 -4
- app/design/frontend/default/default/layout/fontis_recaptcha.xml +0 -84
- app/design/frontend/default/default/template/fontis/recaptcha/form.phtml +0 -129
- package.xml +6 -6
- skin/frontend/{default → base}/default/images/fontis/help.png +0 -0
- skin/frontend/{default → base}/default/images/fontis/refresh.png +0 -0
- skin/frontend/{default → base}/default/images/fontis/sound.png +0 -0
- skin/frontend/{default → base}/default/images/fontis/text.png +0 -0
app/code/community/Fontis/Recaptcha/Block/Review/Form.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
app/code/community/Fontis/Recaptcha/Helper/Data.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
*
|
15 |
* This code has been adopted from the reCAPTCHA module available at:
|
16 |
-
* http://recaptcha
|
17 |
* The original reCAPTCHA module was written by:
|
18 |
* Mike Crawford
|
19 |
* Ben Maurer
|
@@ -22,14 +22,14 @@
|
|
22 |
* @package Fontis_Recaptcha
|
23 |
* @author Denis Margetic
|
24 |
* @author Chris Norton
|
25 |
-
* @copyright Copyright (c)
|
26 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
27 |
*/
|
28 |
class Fontis_Recaptcha_Helper_Data extends Mage_Core_Helper_Abstract
|
29 |
{
|
30 |
-
const
|
31 |
-
const
|
32 |
-
const
|
33 |
|
34 |
/**
|
35 |
* Encodes the given data into a query string format
|
@@ -101,7 +101,7 @@ class Fontis_Recaptcha_Helper_Data extends Mage_Core_Helper_Abstract
|
|
101 |
if ($use_ssl) {
|
102 |
$server = self::RECAPTCHA_API_SECURE_SERVER;
|
103 |
} else {
|
104 |
-
$server = self::
|
105 |
}
|
106 |
|
107 |
$errorpart = "";
|
@@ -141,11 +141,11 @@ class Fontis_Recaptcha_Helper_Data extends Mage_Core_Helper_Abstract
|
|
141 |
return false;
|
142 |
}
|
143 |
|
144 |
-
$response = $this->_recaptcha_http_post (self::
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
);
|
150 |
|
151 |
$answers = explode ("\n", $response [1]);
|
13 |
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
*
|
15 |
* This code has been adopted from the reCAPTCHA module available at:
|
16 |
+
* http://www.google.com/recaptcha
|
17 |
* The original reCAPTCHA module was written by:
|
18 |
* Mike Crawford
|
19 |
* Ben Maurer
|
22 |
* @package Fontis_Recaptcha
|
23 |
* @author Denis Margetic
|
24 |
* @author Chris Norton
|
25 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
26 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
27 |
*/
|
28 |
class Fontis_Recaptcha_Helper_Data extends Mage_Core_Helper_Abstract
|
29 |
{
|
30 |
+
const RECAPTCHA_API_SERVER_HOST = "www.google.com";
|
31 |
+
const RECAPTCHA_API_SERVER_PATH = "/recaptcha/api";
|
32 |
+
const RECAPTCHA_API_SECURE_SERVER = "https://www.google.com/recaptcha/api";
|
33 |
|
34 |
/**
|
35 |
* Encodes the given data into a query string format
|
101 |
if ($use_ssl) {
|
102 |
$server = self::RECAPTCHA_API_SECURE_SERVER;
|
103 |
} else {
|
104 |
+
$server = 'http://' . self::RECAPTCHA_API_SERVER_HOST . self::RECAPTCHA_API_SERVER_PATH;
|
105 |
}
|
106 |
|
107 |
$errorpart = "";
|
141 |
return false;
|
142 |
}
|
143 |
|
144 |
+
$response = $this->_recaptcha_http_post (self::RECAPTCHA_API_SERVER_HOST, self::RECAPTCHA_API_SERVER_PATH . "/verify", array ( 'privatekey' => $privkey,
|
145 |
+
'remoteip' => $remoteip,
|
146 |
+
'challenge' => $challenge,
|
147 |
+
'response' => $response
|
148 |
+
) + $extra_params
|
149 |
);
|
150 |
|
151 |
$answers = explode ("\n", $response [1]);
|
app/code/community/Fontis/Recaptcha/Model/Source/Recaptchalanguage.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
app/code/community/Fontis/Recaptcha/Model/Source/Recaptchatheme.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
app/code/community/Fontis/Recaptcha/controllers/AccountController.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Customer/controllers/AccountController.php";
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Customer/controllers/AccountController.php";
|
app/code/community/Fontis/Recaptcha/controllers/ContactsController.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Contacts/controllers/IndexController.php";
|
@@ -79,4 +79,4 @@ class Fontis_Recaptcha_ContactsController extends Mage_Contacts_IndexController
|
|
79 |
}
|
80 |
}
|
81 |
}
|
82 |
-
?>
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Contacts/controllers/IndexController.php";
|
79 |
}
|
80 |
}
|
81 |
}
|
82 |
+
?>
|
app/code/community/Fontis/Recaptcha/controllers/ProductController.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Sendfriend/controllers/ProductController.php";
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Sendfriend/controllers/ProductController.php";
|
app/code/community/Fontis/Recaptcha/controllers/ReviewController.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Review/controllers/ProductController.php";
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
include_once "Mage/Review/controllers/ProductController.php";
|
app/code/community/Fontis/Recaptcha/etc/config.xml
CHANGED
@@ -17,14 +17,14 @@
|
|
17 |
* @package Fontis_Recaptcha
|
18 |
* @author Denis Margetic
|
19 |
* @author Chris Norton
|
20 |
-
* @copyright Copyright (c)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Fontis_Recaptcha>
|
27 |
-
<version>2.1
|
28 |
</Fontis_Recaptcha>
|
29 |
</modules>
|
30 |
<global>
|
@@ -141,4 +141,4 @@
|
|
141 |
</resources>
|
142 |
</acl>
|
143 |
</adminhtml>
|
144 |
-
</config>
|
17 |
* @package Fontis_Recaptcha
|
18 |
* @author Denis Margetic
|
19 |
* @author Chris Norton
|
20 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Fontis_Recaptcha>
|
27 |
+
<version>2.3.1</version>
|
28 |
</Fontis_Recaptcha>
|
29 |
</modules>
|
30 |
<global>
|
141 |
</resources>
|
142 |
</acl>
|
143 |
</adminhtml>
|
144 |
+
</config>
|
app/code/community/Fontis/Recaptcha/etc/system.xml
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* @package Fontis_Recaptcha
|
18 |
* @author Denis Margetic
|
19 |
* @author Chris Norton
|
20 |
-
* @copyright Copyright (c)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
17 |
* @package Fontis_Recaptcha
|
18 |
* @author Denis Margetic
|
19 |
* @author Chris Norton
|
20 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
app/design/frontend/base/default/layout/fontis_recaptcha.xml
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Fontis Recaptcha Extension
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.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 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Fontis
|
17 |
+
* @package Fontis_Recaptcha
|
18 |
+
* @author Denis Margetic
|
19 |
+
* @author Chris Norton
|
20 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
21 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
+
*/
|
23 |
+
-->
|
24 |
+
<layout version="0.1.0">
|
25 |
+
<sendfriend_product_send>
|
26 |
+
<remove name="sendfriend.send"/>
|
27 |
+
|
28 |
+
<reference name="content">
|
29 |
+
<block type="sendfriend/send" name="recaptcha_sendfriend_send" template="fontis/recaptcha/send.phtml">
|
30 |
+
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml"/>
|
31 |
+
</block>
|
32 |
+
</reference>
|
33 |
+
</sendfriend_product_send>
|
34 |
+
|
35 |
+
<contacts_contacts_index>
|
36 |
+
<update handle="contacts_index_index" />
|
37 |
+
|
38 |
+
<reference name="contactForm">
|
39 |
+
<action method="setTemplate"><template>fontis/recaptcha/contacts.phtml</template></action>
|
40 |
+
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml"/>
|
41 |
+
</reference>
|
42 |
+
</contacts_contacts_index>
|
43 |
+
|
44 |
+
<customer_account_create>
|
45 |
+
<remove name="customer_form_register"/>
|
46 |
+
|
47 |
+
<reference name="content">
|
48 |
+
<block type="customer/form_register" name="recaptcha_form_register" template="fontis/recaptcha/register.phtml">
|
49 |
+
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml"/>
|
50 |
+
</block>
|
51 |
+
</reference>
|
52 |
+
</customer_account_create>
|
53 |
+
|
54 |
+
<review_product_list>
|
55 |
+
<block name="product.review.form" >
|
56 |
+
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml"/>
|
57 |
+
</block>
|
58 |
+
</review_product_list>
|
59 |
+
</layout>
|
app/design/frontend/{default → base}/default/template/fontis/recaptcha/contacts.phtml
RENAMED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
?>
|
@@ -32,31 +32,26 @@
|
|
32 |
<div class="field">
|
33 |
<label for="name" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Name') ?></label>
|
34 |
<div class="input-box">
|
35 |
-
|
36 |
</div>
|
37 |
</div>
|
38 |
<div class="field">
|
39 |
<label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label>
|
40 |
<div class="input-box">
|
41 |
-
|
42 |
</div>
|
43 |
</div>
|
44 |
</li>
|
45 |
<li>
|
46 |
<label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
|
47 |
<div class="input-box">
|
48 |
-
<input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="
|
49 |
</div>
|
50 |
</li>
|
51 |
<li class="wide">
|
52 |
<label for="comment" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Comment') ?></label>
|
53 |
<div class="input-box">
|
54 |
-
<textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text"
|
55 |
-
if(isset($_SESSION["contact_comment"])) {
|
56 |
-
echo $this->htmlEscape($_SESSION["contact_comment"]);
|
57 |
-
unset($_SESSION["contact_comment"]);
|
58 |
-
}
|
59 |
-
?></textarea>
|
60 |
</div>
|
61 |
</li>
|
62 |
</ul>
|
@@ -69,7 +64,7 @@
|
|
69 |
echo $this->getChildHtml('recaptcha_box');
|
70 |
}
|
71 |
?>
|
72 |
-
|
73 |
<div class="buttons-set">
|
74 |
<p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>
|
75 |
<input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
?>
|
32 |
<div class="field">
|
33 |
<label for="name" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Name') ?></label>
|
34 |
<div class="input-box">
|
35 |
+
<input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
|
36 |
</div>
|
37 |
</div>
|
38 |
<div class="field">
|
39 |
<label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label>
|
40 |
<div class="input-box">
|
41 |
+
<input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" />
|
42 |
</div>
|
43 |
</div>
|
44 |
</li>
|
45 |
<li>
|
46 |
<label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
|
47 |
<div class="input-box">
|
48 |
+
<input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" />
|
49 |
</div>
|
50 |
</li>
|
51 |
<li class="wide">
|
52 |
<label for="comment" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Comment') ?></label>
|
53 |
<div class="input-box">
|
54 |
+
<textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
|
|
|
|
|
|
|
|
|
|
|
55 |
</div>
|
56 |
</li>
|
57 |
</ul>
|
64 |
echo $this->getChildHtml('recaptcha_box');
|
65 |
}
|
66 |
?>
|
67 |
+
|
68 |
<div class="buttons-set">
|
69 |
<p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>
|
70 |
<input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
|
app/design/frontend/base/default/template/fontis/recaptcha/form.phtml
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package Mage
|
23 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="form-add">
|
28 |
+
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
|
29 |
+
<?php if ($this->getAllowWriteReviewFlag()): ?>
|
30 |
+
<form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
|
31 |
+
<fieldset>
|
32 |
+
<?php echo $this->getChildHtml('form_fields_before')?>
|
33 |
+
<h3><?php echo $this->__("You're reviewing:"); ?> <span><?php echo $this->htmlEscape($this->getProductInfo()->getName()) ?></span></h3>
|
34 |
+
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
|
35 |
+
<h4><?php echo $this->__('How do you rate this product?') ?> <em class="required">*</em></h4>
|
36 |
+
<span id="input-message-box"></span>
|
37 |
+
<table class="data-table" id="product-review-table">
|
38 |
+
<col />
|
39 |
+
<col width="1" />
|
40 |
+
<col width="1" />
|
41 |
+
<col width="1" />
|
42 |
+
<col width="1" />
|
43 |
+
<col width="1" />
|
44 |
+
<thead>
|
45 |
+
<tr>
|
46 |
+
<th> </th>
|
47 |
+
<th><span class="nobr"><?php echo $this->__('1 star') ?></span></th>
|
48 |
+
<th><span class="nobr"><?php echo $this->__('2 stars') ?></span></th>
|
49 |
+
<th><span class="nobr"><?php echo $this->__('3 stars') ?></span></th>
|
50 |
+
<th><span class="nobr"><?php echo $this->__('4 stars') ?></span></th>
|
51 |
+
<th><span class="nobr"><?php echo $this->__('5 stars') ?></span></th>
|
52 |
+
</tr>
|
53 |
+
</thead>
|
54 |
+
<tbody>
|
55 |
+
<?php foreach ($this->getRatings() as $_rating): ?>
|
56 |
+
<tr>
|
57 |
+
<th><?php echo $this->escapeHtml($_rating->getRatingCode()) ?></th>
|
58 |
+
<?php foreach ($_rating->getOptions() as $_option): ?>
|
59 |
+
<td class="value"><input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" /></td>
|
60 |
+
<?php endforeach; ?>
|
61 |
+
</tr>
|
62 |
+
<?php endforeach; ?>
|
63 |
+
</tbody>
|
64 |
+
</table>
|
65 |
+
<input type="hidden" name="validate_rating" class="validate-rating" value="" />
|
66 |
+
<script type="text/javascript">decorateTable('product-review-table')</script>
|
67 |
+
<?php endif; ?>
|
68 |
+
<ul class="form-list">
|
69 |
+
<li>
|
70 |
+
<label for="nickname_field" class="required"><em>*</em><?php echo $this->__('Nickname') ?></label>
|
71 |
+
<div class="input-box">
|
72 |
+
<input type="text" name="nickname" id="nickname_field" class="input-text required-entry" value="<?php echo $this->htmlEscape($data->getNickname()) ?>" />
|
73 |
+
</div>
|
74 |
+
</li>
|
75 |
+
<li>
|
76 |
+
<label for="summary_field" class="required"><em>*</em><?php echo $this->__('Summary of Your Review') ?></label>
|
77 |
+
<div class="input-box">
|
78 |
+
<input type="text" name="title" id="summary_field" class="input-text required-entry" value="<?php echo $this->htmlEscape($data->getTitle()) ?>" />
|
79 |
+
</div>
|
80 |
+
</li>
|
81 |
+
<li>
|
82 |
+
<label for="review_field" class="required"><em>*</em><?php echo $this->__('Review') ?></label>
|
83 |
+
<div class="input-box">
|
84 |
+
<textarea name="detail" id="review_field" cols="5" rows="3" class="required-entry"><?php echo $this->htmlEscape($data->getDetail()) ?></textarea>
|
85 |
+
</div>
|
86 |
+
</li>
|
87 |
+
</ul>
|
88 |
+
</fieldset>
|
89 |
+
|
90 |
+
<?php // recaptcha
|
91 |
+
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
92 |
+
{
|
93 |
+
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/review"))
|
94 |
+
echo $this->getChildHtml('recaptcha_box');
|
95 |
+
}
|
96 |
+
?>
|
97 |
+
|
98 |
+
<div class="buttons-set">
|
99 |
+
<button type="submit" title="<?php echo $this->__('Submit Review') ?>" class="button"><span><span><?php echo $this->__('Submit Review') ?></span></span></button>
|
100 |
+
</div>
|
101 |
+
</form>
|
102 |
+
<script type="text/javascript">
|
103 |
+
//<![CDATA[
|
104 |
+
var dataForm = new VarienForm('review-form');
|
105 |
+
Validation.addAllThese(
|
106 |
+
[
|
107 |
+
['validate-rating', '<?php echo $this->__('Please select one of each of the ratings above') ?>', function(v) {
|
108 |
+
var trs = $('product-review-table').select('tr');
|
109 |
+
var inputs;
|
110 |
+
var error = 1;
|
111 |
+
|
112 |
+
for( var j=0; j < trs.length; j++ ) {
|
113 |
+
var tr = trs[j];
|
114 |
+
if( j > 0 ) {
|
115 |
+
inputs = tr.select('input');
|
116 |
+
|
117 |
+
for( i in inputs ) {
|
118 |
+
if( inputs[i].checked == true ) {
|
119 |
+
error = 0;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
if( error == 1 ) {
|
124 |
+
return false;
|
125 |
+
} else {
|
126 |
+
error = 1;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
}
|
130 |
+
return true;
|
131 |
+
}]
|
132 |
+
]
|
133 |
+
);
|
134 |
+
//]]>
|
135 |
+
</script>
|
136 |
+
<?php else: ?>
|
137 |
+
<p class="review-nologged" id="review-form">
|
138 |
+
<?php echo $this->__('Only registered users can write reviews. Please, <a href="%s">log in</a> or <a href="%s">register</a>', $this->getLoginLink(), Mage::helper('customer')->getRegisterUrl()) ?>
|
139 |
+
</p>
|
140 |
+
<?php endif ?>
|
141 |
+
</div>
|
app/design/frontend/{default → base}/default/template/fontis/recaptcha/recaptcha.phtml
RENAMED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
?>
|
@@ -32,10 +32,10 @@ $textbox = Mage::getStoreConfig("fontis_recaptcha/setup/textbox");
|
|
32 |
|
33 |
<?php echo "<script> var RecaptchaOptions = { theme : 'custom', lang : '$language', custom_theme_widget: 'recaptcha_widget' }; </script>"; ?>
|
34 |
<div id="recaptcha_widget" class="group-select wide fieldset" style="display:none">
|
35 |
-
<
|
36 |
<div style="margin-bottom: 10px; margin-top: 5px;"><?php echo $textbox; ?></div>
|
37 |
<div class="col2-set">
|
38 |
-
<div class="col-1" style="width:
|
39 |
<div id="recaptcha_image" style="border: 1px solid #CCCCCC; margin-bottom: 10px;"></div>
|
40 |
<div style="text-align: center;">
|
41 |
<span class="recaptcha_only_if_image"><?php echo Mage::getStoreConfig("fontis_recaptcha/magento/text_captcha") ?></span>
|
@@ -65,4 +65,4 @@ $textbox = Mage::getStoreConfig("fontis_recaptcha/setup/textbox");
|
|
65 |
echo Mage::helper("fontis_recaptcha")->recaptcha_get_html($publickey, null, Mage::app()->getRequest()->isSecure());
|
66 |
?>
|
67 |
|
68 |
-
<?php endif; ?>
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
?>
|
32 |
|
33 |
<?php echo "<script> var RecaptchaOptions = { theme : 'custom', lang : '$language', custom_theme_widget: 'recaptcha_widget' }; </script>"; ?>
|
34 |
<div id="recaptcha_widget" class="group-select wide fieldset" style="display:none">
|
35 |
+
<h2 class="legend" style="background-image: none;">Recaptcha</h2>
|
36 |
<div style="margin-bottom: 10px; margin-top: 5px;"><?php echo $textbox; ?></div>
|
37 |
<div class="col2-set">
|
38 |
+
<div class="col-1" style="width: 310px; margin-right: 10px; background: transparent; border: 0px none;">
|
39 |
<div id="recaptcha_image" style="border: 1px solid #CCCCCC; margin-bottom: 10px;"></div>
|
40 |
<div style="text-align: center;">
|
41 |
<span class="recaptcha_only_if_image"><?php echo Mage::getStoreConfig("fontis_recaptcha/magento/text_captcha") ?></span>
|
65 |
echo Mage::helper("fontis_recaptcha")->recaptcha_get_html($publickey, null, Mage::app()->getRequest()->isSecure());
|
66 |
?>
|
67 |
|
68 |
+
<?php endif; ?>
|
app/design/frontend/{default → base}/default/template/fontis/recaptcha/register.phtml
RENAMED
@@ -16,9 +16,10 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
|
|
22 |
?>
|
23 |
<?php
|
24 |
/**
|
@@ -98,7 +99,7 @@
|
|
98 |
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
99 |
<li class="wide">
|
100 |
<div class="input-box">
|
101 |
-
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address '
|
102 |
</div>
|
103 |
</li>
|
104 |
<?php endfor ?>
|
@@ -162,16 +163,14 @@
|
|
162 |
</li>
|
163 |
</ul>
|
164 |
</div>
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
<!-- ********************* -->
|
171 |
-
|
172 |
<div class="buttons-set">
|
173 |
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
174 |
-
<p class="back-link"><a href="<?php echo $this->getBackUrl() ?>" class="back-link"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
175 |
<button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
|
176 |
</div>
|
177 |
</form>
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
+
|
23 |
?>
|
24 |
<?php
|
25 |
/**
|
99 |
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
100 |
<li class="wide">
|
101 |
<div class="input-box">
|
102 |
+
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
|
103 |
</div>
|
104 |
</li>
|
105 |
<?php endfor ?>
|
163 |
</li>
|
164 |
</ul>
|
165 |
</div>
|
166 |
+
|
167 |
+
<?php if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/customer")): ?>
|
168 |
+
<?php echo $this->getChildHtml('recaptcha_box') ?>
|
169 |
+
<?php endif; ?>
|
170 |
+
|
|
|
|
|
171 |
<div class="buttons-set">
|
172 |
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
173 |
+
<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
174 |
<button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
|
175 |
</div>
|
176 |
</form>
|
app/design/frontend/{default → base}/default/template/fontis/recaptcha/send.phtml
RENAMED
@@ -16,7 +16,7 @@
|
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
@@ -111,7 +111,7 @@
|
|
111 |
</li>
|
112 |
</ul>
|
113 |
</div>
|
114 |
-
|
115 |
<?php // recaptcha
|
116 |
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
117 |
{
|
@@ -119,10 +119,10 @@
|
|
119 |
echo $this->getChildHtml('recaptcha_box');
|
120 |
}
|
121 |
?>
|
122 |
-
|
123 |
<div class="buttons-set">
|
124 |
<p class="back-link"><a href="#" onclick="history.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
125 |
-
<button type="submit" class="button<?php if (!$this->canSend()):?> disabled<?php endif ?>"<?php if (!$this->canSend()):?> disabled="disabled"<?php endif ?>><span><span><?php echo $this->__('Send
|
126 |
<div id="max_recipient_message" style="display:none;">
|
127 |
<?php if ($this->getMaxRecipients()): ?>
|
128 |
<p class="limit"><?php echo $this->__('Maximum %d email addresses allowed.', $this->getMaxRecipients()) ?></p>
|
16 |
* @package Fontis_Recaptcha
|
17 |
* @author Denis Margetic
|
18 |
* @author Chris Norton
|
19 |
+
* @copyright Copyright (c) 2009 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
111 |
</li>
|
112 |
</ul>
|
113 |
</div>
|
114 |
+
|
115 |
<?php // recaptcha
|
116 |
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
117 |
{
|
119 |
echo $this->getChildHtml('recaptcha_box');
|
120 |
}
|
121 |
?>
|
122 |
+
|
123 |
<div class="buttons-set">
|
124 |
<p class="back-link"><a href="#" onclick="history.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
125 |
+
<button type="submit" class="button<?php if (!$this->canSend()):?> disabled<?php endif ?>"<?php if (!$this->canSend()):?> disabled="disabled"<?php endif ?>><span><span><?php echo $this->__('Send Email') ?></span></span></button>
|
126 |
<div id="max_recipient_message" style="display:none;">
|
127 |
<?php if ($this->getMaxRecipients()): ?>
|
128 |
<p class="limit"><?php echo $this->__('Maximum %d email addresses allowed.', $this->getMaxRecipients()) ?></p>
|
app/design/frontend/default/default/layout/fontis_recaptcha.xml
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/**
|
4 |
-
* Fontis Recaptcha Extension
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.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 |
-
* If you did not receive a copy of the license and are unable to
|
13 |
-
* obtain it through the world-wide-web, please send an email
|
14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
-
*
|
16 |
-
* @category Fontis
|
17 |
-
* @package Fontis_Recaptcha
|
18 |
-
* @author Denis Margetic
|
19 |
-
* @author Chris Norton
|
20 |
-
* @copyright Copyright (c) 2010 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
21 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
-
*/
|
23 |
-
-->
|
24 |
-
<layout version="0.1.0">
|
25 |
-
<sendfriend_product_send>
|
26 |
-
<reference name="sendfriend.send">
|
27 |
-
<block type="sendfriend/send" name="sendfriend.send" template="fontis/recaptcha/send.phtml">
|
28 |
-
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml" />
|
29 |
-
</block>
|
30 |
-
</reference>
|
31 |
-
</sendfriend_product_send>
|
32 |
-
|
33 |
-
<fontis_recaptcha_contacts_index>
|
34 |
-
<reference name="root">
|
35 |
-
<action method="setTemplate">
|
36 |
-
<template>page/2columns-right.phtml</template>
|
37 |
-
</action>
|
38 |
-
|
39 |
-
<action method="setHeaderTitle" translate="title" module="contacts">
|
40 |
-
<title>Contact Us</title>
|
41 |
-
</action>
|
42 |
-
</reference>
|
43 |
-
|
44 |
-
<reference name="content">
|
45 |
-
<block type="core/template" name="contactForm" template="fontis/recaptcha/contacts.phtml">
|
46 |
-
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml" />
|
47 |
-
</block>
|
48 |
-
</reference>
|
49 |
-
</fontis_recaptcha_contacts_index>
|
50 |
-
|
51 |
-
<contacts_contacts_index>
|
52 |
-
<reference name="root">
|
53 |
-
<action method="setTemplate">
|
54 |
-
<template>page/2columns-right.phtml</template>
|
55 |
-
</action>
|
56 |
-
|
57 |
-
<action method="setHeaderTitle" translate="title" module="contacts">
|
58 |
-
<title>Contact Us</title>
|
59 |
-
</action>
|
60 |
-
</reference>
|
61 |
-
|
62 |
-
<reference name="content">
|
63 |
-
<block type="core/template" name="contactForm" template="fontis/recaptcha/contacts.phtml">
|
64 |
-
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml" />
|
65 |
-
</block>
|
66 |
-
</reference>
|
67 |
-
</contacts_contacts_index>
|
68 |
-
|
69 |
-
<customer_account_create>
|
70 |
-
<remove name="customer_form_register"/>
|
71 |
-
|
72 |
-
<reference name="content">
|
73 |
-
<block type="customer/form_register" name="recaptcha_form_register" template="fontis/recaptcha/register.phtml">
|
74 |
-
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml" />
|
75 |
-
</block>
|
76 |
-
</reference>
|
77 |
-
</customer_account_create>
|
78 |
-
|
79 |
-
<review_product_list>
|
80 |
-
<block name="product.review.form" >
|
81 |
-
<block type="core/template" name="recaptcha.box" as="recaptcha_box" template="fontis/recaptcha/recaptcha.phtml" />
|
82 |
-
</block>
|
83 |
-
</review_product_list>
|
84 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/fontis/recaptcha/form.phtml
DELETED
@@ -1,129 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fontis Recaptcha Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* @category Fontis
|
16 |
-
* @package Fontis_Recaptcha
|
17 |
-
* @author Denis Margetic
|
18 |
-
* @author Chris Norton
|
19 |
-
* @copyright Copyright (c) 2010 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
20 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
-
*/
|
22 |
-
?>
|
23 |
-
<form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
|
24 |
-
<div class="form-add">
|
25 |
-
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
|
26 |
-
<?php echo $this->getChildHtml('form_fields_before')?>
|
27 |
-
<h3><?php echo $this->__("You're reviewing:"); ?> <span><?php echo $this->htmlEscape($this->getProductInfo()->getName()) ?></span></h3>
|
28 |
-
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
|
29 |
-
<h4><?php echo $this->__('How do you rate this product?') ?> <em class="required">*</em></h4>
|
30 |
-
<span id="input-message-box"></span>
|
31 |
-
<table class="data-table" id="product-review-table">
|
32 |
-
<col />
|
33 |
-
<col width="1" />
|
34 |
-
<col width="1" />
|
35 |
-
<col width="1" />
|
36 |
-
<col width="1" />
|
37 |
-
<col width="1" />
|
38 |
-
<thead>
|
39 |
-
<tr>
|
40 |
-
<th> </th>
|
41 |
-
<th><span class="nobr"><?php echo $this->__('1 star') ?></span></th>
|
42 |
-
<th><span class="nobr"><?php echo $this->__('2 stars') ?></span></th>
|
43 |
-
<th><span class="nobr"><?php echo $this->__('3 stars') ?></span></th>
|
44 |
-
<th><span class="nobr"><?php echo $this->__('4 stars') ?></span></th>
|
45 |
-
<th><span class="nobr"><?php echo $this->__('5 stars') ?></span></th>
|
46 |
-
</tr>
|
47 |
-
</thead>
|
48 |
-
<tbody>
|
49 |
-
<?php foreach ($this->getRatings() as $_rating): ?>
|
50 |
-
<tr>
|
51 |
-
<th><?php echo $this->escapeHtml($_rating->getRatingCode()) ?></th>
|
52 |
-
<?php foreach ($_rating->getOptions() as $_option): ?>
|
53 |
-
<td class="value"><input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" /></td>
|
54 |
-
<?php endforeach; ?>
|
55 |
-
</tr>
|
56 |
-
<?php endforeach; ?>
|
57 |
-
</tbody>
|
58 |
-
</table>
|
59 |
-
<input type="hidden" name="validate_rating" class="validate-rating" value="" />
|
60 |
-
<script type="text/javascript">decorateTable('product-review-table')</script>
|
61 |
-
<?php endif; ?>
|
62 |
-
<ul class="form-list">
|
63 |
-
<li>
|
64 |
-
<label for="nickname_field" class="required"><em>*</em><?php echo $this->__('Nickname') ?></label>
|
65 |
-
<div class="input-box">
|
66 |
-
<input type="text" name="nickname" id="nickname_field" class="input-text required-entry" value="<?php echo $this->htmlEscape($data->getNickname()) ?>" />
|
67 |
-
</div>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<label for="summary_field" class="required"><em>*</em><?php echo $this->__('Summary of Your Review') ?></label>
|
71 |
-
<div class="input-box">
|
72 |
-
<input type="text" name="title" id="summary_field" class="input-text required-entry" value="<?php echo $this->htmlEscape($data->getTitle()) ?>" />
|
73 |
-
</div>
|
74 |
-
</li>
|
75 |
-
<li>
|
76 |
-
<label for="review_field" class="required"><em>*</em><?php echo $this->__('Review') ?></label>
|
77 |
-
<div class="input-box">
|
78 |
-
<textarea name="detail" id="review_field" cols="5" rows="3" class="required-entry"><?php echo $this->htmlEscape($data->getDetail()) ?></textarea>
|
79 |
-
</div>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
|
84 |
-
<?php // recaptcha
|
85 |
-
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
86 |
-
{
|
87 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/review"))
|
88 |
-
echo $this->getChildHtml('recaptcha_box');
|
89 |
-
}
|
90 |
-
?>
|
91 |
-
|
92 |
-
<div class="buttons-set">
|
93 |
-
<button type="submit" title="<?php echo $this->__('Submit Review') ?>" class="button"><span><span><?php echo $this->__('Submit Review') ?></span></span></button>
|
94 |
-
</div>
|
95 |
-
</form>
|
96 |
-
<script type="text/javascript">
|
97 |
-
//<![CDATA[
|
98 |
-
var dataForm = new VarienForm('review-form');
|
99 |
-
Validation.addAllThese(
|
100 |
-
[
|
101 |
-
['validate-rating', '<?php echo $this->__('Please select one of each of the ratings above') ?>', function(v) {
|
102 |
-
var trs = $('product-review-table').select('tr');
|
103 |
-
var inputs;
|
104 |
-
var error = 1;
|
105 |
-
|
106 |
-
for( var j=0; j < trs.length; j++ ) {
|
107 |
-
var tr = trs[j];
|
108 |
-
if( j > 0 ) {
|
109 |
-
inputs = tr.select('input');
|
110 |
-
|
111 |
-
for( i in inputs ) {
|
112 |
-
if( inputs[i].checked == true ) {
|
113 |
-
error = 0;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
if( error == 1 ) {
|
118 |
-
return false;
|
119 |
-
} else {
|
120 |
-
error = 1;
|
121 |
-
}
|
122 |
-
}
|
123 |
-
}
|
124 |
-
return true;
|
125 |
-
}]
|
126 |
-
]
|
127 |
-
);
|
128 |
-
//]]>
|
129 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fontis_Recaptcha</name>
|
4 |
-
<version>2.1
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>This extension easily protects the "Send to Friend", "Contact Us", "Product Review" and customer registration forms from unwanted spambots by adding in reCAPTCHA to these forms.</summary>
|
10 |
<description>This extension easily protects the "Send to Friend", "Contact Us", "Product Review" and customer registration forms from unwanted spambots by adding in reCAPTCHA to these forms.</description>
|
11 |
-
<notes>
|
12 |
-
<authors><author><name>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Fontis"><dir name="Recaptcha"><dir name="Block"><dir name="Review"><file name="Form.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fontis_Recaptcha</name>
|
4 |
+
<version>2.3.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>This extension easily protects the "Send to Friend", "Contact Us", "Product Review" and customer registration forms from unwanted spambots by adding in reCAPTCHA to these forms.</summary>
|
10 |
<description>This extension easily protects the "Send to Friend", "Contact Us", "Product Review" and customer registration forms from unwanted spambots by adding in reCAPTCHA to these forms.</description>
|
11 |
+
<notes>Recaptcha extension - version 2</notes>
|
12 |
+
<authors><author><name>Chris</name><user>auto-converted</user><email>chris.norton@fontis.com.au</email></author></authors>
|
13 |
+
<date>2011-07-01</date>
|
14 |
+
<time>18:15:16</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Fontis"><dir name="Recaptcha"><dir name="Block"><dir name="Review"><file name="Form.php" hash="cd78b92e1ea6282b4fee447d8c98cab1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="aa65e79f1d40d6110cb93dd87a10592c"/></dir><dir name="Model"><dir name="Source"><file name="Recaptchalanguage.php" hash="4276c7f0d529c9cd5789a2693da8c975"/><file name="Recaptchatheme.php" hash="af1cc2ae59c8a29cd950e88d25b403c2"/></dir></dir><dir name="controllers"><file name="AccountController.php" hash="4d56ea77359b23cfe1b8ed48f2823bee"/><file name="ContactsController.php" hash="e21e7081e7d0baf9211a96760d5bd014"/><file name="ProductController.php" hash="be6ee9462615eaf9f8ba83cfc538835d"/><file name="ReviewController.php" hash="817dee5c56aec00435f4f2a9a23d908a"/></dir><dir name="etc"><file name="config.xml" hash="bab8e8012351cddb16bae7646fea4463"/><file name="system.xml" hash="37b929e509ac3d161d54ea0160c49b6d"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fontis_recaptcha.xml" hash="d8b2cd12ef202e9380122860d10f7097"/></dir><dir name="template"><dir name="fontis"><dir name="recaptcha"><file name="contacts.phtml" hash="34be3783c9811db6be3de3f79f4917c9"/><file name="form.phtml" hash="4bfb5063db3f32e4206039e28ef1c014"/><file name="recaptcha.phtml" hash="9225e1483cdff2c36ebd385d74fa72d2"/><file name="register.phtml" hash="d0a5189b8186fbadcc95950c14eeab9c"/><file name="send.phtml" hash="f8fa95d1cd3d2d812c4f4abd7f511ed8"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="fontis"><file name="help.png" hash="c3812c74bc524179f4ccf5d2db7b3cbf"/><file name="refresh.png" hash="6b95778460f660aa7c08f47d244780a7"/><file name="sound.png" hash="8158cd1e7493e88be977a0be37d73aaf"/><file name="text.png" hash="dfcf6dcfd81693487e5642fc8e735dd6"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fontis_Recaptcha.xml" hash="5d85569faf8e3fe65be0b4ed0d9e3bd3"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
skin/frontend/{default → base}/default/images/fontis/help.png
RENAMED
File without changes
|
skin/frontend/{default → base}/default/images/fontis/refresh.png
RENAMED
File without changes
|
skin/frontend/{default → base}/default/images/fontis/sound.png
RENAMED
File without changes
|
skin/frontend/{default → base}/default/images/fontis/text.png
RENAMED
File without changes
|