Go Back   Mosets Community > Third party Developers, Addons and Services for Mosets components > 3rd party addons & Custom Jobs

Reply
 
Thread Tools Search this Thread Display Modes
  #31  
Old 04-01-2008, 04:36 AM
Zibi Zibi is offline
Junior Member
 
Join Date: Feb 2007
Location: Poland
Posts: 18
Default

Hm... I'm not Walter C...but It works :
1) Have you got com_securityimages installed succesfully?
My version is: Security Images or CAPTCHA for Joomla
version 4.1.2.
Succes <=> you can edit "General settings" "GEneral Language" "Core Language" "Logs" etc.

2) I applied changes absolutely just the way, Walter described here:
http://forums.waltercedric.com/index.php?topic=481.0

(site you quoted )
Of course, take care of function names ("file_exists") and dots between strings and php-variables.
3) ONE thing I changed is (in lang.php ):
PHP Code:
include_once($mosConfig_absolute_path.'/administrator/components/com_securityimages/languages/polish.php'); 
instead of:
PHP Code:
  include_once($mosConfig_absolute_path.'/administrator/components/com_securityimages/languages/'.$mosConfig_lang.'.php'); 
I have two languages - another isn't active but present.
4) Have you done sth with php-error reporting in php.ini? Like:
Code:
display_errors=off, html_errors=off
?

Have all errors shown - pretty good thing in debugging.
Write if it helps.
Reply With Quote
  #32  
Old 05-06-2008, 09:31 PM
v123shine v123shine is offline
Junior Member
 
Join Date: Apr 2008
Posts: 3
Question Please Help Me

Quote:
Originally Posted by twy View Post
Hi,

I have used this method in v1.5, and confirmed it also works in v2.0.6. The steps:

1. Go here and download the zip file.
2. For this example here, extract the files to /captcha in your root directory (let's say /public_html/captcha/). You actually only need the php file and the monofont.ttf
3. Go to your admin backend, under Templates -> Your Template e.g. M2, -> Add Listing. You can add the following code anywhere, but I used the following:
After
Code:
while( $this->fields->hasNext() ) {
		$field = $this->fields->getField();
		if($field->hasInputField()) {
			echo '<tr><td valign="top" align="left">';
			if($field->getCaption() != false) {
				if($field->isRequired()) {
					echo '<strong>' . $field->getCaption() . '</strong>:';
				} else {
					echo $field->getCaption() . ':';
				}
			}
			echo '</td><td align="left">';
			echo $field->getModPrefixText();
			echo $field->getInputHTML();
			echo $field->getModSuffixText();
			echo '</td></tr>';
		}
		$this->fields->next();
	}
	?>
I add:
Code:
<tr><td align="left"><img src="/captcha/CaptchaSecurityImages.php" /></td>
<td><input id="security_code" name="security_code" type="text" /><br />Please enter the code on the left<br />(Protection against SpamBots)</td>
</tr>
4. Open the /components/com_mtree/mtree.php (backup first in case anything bad happens). Search for the savelisting() function (approx. line 3053). Search for this code

Code:
# Check if any malicious user is trying to submit link
	if ( ($mtconf->get('user_addlisting') == 1 && $my->id < 1) || $mtconf->get('user_addlisting') == -1 ) {
		
		echo _NOT_EXIST;

	} else {
	# Allowed
Add the following after it
Code:
session_start();
		if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
		// Insert you code for processing the form here, e.g emailing the submission, entering it into a database. 
		unset($_SESSION['security_code']);
		} else {
		// Insert your code for showing an error message here
		
    		echo "<script> alert('You entered the wrong code. Please try again'); window.history.go(-1); </script>\n";
		exit();
		}
Voila. It should work now. There are additional instructions in the link above, but the steps I just gave should work.

I'm success to add captcha in my mtree but everytime i Add new Listing and i submit my new listing, i got this message : "You entered the wrong code. Please try again"

Please Help Me Sir.

Forgive Me for my english language
Reply With Quote
  #33  
Old 03-23-2009, 09:13 PM
ssnobben ssnobben is offline
Mosets'd
 
Join Date: Nov 2006
Posts: 805
Question

Quote:
Originally Posted by v123shine View Post
I'm success to add captcha in my mtree but everytime i Add new Listing and i submit my new listing, i got this message : "You entered the wrong code. Please try again"

Please Help Me Sir.

Forgive Me for my english language
Any updates about using secure captcha for MT 2.0 and (2.1) ?

I got users reg too now from russia and want to implement some kind of captcha for MT and HP - if it helps (http://www.xxxdosug.ru)
__________________
Success in the long run Its not about the code its about the people and community that's make it!
Reply With Quote
  #34  
Old 03-27-2009, 05:40 PM
bernardyap bernardyap is offline
Junior Member
 
Join Date: Mar 2009
Posts: 1
Default

Thank you for the info and I will try to implment in to my system.
Reply With Quote
  #35  
Old 10-27-2009, 12:55 AM
Lenfitz Lenfitz is offline
Mosets'd
 
Join Date: May 2008
Location: Australia
Posts: 298
Default Captcha Joomla 1.5.14 & Mosets 2.1.2

I've been trying to impliment a captcha in 2.1.2 Contact owner form like most others.

The closest i've got so far is being able to display the captcha images as per twy example. This will work for j1.5 and 2.1.2


<tr><td align="left"><br /><img src="captcha/CaptchaSecurityImages.php" /></td>
<td align="left"><br /><br /><strong> Enter Security code here >> </strong><input id="security_code" name="security_code" type="text" /><br /><br /></td>
</tr>



Working to this point.

Problem..

What doesnt seem to be able to be inserted into mtree.ini anywhere is the session code and just returns input error box "please try again"


session_start();
if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {

// Insert you code for processing the form here, e.g emailing the submission, entering it into a database.
unset($_SESSION['security_code']);
} else {

// Insert your code for showing an error message here

echo "<script> alert('You entered the wrong code. Please try again'); window.history.go(-1); </script>\n";
exit();
}



Has anyone found a way to make the session code work or found a replacement session code that works in 2.1.2?

Regards.

P.S. I also have walter cedrics 5.1.2 captcha running onsite but this appears very difficult to impliment into mosets portion.
Reply With Quote
  #36  
Old 10-27-2009, 07:20 PM
dknight dknight is offline
Mosets Team - Lead Developer
 
Join Date: Dec 2004
Posts: 25,985
Default

I would dump the value of both $_SESSION['security_code'] and $_POST['security_code'] and see if they are set correctly here.
__________________
Lee
Lead Developer
Mosets.com - Quality Joomla! Solutions
Reply With Quote
  #37  
Old 01-31-2010, 05:54 AM
sergiv sergiv is offline
Junior Member
 
Join Date: Jan 2010
Posts: 1
Default

The problem with the error has already been solved?
Entered the correct code, writes the error: "You entered the wrong code. Please try again"
sorry for my English.
Reply With Quote
  #38  
Old 01-31-2010, 01:48 PM
Lenfitz Lenfitz is offline
Mosets'd
 
Join Date: May 2008
Location: Australia
Posts: 298
Default

If you want working captcha read here

http://forum.mosets.com/showthread.php?t=13770
__________________
Member of the Australian and USA Joomla! Translation Team
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade immediately to Joomla! 1.0.11 Alex Announcements 0 08-30-2006 05:43 PM
Joomla! Extensions Directory launched with Mosets Tree dknight Announcements 0 03-06-2006 05:23 PM


All times are GMT +8. The time now is 08:28 PM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.