Version Notes
Recaptcha extension - version 2
Download this release
Release Info
Developer | Chris |
Extension | Fontis_Recaptcha |
Version | 2.4.0 |
Comparing to | |
See all releases |
Code changes from version 2.3.1 to 2.4.0
- app/code/community/Fontis/Recaptcha/Block/Review/Form.php +0 -30
- app/code/community/Fontis/Recaptcha/Helper/Data.php +0 -178
- app/code/community/Fontis/Recaptcha/Model/Source/Recaptchalanguage.php +0 -37
- app/code/community/Fontis/Recaptcha/Model/Source/Recaptchatheme.php +0 -35
- app/code/community/Fontis/Recaptcha/controllers/AccountController.php +0 -57
- app/code/community/Fontis/Recaptcha/controllers/ContactsController.php +0 -82
- app/code/community/Fontis/Recaptcha/controllers/ProductController.php +0 -63
- app/code/community/Fontis/Recaptcha/controllers/ReviewController.php +0 -62
- app/code/community/Fontis/Recaptcha/etc/config.xml +0 -144
- app/code/community/Fontis/Recaptcha/etc/system.xml +0 -177
- app/code/community/Fontis/Recaptcha/install.txt +3 -0
- app/design/frontend/base/default/layout/fontis_recaptcha.xml +0 -59
- app/design/frontend/base/default/template/fontis/recaptcha/contacts.phtml +0 -78
- app/design/frontend/base/default/template/fontis/recaptcha/form.phtml +0 -141
- app/design/frontend/base/default/template/fontis/recaptcha/recaptcha.phtml +0 -68
- app/design/frontend/base/default/template/fontis/recaptcha/register.phtml +0 -185
- app/design/frontend/base/default/template/fontis/recaptcha/send.phtml +0 -148
- app/etc/modules/Fontis_Recaptcha.xml +0 -31
- package.xml +8 -8
- skin/frontend/base/default/images/fontis/help.png +0 -0
- skin/frontend/base/default/images/fontis/refresh.png +0 -0
- skin/frontend/base/default/images/fontis/sound.png +0 -0
- skin/frontend/base/default/images/fontis/text.png +0 -0
app/code/community/Fontis/Recaptcha/Block/Review/Form.php
DELETED
@@ -1,30 +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) 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 |
-
|
23 |
-
class Fontis_Recaptcha_Block_Review_Form extends Mage_Review_Block_Form
|
24 |
-
{
|
25 |
-
public function __construct()
|
26 |
-
{
|
27 |
-
parent::__construct();
|
28 |
-
$this->setTemplate('fontis/recaptcha/form.phtml');
|
29 |
-
}
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/Helper/Data.php
DELETED
@@ -1,178 +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 |
-
* 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
|
20 |
-
*
|
21 |
-
* @category Fontis
|
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
|
36 |
-
* @param $data - array of string elements to be encoded
|
37 |
-
* @return string - encoded request
|
38 |
-
*/
|
39 |
-
function _recaptcha_qsencode ($data)
|
40 |
-
{
|
41 |
-
$req = "";
|
42 |
-
foreach ( $data as $key => $value )
|
43 |
-
$req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
|
44 |
-
|
45 |
-
// Cut the last '&'
|
46 |
-
$req=substr($req,0,strlen($req)-1);
|
47 |
-
return $req;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Submits an HTTP POST to a reCAPTCHA server
|
52 |
-
* @param string $host
|
53 |
-
* @param string $path
|
54 |
-
* @param array $data
|
55 |
-
* @param int port
|
56 |
-
* @return array response
|
57 |
-
*/
|
58 |
-
function _recaptcha_http_post($host, $path, $data, $port = 80)
|
59 |
-
{
|
60 |
-
$req = $this->_recaptcha_qsencode ($data);
|
61 |
-
|
62 |
-
$http_request = "POST $path HTTP/1.0\r\n";
|
63 |
-
$http_request .= "Host: $host\r\n";
|
64 |
-
$http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
|
65 |
-
$http_request .= "Content-Length: " . strlen($req) . "\r\n";
|
66 |
-
$http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
|
67 |
-
$http_request .= "\r\n";
|
68 |
-
$http_request .= $req;
|
69 |
-
|
70 |
-
$response = '';
|
71 |
-
if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
|
72 |
-
die ('Could not open socket');
|
73 |
-
}
|
74 |
-
|
75 |
-
fwrite($fs, $http_request);
|
76 |
-
|
77 |
-
while ( !feof($fs) )
|
78 |
-
$response .= fgets($fs, 1160); // One TCP-IP packet
|
79 |
-
fclose($fs);
|
80 |
-
$response = explode("\r\n\r\n", $response, 2);
|
81 |
-
|
82 |
-
return $response;
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Gets the challenge HTML (javascript and non-javascript version).
|
87 |
-
* This is called from the browser, and the resulting reCAPTCHA HTML widget
|
88 |
-
* is embedded within the HTML form it was called from.
|
89 |
-
* @param string $pubkey A public key for reCAPTCHA
|
90 |
-
* @param string $error The error given by reCAPTCHA (optional, default is null)
|
91 |
-
* @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
|
92 |
-
|
93 |
-
* @return string - The HTML to be embedded in the user's form.
|
94 |
-
*/
|
95 |
-
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
|
96 |
-
{
|
97 |
-
if ($pubkey == null || $pubkey == '') {
|
98 |
-
die ("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
|
99 |
-
}
|
100 |
-
|
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 = "";
|
108 |
-
if ($error) {
|
109 |
-
$errorpart = "&error=" . $error;
|
110 |
-
}
|
111 |
-
return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
|
112 |
-
|
113 |
-
<noscript>
|
114 |
-
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
|
115 |
-
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
|
116 |
-
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
|
117 |
-
</noscript>';
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Calls an HTTP POST function to verify if the user's guess was correct
|
122 |
-
* @param string $privkey
|
123 |
-
* @param string $remoteip
|
124 |
-
* @param string $challenge
|
125 |
-
* @param string $response
|
126 |
-
* @param array $extra_params an array of extra variables to post to the server
|
127 |
-
* @return ReCaptchaResponse
|
128 |
-
*/
|
129 |
-
function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
|
130 |
-
{
|
131 |
-
if ($privkey == null || $privkey == '') {
|
132 |
-
die ("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
|
133 |
-
}
|
134 |
-
|
135 |
-
if ($remoteip == null || $remoteip == '') {
|
136 |
-
die ("For security reasons, you must pass the remote ip to reCAPTCHA");
|
137 |
-
}
|
138 |
-
|
139 |
-
//discard spam submissions
|
140 |
-
if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
|
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]);
|
152 |
-
|
153 |
-
if (trim ($answers [0]) == 'true') {
|
154 |
-
return true;
|
155 |
-
}
|
156 |
-
return false;
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* gets a URL where the user can sign up for reCAPTCHA. If your application
|
161 |
-
* has a configuration page where you enter a key, you should provide a link
|
162 |
-
* using this function.
|
163 |
-
* @param string $domain The domain where the page is hosted
|
164 |
-
* @param string $appname The name of your application
|
165 |
-
*/
|
166 |
-
function recaptcha_get_signup_url ($domain = null, $appname = null)
|
167 |
-
{
|
168 |
-
return "http://recaptcha.net/api/getkey?" . $this->_recaptcha_qsencode (array ('domain' => $domain, 'app' => $appname));
|
169 |
-
}
|
170 |
-
|
171 |
-
function _recaptcha_aes_pad($val)
|
172 |
-
{
|
173 |
-
$block_size = 16;
|
174 |
-
$numpad = $block_size - (strlen ($val) % $block_size);
|
175 |
-
return str_pad($val, strlen ($val) + $numpad, chr($numpad));
|
176 |
-
}
|
177 |
-
}
|
178 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/Model/Source/Recaptchalanguage.php
DELETED
@@ -1,37 +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) 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 |
-
|
23 |
-
class Fontis_Recaptcha_Model_Source_Recaptchalanguage
|
24 |
-
{
|
25 |
-
public function toOptionArray()
|
26 |
-
{
|
27 |
-
return array(array('value' => 'en', 'label' => 'English'),
|
28 |
-
array('value' => 'fr', 'label' => 'French'),
|
29 |
-
array('value' => 'de', 'label' => 'German'),
|
30 |
-
array('value' => 'nl', 'label' => 'Dutch'),
|
31 |
-
array('value' => 'pt', 'label' => 'Portuguese'),
|
32 |
-
array('value' => 'ru', 'label' => 'Russian'),
|
33 |
-
array('value' => 'es', 'label' => 'Spanish'),
|
34 |
-
array('value' => 'tr', 'label' => 'Turkish'),
|
35 |
-
);
|
36 |
-
}
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/Model/Source/Recaptchatheme.php
DELETED
@@ -1,35 +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) 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 |
-
|
23 |
-
class Fontis_Recaptcha_Model_Source_Recaptchatheme
|
24 |
-
{
|
25 |
-
public function toOptionArray()
|
26 |
-
{
|
27 |
-
return array(array('value' => 'clean', 'label' => 'Clean'),
|
28 |
-
array('value' => 'white', 'label' => 'White'),
|
29 |
-
array('value' => 'red', 'label' => 'Red'),
|
30 |
-
array('value' => 'blackglass', 'label' => 'Blackglass'),
|
31 |
-
array('value' => 'magento', 'label' => 'Magento'),
|
32 |
-
array('value' => 'custom', 'label' => 'Custom'),
|
33 |
-
);
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/controllers/AccountController.php
DELETED
@@ -1,57 +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) 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";
|
23 |
-
|
24 |
-
class Fontis_Recaptcha_AccountController extends Mage_Customer_AccountController
|
25 |
-
{
|
26 |
-
public function createPostAction()
|
27 |
-
{
|
28 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/customer"))
|
29 |
-
{ // check that recaptcha is actually enabled
|
30 |
-
|
31 |
-
$privatekey = Mage::getStoreConfig("fontis_recaptcha/setup/private_key");
|
32 |
-
// check response
|
33 |
-
$resp = Mage::helper("fontis_recaptcha")->recaptcha_check_answer( $privatekey,
|
34 |
-
$_SERVER["REMOTE_ADDR"],
|
35 |
-
$_POST["recaptcha_challenge_field"],
|
36 |
-
$_POST["recaptcha_response_field"]
|
37 |
-
);
|
38 |
-
|
39 |
-
if ($resp == true)
|
40 |
-
{ // if recaptcha response is correct, use core functionality
|
41 |
-
parent::createPostAction();
|
42 |
-
}
|
43 |
-
else
|
44 |
-
{
|
45 |
-
$this->_getSession()->addError($this->__('Your reCAPTCHA entry is incorrect. Please try again.'));
|
46 |
-
$this->_getSession()->setCustomerFormData($this->getRequest()->getPost());
|
47 |
-
$this->_redirectReferer();
|
48 |
-
return;
|
49 |
-
}
|
50 |
-
}
|
51 |
-
else
|
52 |
-
{ // if recaptcha is not enabled, use core function
|
53 |
-
parent::createPostAction();
|
54 |
-
}
|
55 |
-
}
|
56 |
-
}
|
57 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/controllers/ContactsController.php
DELETED
@@ -1,82 +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) 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";
|
23 |
-
|
24 |
-
class Fontis_Recaptcha_ContactsController extends Mage_Contacts_IndexController
|
25 |
-
{
|
26 |
-
|
27 |
-
public function indexAction()
|
28 |
-
{
|
29 |
-
|
30 |
-
|
31 |
-
$this->loadLayout();
|
32 |
-
$this->getLayout()->getBlock('contactForm')->setFormAction( Mage::getUrl('*/*/post') );
|
33 |
-
|
34 |
-
$this->_initLayoutMessages('customer/session');
|
35 |
-
$this->_initLayoutMessages('catalog/session');
|
36 |
-
$this->renderLayout();
|
37 |
-
}
|
38 |
-
|
39 |
-
|
40 |
-
public function postAction()
|
41 |
-
{
|
42 |
-
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
43 |
-
{
|
44 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/contacts"))
|
45 |
-
{
|
46 |
-
$privatekey = Mage::getStoreConfig("fontis_recaptcha/setup/private_key");
|
47 |
-
// check response
|
48 |
-
$resp = Mage::helper("fontis_recaptcha")->recaptcha_check_answer( $privatekey,
|
49 |
-
$_SERVER["REMOTE_ADDR"],
|
50 |
-
$_POST["recaptcha_challenge_field"],
|
51 |
-
$_POST["recaptcha_response_field"]
|
52 |
-
);
|
53 |
-
if ($resp == true)
|
54 |
-
{ // if recaptcha response is correct, use core functionality
|
55 |
-
parent::postAction();
|
56 |
-
}
|
57 |
-
else
|
58 |
-
{ // if recaptcha response is incorrect, reload the page
|
59 |
-
|
60 |
-
Mage::getSingleton('customer/session')->addError(Mage::helper('contacts')->__('Your reCAPTCHA entry is incorrect. Please try again.'));
|
61 |
-
|
62 |
-
$_SESSION['contact_comment'] = $_POST['comment'];
|
63 |
-
$_SESSION['contact_name'] = $_POST['name'];
|
64 |
-
$_SESSION['contact_email'] = $_POST['email'];
|
65 |
-
$_SESSION['contact_telephone'] = $_POST['telephone'];
|
66 |
-
|
67 |
-
$this->_redirect('contacts/');
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
else
|
72 |
-
{ // if recaptcha is not enabled, use core function alone
|
73 |
-
parent::postAction();
|
74 |
-
}
|
75 |
-
}
|
76 |
-
else
|
77 |
-
{ // if recaptcha is not enabled, use core function alone
|
78 |
-
parent::postAction();
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
82 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/controllers/ProductController.php
DELETED
@@ -1,63 +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) 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";
|
23 |
-
|
24 |
-
class Fontis_Recaptcha_ProductController extends Mage_Sendfriend_ProductController
|
25 |
-
{
|
26 |
-
public function sendmailAction()
|
27 |
-
{
|
28 |
-
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
29 |
-
{
|
30 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/sendfriend"))
|
31 |
-
{
|
32 |
-
$privatekey = Mage::getStoreConfig("fontis_recaptcha/setup/private_key");
|
33 |
-
// check response
|
34 |
-
$resp = Mage::helper("fontis_recaptcha")->recaptcha_check_answer( $privatekey,
|
35 |
-
$_SERVER["REMOTE_ADDR"],
|
36 |
-
$_POST["recaptcha_challenge_field"],
|
37 |
-
$_POST["recaptcha_response_field"]
|
38 |
-
);
|
39 |
-
$data = $this->getRequest()->getPost();
|
40 |
-
if ($resp == true)
|
41 |
-
{ // if recaptcha response is correct, use core functionality
|
42 |
-
parent::sendmailAction();
|
43 |
-
}
|
44 |
-
else
|
45 |
-
{ // if recaptcha response is incorrect, reload the page
|
46 |
-
Mage::getSingleton('catalog/session')->addError($this->__('Your reCAPTCHA entry is incorrect. Please try again.'));
|
47 |
-
Mage::getSingleton('catalog/session')->setSendfriendFormData($data);
|
48 |
-
$this->_redirectReferer();
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
else
|
53 |
-
{ // if recaptcha is not enabled, use core function alone
|
54 |
-
parent::sendmailAction();
|
55 |
-
}
|
56 |
-
}
|
57 |
-
else
|
58 |
-
{ // if recaptcha is not enabled, use core function alone
|
59 |
-
parent::sendmailAction();
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
63 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/controllers/ReviewController.php
DELETED
@@ -1,62 +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) 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";
|
23 |
-
|
24 |
-
class Fontis_Recaptcha_ReviewController extends Mage_Review_ProductController
|
25 |
-
{
|
26 |
-
public function postAction()
|
27 |
-
{
|
28 |
-
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
29 |
-
{
|
30 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/review"))
|
31 |
-
{
|
32 |
-
$privatekey = Mage::getStoreConfig("fontis_recaptcha/setup/private_key");
|
33 |
-
// check response
|
34 |
-
$resp = Mage::helper("fontis_recaptcha")->recaptcha_check_answer( $privatekey,
|
35 |
-
$_SERVER["REMOTE_ADDR"],
|
36 |
-
$_POST["recaptcha_challenge_field"],
|
37 |
-
$_POST["recaptcha_response_field"]
|
38 |
-
);
|
39 |
-
$data = $this->getRequest()->getPost();
|
40 |
-
if ($resp == true)
|
41 |
-
{ // if recaptcha response is correct, use core functionality
|
42 |
-
parent::postAction();
|
43 |
-
}
|
44 |
-
else
|
45 |
-
{ // if recaptcha response is incorrect, reload the page
|
46 |
-
Mage::getSingleton('core/session')->addError($this->__('Your reCAPTCHA entry is incorrect. Please try again.'));
|
47 |
-
Mage::getSingleton('review/session')->setFormData($data);
|
48 |
-
$this->_redirectReferer();
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
else
|
53 |
-
{ // if recaptcha is not enabled, use core function alone
|
54 |
-
parent::postAction();
|
55 |
-
}
|
56 |
-
}
|
57 |
-
else
|
58 |
-
{ // if recaptcha is not enabled, use core function alone
|
59 |
-
parent::postAction();
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/etc/config.xml
DELETED
@@ -1,144 +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) 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>
|
31 |
-
<rewrite>
|
32 |
-
<fontis_recaptcha>
|
33 |
-
<from><![CDATA[#^/customer/account/createpost/#]]></from>
|
34 |
-
<to>/recaptcha/account/createpost/</to>
|
35 |
-
</fontis_recaptcha>
|
36 |
-
</rewrite>
|
37 |
-
<rewrite>
|
38 |
-
<fontis_recaptcha2>
|
39 |
-
<from><![CDATA[#^/sendfriend/product/sendmail/#]]></from>
|
40 |
-
<to>/recaptcha/product/sendmail/</to>
|
41 |
-
</fontis_recaptcha2>
|
42 |
-
</rewrite>
|
43 |
-
<rewrite>
|
44 |
-
<fontis_recaptcha3>
|
45 |
-
<from><![CDATA[#^/review/product/post/#]]></from>
|
46 |
-
<to>/recaptcha/review/post/</to>
|
47 |
-
</fontis_recaptcha3>
|
48 |
-
</rewrite>
|
49 |
-
<rewrite>
|
50 |
-
<fontis_recaptcha4>
|
51 |
-
<from><![CDATA[#^/contacts/contacts/post/#]]></from>
|
52 |
-
<to>/recaptcha/contacts/post/</to>
|
53 |
-
</fontis_recaptcha4>
|
54 |
-
</rewrite>
|
55 |
-
<rewrite>
|
56 |
-
<fontis_recaptcha5>
|
57 |
-
<from><![CDATA[#^/contacts#]]></from>
|
58 |
-
<to>/recaptcha/contacts/</to>
|
59 |
-
</fontis_recaptcha5>
|
60 |
-
</rewrite>
|
61 |
-
|
62 |
-
<models>
|
63 |
-
<fontis_recaptcha>
|
64 |
-
<class>Fontis_Recaptcha_Model</class>
|
65 |
-
</fontis_recaptcha>
|
66 |
-
</models>
|
67 |
-
<blocks>
|
68 |
-
<review>
|
69 |
-
<rewrite>
|
70 |
-
<form>Fontis_Recaptcha_Block_Review_Form</form>
|
71 |
-
</rewrite>
|
72 |
-
</review>
|
73 |
-
</blocks>
|
74 |
-
<helpers>
|
75 |
-
<fontis_recaptcha>
|
76 |
-
<class>Fontis_Recaptcha_Helper</class>
|
77 |
-
</fontis_recaptcha>
|
78 |
-
</helpers>
|
79 |
-
</global>
|
80 |
-
<frontend>
|
81 |
-
<routers>
|
82 |
-
<fontis_recaptcha>
|
83 |
-
<use>standard</use>
|
84 |
-
<args>
|
85 |
-
<module>Fontis_Recaptcha</module>
|
86 |
-
<frontName>recaptcha</frontName>
|
87 |
-
</args>
|
88 |
-
</fontis_recaptcha>
|
89 |
-
</routers>
|
90 |
-
<layout>
|
91 |
-
<updates>
|
92 |
-
<fontis_recaptcha module="Fontis_Recaptcha">
|
93 |
-
<file>fontis_recaptcha.xml</file>
|
94 |
-
</fontis_recaptcha>
|
95 |
-
</updates>
|
96 |
-
</layout>
|
97 |
-
</frontend>
|
98 |
-
<default>
|
99 |
-
<fontis_recaptcha>
|
100 |
-
<setup>
|
101 |
-
<public_key></public_key>
|
102 |
-
<private_key></private_key>
|
103 |
-
<recaptcha_theme>magento</recaptcha_theme>
|
104 |
-
<language>en</language>
|
105 |
-
<textbox><b>Recaptcha helps stop spam.</b></textbox>
|
106 |
-
</setup>
|
107 |
-
<recaptcha>
|
108 |
-
<when_loggedin>1</when_loggedin>
|
109 |
-
<sendfriend>1</sendfriend>
|
110 |
-
<contacts>1</contacts>
|
111 |
-
<customer>1</customer>
|
112 |
-
<review>1</review>
|
113 |
-
</recaptcha>
|
114 |
-
<magento>
|
115 |
-
<text_captcha>Enter the words above:</text_captcha>
|
116 |
-
<audio_captcha>Enter the words you hear:</audio_captcha>
|
117 |
-
</magento>
|
118 |
-
</fontis_recaptcha>
|
119 |
-
</default>
|
120 |
-
<adminhtml>
|
121 |
-
<acl>
|
122 |
-
<resources>
|
123 |
-
<all>
|
124 |
-
<title>Allow Everything</title>
|
125 |
-
</all>
|
126 |
-
<admin>
|
127 |
-
<children>
|
128 |
-
<system>
|
129 |
-
<children>
|
130 |
-
<config>
|
131 |
-
<children>
|
132 |
-
<fontis_recaptcha>
|
133 |
-
<title>Recaptcha</title>
|
134 |
-
</fontis_recaptcha>
|
135 |
-
</children>
|
136 |
-
</config>
|
137 |
-
</children>
|
138 |
-
</system>
|
139 |
-
</children>
|
140 |
-
</admin>
|
141 |
-
</resources>
|
142 |
-
</acl>
|
143 |
-
</adminhtml>
|
144 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/etc/system.xml
DELETED
@@ -1,177 +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) 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 |
-
<tabs>
|
26 |
-
<fontis_extensions translate="label" module="fontis_recaptcha">
|
27 |
-
<label>Fontis Extensions</label>
|
28 |
-
<sort_order>1000000</sort_order>
|
29 |
-
</fontis_extensions>
|
30 |
-
</tabs>
|
31 |
-
<sections>
|
32 |
-
<fontis_recaptcha>
|
33 |
-
<label>Recaptcha</label>
|
34 |
-
<tab>fontis_extensions</tab>
|
35 |
-
<frontend_type>text</frontend_type>
|
36 |
-
<sort_order>999999</sort_order>
|
37 |
-
<show_in_default>1</show_in_default>
|
38 |
-
<show_in_website>1</show_in_website>
|
39 |
-
<show_in_store>1</show_in_store>
|
40 |
-
<groups>
|
41 |
-
<setup translate="label">
|
42 |
-
<label>Recaptcha Setup</label>
|
43 |
-
<frontend_type>text</frontend_type>
|
44 |
-
<sort_order>2</sort_order>
|
45 |
-
<show_in_default>1</show_in_default>
|
46 |
-
<show_in_website>1</show_in_website>
|
47 |
-
<show_in_store>1</show_in_store>
|
48 |
-
<fields>
|
49 |
-
<public_key translate="label">
|
50 |
-
<label>Public Key</label>
|
51 |
-
<frontend_type>text</frontend_type>
|
52 |
-
<sort_order>10</sort_order>
|
53 |
-
<show_in_default>1</show_in_default>
|
54 |
-
<show_in_website>1</show_in_website>
|
55 |
-
<show_in_store>1</show_in_store>
|
56 |
-
</public_key>
|
57 |
-
<private_key translate="label">
|
58 |
-
<label>Private Key</label>
|
59 |
-
<frontend_type>text</frontend_type>
|
60 |
-
<sort_order>11</sort_order>
|
61 |
-
<show_in_default>1</show_in_default>
|
62 |
-
<show_in_website>1</show_in_website>
|
63 |
-
<show_in_store>1</show_in_store>
|
64 |
-
</private_key>
|
65 |
-
<theme translate="label">
|
66 |
-
<label>Recaptcha Theme</label>
|
67 |
-
<frontend_type>select</frontend_type>
|
68 |
-
<source_model>fontis_recaptcha/source_recaptchatheme</source_model>
|
69 |
-
<sort_order>1</sort_order>
|
70 |
-
<show_in_default>1</show_in_default>
|
71 |
-
<show_in_website>1</show_in_website>
|
72 |
-
<show_in_store>1</show_in_store>
|
73 |
-
</theme>
|
74 |
-
<language translate="label">
|
75 |
-
<label>Language</label>
|
76 |
-
<frontend_type>select</frontend_type>
|
77 |
-
<source_model>fontis_recaptcha/source_recaptchalanguage</source_model>
|
78 |
-
<sort_order>2</sort_order>
|
79 |
-
<show_in_default>1</show_in_default>
|
80 |
-
<show_in_website>1</show_in_website>
|
81 |
-
<show_in_store>1</show_in_store>
|
82 |
-
</language>
|
83 |
-
<textbox translate="label">
|
84 |
-
<label>Info Message</label>
|
85 |
-
<frontend_type>text</frontend_type>
|
86 |
-
<sort_order>3</sort_order>
|
87 |
-
<show_in_default>1</show_in_default>
|
88 |
-
<show_in_website>1</show_in_website>
|
89 |
-
<show_in_store>1</show_in_store>
|
90 |
-
</textbox>
|
91 |
-
</fields>
|
92 |
-
</setup>
|
93 |
-
<recaptcha translate="label">
|
94 |
-
<label>Recaptcha Controls</label>
|
95 |
-
<frontend_type>text</frontend_type>
|
96 |
-
<sort_order>5</sort_order>
|
97 |
-
<show_in_default>1</show_in_default>
|
98 |
-
<show_in_website>1</show_in_website>
|
99 |
-
<show_in_store>1</show_in_store>
|
100 |
-
<fields>
|
101 |
-
<when_loggedin translate="label">
|
102 |
-
<label>Hide for Logged-in Customers</label>
|
103 |
-
<frontend_type>select</frontend_type>
|
104 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
105 |
-
<sort_order>1</sort_order>
|
106 |
-
<show_in_default>1</show_in_default>
|
107 |
-
<show_in_website>1</show_in_website>
|
108 |
-
<show_in_store>1</show_in_store>
|
109 |
-
</when_loggedin>
|
110 |
-
<sendfriend translate="label">
|
111 |
-
<label>Email to a Friend Form</label>
|
112 |
-
<frontend_type>select</frontend_type>
|
113 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
114 |
-
<sort_order>2</sort_order>
|
115 |
-
<show_in_default>1</show_in_default>
|
116 |
-
<show_in_website>1</show_in_website>
|
117 |
-
<show_in_store>1</show_in_store>
|
118 |
-
</sendfriend>
|
119 |
-
<contacts translate="label">
|
120 |
-
<label>Contact Us Form</label>
|
121 |
-
<frontend_type>select</frontend_type>
|
122 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
123 |
-
<sort_order>2</sort_order>
|
124 |
-
<show_in_default>1</show_in_default>
|
125 |
-
<show_in_website>1</show_in_website>
|
126 |
-
<show_in_store>1</show_in_store>
|
127 |
-
</contacts>
|
128 |
-
<customer translate="label">
|
129 |
-
<label>Account Creation Form</label>
|
130 |
-
<frontend_type>select</frontend_type>
|
131 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
132 |
-
<sort_order>2</sort_order>
|
133 |
-
<show_in_default>1</show_in_default>
|
134 |
-
<show_in_website>1</show_in_website>
|
135 |
-
<show_in_store>1</show_in_store>
|
136 |
-
</customer>
|
137 |
-
<review translate="label">
|
138 |
-
<label>Product Review Form</label>
|
139 |
-
<frontend_type>select</frontend_type>
|
140 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
141 |
-
<sort_order>2</sort_order>
|
142 |
-
<show_in_default>1</show_in_default>
|
143 |
-
<show_in_website>1</show_in_website>
|
144 |
-
<show_in_store>1</show_in_store>
|
145 |
-
</review>
|
146 |
-
</fields>
|
147 |
-
</recaptcha>
|
148 |
-
<magento translate="label">
|
149 |
-
<label>Recaptcha Magento Theme Setup</label>
|
150 |
-
<frontend_type>text</frontend_type>
|
151 |
-
<sort_order>11</sort_order>
|
152 |
-
<show_in_default>1</show_in_default>
|
153 |
-
<show_in_website>1</show_in_website>
|
154 |
-
<show_in_store>1</show_in_store>
|
155 |
-
<fields>
|
156 |
-
<text_captcha translate="label">
|
157 |
-
<label>Text Captcha Instructions</label>
|
158 |
-
<frontend_type>text</frontend_type>
|
159 |
-
<sort_order>10</sort_order>
|
160 |
-
<show_in_default>1</show_in_default>
|
161 |
-
<show_in_website>1</show_in_website>
|
162 |
-
<show_in_store>1</show_in_store>
|
163 |
-
</text_captcha>
|
164 |
-
<audio_captcha translate="label">
|
165 |
-
<label>Audio Captcha Instructions</label>
|
166 |
-
<frontend_type>text</frontend_type>
|
167 |
-
<sort_order>10</sort_order>
|
168 |
-
<show_in_default>1</show_in_default>
|
169 |
-
<show_in_website>1</show_in_website>
|
170 |
-
<show_in_store>1</show_in_store>
|
171 |
-
</audio_captcha>
|
172 |
-
</fields>
|
173 |
-
</magento>
|
174 |
-
</groups>
|
175 |
-
</fontis_recaptcha>
|
176 |
-
</sections>
|
177 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fontis/Recaptcha/install.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
If you're having trouble installing this extension, put the following key into Magento connect:
|
2 |
+
|
3 |
+
http://pear.fontis.com.au/Fontis_Recaptcha
|
app/design/frontend/base/default/layout/fontis_recaptcha.xml
DELETED
@@ -1,59 +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) 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/base/default/template/fontis/recaptcha/contacts.phtml
DELETED
@@ -1,78 +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) 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 |
-
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
24 |
-
<div class="page-title">
|
25 |
-
<h1><?php echo Mage::helper('contacts')->__('Contact Us') ?></h1>
|
26 |
-
</div>
|
27 |
-
<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">
|
28 |
-
<div class="fieldset">
|
29 |
-
<h2 class="legend"><?php echo Mage::helper('contacts')->__('Contact Information') ?></h2>
|
30 |
-
<ul class="form-list">
|
31 |
-
<li class="fields">
|
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>
|
58 |
-
</div>
|
59 |
-
|
60 |
-
<?php // recaptcha
|
61 |
-
if( !(Mage::getStoreConfig("fontis_recaptcha/recaptcha/when_loggedin") && (Mage::getSingleton('customer/session')->isLoggedIn())) )
|
62 |
-
{
|
63 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/contacts"))
|
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;" />
|
71 |
-
<button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
|
72 |
-
</div>
|
73 |
-
</form>
|
74 |
-
<script type="text/javascript">
|
75 |
-
//<![CDATA[
|
76 |
-
var contactForm = new VarienForm('contactForm', true);
|
77 |
-
//]]>
|
78 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/fontis/recaptcha/form.phtml
DELETED
@@ -1,141 +0,0 @@
|
|
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/base/default/template/fontis/recaptcha/recaptcha.phtml
DELETED
@@ -1,68 +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) 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 |
-
<?php
|
24 |
-
$theme = Mage::getStoreConfig("fontis_recaptcha/setup/theme");
|
25 |
-
$language = Mage::getStoreConfig("fontis_recaptcha/setup/language");
|
26 |
-
$publickey = Mage::getStoreConfig("fontis_recaptcha/setup/public_key");
|
27 |
-
$textbox = Mage::getStoreConfig("fontis_recaptcha/setup/textbox");
|
28 |
-
?>
|
29 |
-
|
30 |
-
|
31 |
-
<?php if( $theme == 'magento'): ?>
|
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>
|
42 |
-
<span class="recaptcha_only_if_audio"><?php echo Mage::getStoreConfig("fontis_recaptcha/magento/audio_captcha") ?></span>
|
43 |
-
<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" class="input-text required-entry" />
|
44 |
-
</div>
|
45 |
-
</div>
|
46 |
-
<div class="col-2" style="float: left; width: 25px; background: transparent; border: 0px none;">
|
47 |
-
<div><a href="javascript:Recaptcha.reload()"><img src="<?php echo $this->getSkinUrl('images/fontis/refresh.png');?>" title="Get another CAPTCHA" alt="Get another CAPTCHA"/></a></div>
|
48 |
-
<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')"><img src="<?php echo $this->getSkinUrl('images/fontis/sound.png');?>" title="Get an audio CAPTCHA" alt="Get an audio CAPTCHA"/></a></div>
|
49 |
-
<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')"><img src="<?php echo $this->getSkinUrl('images/fontis/text.png');?>" title="Get an image CAPTCHA" alt="Get an image CAPTCHA"/></a></div>
|
50 |
-
<div><a href="javascript:Recaptcha.showhelp()"><img src="<?php echo $this->getSkinUrl('images/fontis/help.png');?>" title="Help" alt="Help"/></a></div>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
<?php echo Mage::helper("fontis_recaptcha")->recaptcha_get_html($publickey, null, Mage::app()->getRequest()->isSecure()); ?>
|
54 |
-
</div>
|
55 |
-
|
56 |
-
<?php elseif( $theme == 'custom' ): ?>
|
57 |
-
|
58 |
-
<p>To create your custom recaptcha theme copy default/templates/fontis/recaptcha.phtml to your_theme/templates/fontis/recaptcha.phtml and replace this text with custom theme code.</p>
|
59 |
-
|
60 |
-
<?php else: ?>
|
61 |
-
|
62 |
-
<div style="margin-bottom: 10px;"><?php echo $textbox; ?></div>
|
63 |
-
<?php
|
64 |
-
echo "<script> var RecaptchaOptions = { theme : '$theme', lang : '$language' }; </script>";
|
65 |
-
echo Mage::helper("fontis_recaptcha")->recaptcha_get_html($publickey, null, Mage::app()->getRequest()->isSecure());
|
66 |
-
?>
|
67 |
-
|
68 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/fontis/recaptcha/register.phtml
DELETED
@@ -1,185 +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) 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 |
-
/**
|
26 |
-
* Create account form template
|
27 |
-
*
|
28 |
-
* @see Mage_Customer_Block_Form_Register
|
29 |
-
*/
|
30 |
-
?>
|
31 |
-
<div class="account-create">
|
32 |
-
<div class="page-title">
|
33 |
-
<h1><?php echo $this->__('Create an Account') ?></h1>
|
34 |
-
</div>
|
35 |
-
<?php echo $this->getChildHtml('form_fields_before')?>
|
36 |
-
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
37 |
-
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
|
38 |
-
<div class="fieldset">
|
39 |
-
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
|
40 |
-
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
|
41 |
-
<h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
|
42 |
-
<ul class="form-list">
|
43 |
-
<li class="fields">
|
44 |
-
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?>
|
45 |
-
</li>
|
46 |
-
<li>
|
47 |
-
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
48 |
-
<div class="input-box">
|
49 |
-
<input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
50 |
-
</div>
|
51 |
-
</li>
|
52 |
-
<?php if ($this->isNewsletterEnabled()): ?>
|
53 |
-
<li class="control">
|
54 |
-
<div class="input-box">
|
55 |
-
<input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
|
56 |
-
</div>
|
57 |
-
<label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
|
58 |
-
</li>
|
59 |
-
<?php endif ?>
|
60 |
-
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
61 |
-
<?php if ($_dob->isEnabled()): ?>
|
62 |
-
<li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
|
63 |
-
<?php endif ?>
|
64 |
-
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
65 |
-
<?php if ($_taxvat->isEnabled()): ?>
|
66 |
-
<li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
|
67 |
-
<?php endif ?>
|
68 |
-
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
69 |
-
<?php if ($_gender->isEnabled()): ?>
|
70 |
-
<li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
|
71 |
-
<?php endif ?>
|
72 |
-
</ul>
|
73 |
-
</div>
|
74 |
-
<?php if($this->getShowAddressFields()): ?>
|
75 |
-
<div class="fieldset">
|
76 |
-
<input type="hidden" name="create_address" value="1" />
|
77 |
-
<h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
|
78 |
-
<ul class="form-list">
|
79 |
-
<li class="fields">
|
80 |
-
<div class="field">
|
81 |
-
<label for="company"><?php echo $this->__('Company') ?></label>
|
82 |
-
<div class="input-box">
|
83 |
-
<input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
84 |
-
</div>
|
85 |
-
</div>
|
86 |
-
<div class="field">
|
87 |
-
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
88 |
-
<div class="input-box">
|
89 |
-
<input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
|
90 |
-
</div>
|
91 |
-
</div>
|
92 |
-
</li>
|
93 |
-
<li class="wide">
|
94 |
-
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
|
95 |
-
<div class="input-box">
|
96 |
-
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
|
97 |
-
</div>
|
98 |
-
</li>
|
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 ?>
|
106 |
-
<li class="fields">
|
107 |
-
<div class="field">
|
108 |
-
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
109 |
-
<div class="input-box">
|
110 |
-
<input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
111 |
-
</div>
|
112 |
-
</div>
|
113 |
-
<div class="field">
|
114 |
-
<label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
115 |
-
<div class="input-box">
|
116 |
-
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
117 |
-
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
118 |
-
</select>
|
119 |
-
<script type="text/javascript">
|
120 |
-
//<![CDATA[
|
121 |
-
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
122 |
-
//]]>
|
123 |
-
</script>
|
124 |
-
<input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
125 |
-
</div>
|
126 |
-
</div>
|
127 |
-
</li>
|
128 |
-
<li class="fields">
|
129 |
-
<div class="field">
|
130 |
-
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
131 |
-
<div class="input-box">
|
132 |
-
<input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
133 |
-
</div>
|
134 |
-
</div>
|
135 |
-
<div class="field">
|
136 |
-
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
137 |
-
<div class="input-box">
|
138 |
-
<?php echo $this->getCountryHtmlSelect() ?>
|
139 |
-
</div>
|
140 |
-
</div>
|
141 |
-
</li>
|
142 |
-
</ul>
|
143 |
-
<input type="hidden" name="default_billing" value="1" />
|
144 |
-
<input type="hidden" name="default_shipping" value="1" />
|
145 |
-
</div>
|
146 |
-
<?php endif; ?>
|
147 |
-
<div class="fieldset">
|
148 |
-
<h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
|
149 |
-
<ul class="form-list">
|
150 |
-
<li class="fields">
|
151 |
-
<div class="field">
|
152 |
-
<label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
153 |
-
<div class="input-box">
|
154 |
-
<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
155 |
-
</div>
|
156 |
-
</div>
|
157 |
-
<div class="field">
|
158 |
-
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
159 |
-
<div class="input-box">
|
160 |
-
<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
|
161 |
-
</div>
|
162 |
-
</div>
|
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>
|
177 |
-
<script type="text/javascript">
|
178 |
-
//<![CDATA[
|
179 |
-
var dataForm = new VarienForm('form-validate', true);
|
180 |
-
<?php if($this->getShowAddressFields()): ?>
|
181 |
-
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
|
182 |
-
<?php endif; ?>
|
183 |
-
//]]>
|
184 |
-
</script>
|
185 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/fontis/recaptcha/send.phtml
DELETED
@@ -1,148 +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) 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 |
-
* Send to friend form
|
25 |
-
*
|
26 |
-
* @see Mage_Sendfriend_Block_Index
|
27 |
-
*/
|
28 |
-
?>
|
29 |
-
<script type="text/javascript">
|
30 |
-
//<![CDATA[
|
31 |
-
i=0;
|
32 |
-
var recipCount = 1;
|
33 |
-
var maxRecip = <?php echo $this->getMaxRecipients() ?>;
|
34 |
-
function remove_recipient(i){
|
35 |
-
$('recipients_name'+i).up(2).remove();
|
36 |
-
recipCount--;
|
37 |
-
if(recipCount<maxRecip && maxRecip != 0) {
|
38 |
-
$('add_recipient_button').show();
|
39 |
-
$('max_recipient_message').hide();
|
40 |
-
}
|
41 |
-
return false;
|
42 |
-
}
|
43 |
-
|
44 |
-
function add_recipient(){
|
45 |
-
ul = $('recipients_options');
|
46 |
-
var li_mail = Element.extend(document.createElement("LI"));
|
47 |
-
li_mail.addClassName('fields additional-row');
|
48 |
-
li_mail.innerHTML = '<p><a href="delete_email" title="<?php echo $this->__('Remove Email') ?>" onclick="remove_recipient('+i+'); return false" class="btn-remove"><?php echo $this->__('Remove Email') ?>"<\/a><\/p>'
|
49 |
-
li_mail.innerHTML += '<div class="field"><label for="recipients_name'+i+'" class="required"><em>*<\/em><?php echo $this->__('Name:') ?><\/label><div class="input-box"><input name="recipients[name][]" type="text" class="input-text required-entry" id="recipients_name'+i+'" /><\/div>';
|
50 |
-
li_mail.innerHTML += '<div class="field"><label for="recipients_email'+i+'" class="required"><em>*<\/em><?php echo $this->__('Email Address:') ?><\/label><div class="input-box"><input name="recipients[email][]" value="" title="<?php echo $this->__('Email Address') ?>" id="recipients_email'+i+'" type="text" class="input-text required-entry validate-email" /><\/div><\/div>';
|
51 |
-
i++;
|
52 |
-
recipCount++;
|
53 |
-
if(recipCount>=maxRecip && maxRecip != 0) {
|
54 |
-
$('add_recipient_button').hide();
|
55 |
-
$('max_recipient_message').show();
|
56 |
-
}
|
57 |
-
|
58 |
-
ul.appendChild(li_mail);
|
59 |
-
}
|
60 |
-
//]]>
|
61 |
-
</script>
|
62 |
-
|
63 |
-
<div class="send-friend">
|
64 |
-
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
65 |
-
<div class="page-title">
|
66 |
-
<h1><?php echo $this->__('Email to a Friend') ?></h1>
|
67 |
-
</div>
|
68 |
-
<form action="<?php echo $this->getSendUrl() ?>" method="post" id="product_sendtofriend_form">
|
69 |
-
<div class="fieldset">
|
70 |
-
<?php echo $this->getBlockHtml('formkey')?>
|
71 |
-
<h2 class="legend"><?php echo $this->__('Sender:') ?></h2>
|
72 |
-
<ul class="form-list" id="sender_options">
|
73 |
-
<li class="fields">
|
74 |
-
<div class="field">
|
75 |
-
<label for="sender_name" class="required"><em>*</em><?php echo $this->__('Name:') ?></label>
|
76 |
-
<div class="input-box">
|
77 |
-
<input name="sender[name]" value="<?php echo $this->htmlEscape($this->getUserName()) ?>" title="<?php echo $this->__('Name') ?>" id="sender_name" type="text" class="input-text required-entry" />
|
78 |
-
</div>
|
79 |
-
</div>
|
80 |
-
<div class="field">
|
81 |
-
<label for="sender_email" class="required"><em>*</em><?php echo $this->__('Email:') ?></label>
|
82 |
-
<div class="input-box">
|
83 |
-
<input name="sender[email]" value="<?php echo $this->htmlEscape($this->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" id="sender_email" type="text" class="input-text required-entry validate-email" />
|
84 |
-
</div>
|
85 |
-
</div>
|
86 |
-
</li>
|
87 |
-
<li class="wide">
|
88 |
-
<label for="sender_message" class="required"><em>*</em><?php echo $this->__('Message:') ?></label>
|
89 |
-
<div class="input-box">
|
90 |
-
<textarea name="sender[message]" class="input-text required-entry" id="sender_message" cols="3" rows="3"><?php echo $this->htmlEscape($this->getMessage())?></textarea>
|
91 |
-
</div>
|
92 |
-
</li>
|
93 |
-
</ul>
|
94 |
-
</div>
|
95 |
-
<div class="fieldset">
|
96 |
-
<h2 class="legend"><?php echo $this->__('Recipient:') ?></h2>
|
97 |
-
<ul class="form-list" id="recipients_options">
|
98 |
-
<li class="fields">
|
99 |
-
<div class="field">
|
100 |
-
<label for="recipients_name" class="required"><em>*</em><?php echo $this->__('Name:') ?></label>
|
101 |
-
<div class="input-box">
|
102 |
-
<input name="recipients[name][]" type="text" class="input-text required-entry" id="recipients_name" />
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
<div class="field">
|
106 |
-
<label for="recipients_email" class="required"><em>*</em><?php echo $this->__('Email Address:') ?></label>
|
107 |
-
<div class="input-box">
|
108 |
-
<input name="recipients[email][]" value="" title="<?php echo $this->__('Email Address') ?>" id="recipients_email" type="text" class="input-text required-entry validate-email" />
|
109 |
-
</div>
|
110 |
-
</div>
|
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 |
-
{
|
118 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/sendfriend"))
|
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>
|
129 |
-
<?php endif; ?>
|
130 |
-
</div>
|
131 |
-
<?php if (1 < $this->getMaxRecipients()): ?>
|
132 |
-
<p id="add_recipient_button">
|
133 |
-
<button type="button" onclick="add_recipient();" class="button"><span><span><?php echo $this->__('Add Recipient') ?></span></span></button>
|
134 |
-
</p>
|
135 |
-
<?php endif; ?>
|
136 |
-
</div>
|
137 |
-
</form>
|
138 |
-
<script type="text/javascript">
|
139 |
-
//<![CDATA[
|
140 |
-
var productSendtofriendForm = new VarienForm('product_sendtofriend_form');
|
141 |
-
productSendtofriendForm.submit = function() {
|
142 |
-
if(this.validator.validate()) {
|
143 |
-
this.form.submit();
|
144 |
-
}
|
145 |
-
}.bind(productSendtofriendForm);
|
146 |
-
//]]>
|
147 |
-
</script>
|
148 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Fontis_Recaptcha.xml
DELETED
@@ -1,31 +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 |
-
<config>
|
25 |
-
<modules>
|
26 |
-
<Fontis_Recaptcha>
|
27 |
-
<active>true</active>
|
28 |
-
<codePool>community</codePool>
|
29 |
-
</Fontis_Recaptcha>
|
30 |
-
</modules>
|
31 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fontis_Recaptcha</name>
|
4 |
-
<version>2.
|
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
|
10 |
-
<description>This extension easily protects the
|
11 |
<notes>Recaptcha extension - version 2</notes>
|
12 |
-
<authors><author><name>Chris</name><user>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Fontis"><dir name="Recaptcha"><
|
16 |
<compatible/>
|
17 |
-
<dependencies
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fontis_Recaptcha</name>
|
4 |
+
<version>2.4.0</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 &quot;Send to Friend&quot;, &quot;Contact Us&quot;, &quot;Product Review&quot; and customer registration forms from unwanted spambots by adding in reCAPTCHA to these forms.</summary>
|
10 |
+
<description>This extension easily protects the &quot;Send to Friend&quot;, &quot;Contact Us&quot;, &quot;Product Review&quot; 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>Norton</user><email>chris.norton@fontis.com.au</email></author></authors>
|
13 |
+
<date>2012-05-23</date>
|
14 |
+
<time>07:03:49</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Fontis"><dir name="Recaptcha"><file name="install.txt" hash="9fbb1905f23f205227f686d1a6faccf7"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.2</min><max>6.0.0</max></php><package><name>Fontis_Info</name><channel>pear.fontis.com.au</channel><min>1.0.0.0</min><max>2.0.0.0</max></package></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/images/fontis/help.png
DELETED
Binary file
|
skin/frontend/base/default/images/fontis/refresh.png
DELETED
Binary file
|
skin/frontend/base/default/images/fontis/sound.png
DELETED
Binary file
|
skin/frontend/base/default/images/fontis/text.png
DELETED
Binary file
|