Thu, 2 September 2010

Total Visits
12170023
Visitors today: 3574

Main Menu
Home
Free Scripts
Free Email
Newsserver
Forum
Guestbook
Web Links
Contact

Our Sponsors
Stromvergleich

Chi Kien Uong
Bebelstrasse 90
70193 Stuttgart
Tel: +49(711) 4596534
Fax: +49(711) 9976123
Deutschland / Germany
If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
Adding a simple human verification test
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 19, 20, 21  Next  
Post new topic   Reply to topic    proxy2.de Forum Index -> Advanced Guestbook Forum Printable version
View previous topic :: View next topic  
Author Message
josephk



Joined: 07 Nov 2005
Posts: 2

PostPosted: Mon Nov 07, 2005 10:58 pm    Post subject: Reply with quote

Thanx Carbon!!!!

All seems ok!!!

You're Great! Wink

JK
Back to top
View user's profile Send private message
grelli



Joined: 16 Nov 2005
Posts: 3

PostPosted: Wed Nov 16, 2005 4:51 pm    Post subject: Random verification text! Reply with quote

For those who want to have a random verification text, I made some addtions to the MOD which enables this!

BEFORE MAKING ANY CHANGES, TAKE BACKUP OF ALL THE FILES THAT WILL BE EDITED!

Follow the changes in the original MOD and then follow the following instructions::


Open lang/English.php (or the language file that you are using)

Find
Code:
$months[11] = "December";


After Add
Code:

# BotTest

$randomText = array("ARMADILLA","GUESTBOOK","VERIFICATION","HUMAN","APACHE","PROXY2");
$index = rand(0,count($randomText)-1);

$LANG["randomText"] = $randomText[$index];

You can of course choose any words you like for the verification and also add more than 6 of them.

Save and close the file.



Open lib/add.class.php

Find
Code:
     var $bottestanswer = 'armadillo'; /* this is the answer to the question. It must contain no '  */


Replace that with
Code:
     var $randomText = '';



Find next
Code:
          $this->bottestanswer = addslashes($this->bottestanswer);


Replace that with
Code:
          $this->randomText = addslashes($this->randomText);


Find next
Code:
      } elseif (strtolower($this->bottest) != strtolower($this->bottestanswer)) {


Replace that with
Code:
      } elseif (strtolower($this->bottest) != strtolower($this->randomText)) {


Find next
Code:
      $HIDDEN .= "<input type=\"hidden\" name=\"bottest\" value=\"".$this->bottest."\">\n";


After Add
Code:
      $HIDDEN .= "<input type=\"hidden\" name=\"randomText\" value=\"".$this->randomText."\">\n";


Save and close the file.



Open addentry.php

Find
Code:
    $gb_post->bottest = (isset($HTTP_POST_VARS["bottest"])) ? $HTTP_POST_VARS["bottest"] : '';


After Add
Code:
    $gb_post->randomText = (isset($HTTP_POST_VARS["randomText"])) ? $HTTP_POST_VARS["randomText"] : '';


Save and close the file.



Open templates/form.php

Find
Code:
    <td class="font2">To prove you are not a bot please type the word ARMADILLO into the box below.<br>


Replace that with
Code:
    <td class="font2">To prove you are not a bot please type the word <SCRIPT LANGUAGE="JavaScript">document.write("$LANG[randomText]")</SCRIPT> into the box below.<br>


Find
Code:
      <input type="text" size="42" maxlength="30" name="bottest"></td>


Replace that with
Code:
     <input type="text" size="42" maxlength="30" name="bottest">
     <input type="hidden" name="randomText" value="$LANG[randomText]"></td>



Save and close the file.

Thats all!

These changes worked for me on my 2.3.1 Advanced Guestbook! I will NOT offer any support concerning this addition to the MOD, I just don't have time! So if you have problems with these changes, you are on your own!

/Grelli.


Last edited by grelli on Thu Dec 08, 2005 2:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
Carbonize



Joined: 12 Jun 2003
Posts: 3961
Location: Bristol, UK

PostPosted: Wed Nov 16, 2005 5:20 pm    Post subject: Reply with quote

your last instruction would end up with there being two input boxes for the anti bot test.
_________________
Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
grelli



Joined: 16 Nov 2005
Posts: 3

PostPosted: Wed Nov 16, 2005 5:55 pm    Post subject: Reply with quote

Carbonize wrote:
your last instruction would end up with there being two input boxes for the anti bot test.
Thats not true Smile

The second input field...
Code:
     <input type="hidden" name="randomText" value="$LANG[randomText]">
...is a hidden field and its only purpose is to transfer the random text that was generated to the next step of the posting process to be able to compare it to the text that the user inputs!

/Grelli.
Back to top
View user's profile Send private message
Carbonize



Joined: 12 Jun 2003
Posts: 3961
Location: Bristol, UK

PostPosted: Wed Nov 16, 2005 5:59 pm    Post subject: Reply with quote

Yeah sorry was speed reading. Nasty habit of mine. Just to make it clear to people that this mod only works if you use the "Type this word into the box below" type of test as opposed to an actual question such as "What colour is the sky".
_________________
Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
imhungry



Joined: 18 Nov 2005
Posts: 1

PostPosted: Fri Nov 18, 2005 3:30 am    Post subject: Reply with quote

hey there, this is an awesome script, im having a smallish problem though, just like someone else did earlyer - i can write whatever i want in the verification box, and it lets me post. checked the code over but i it all seems ok, not sure what ive done wrong, heres a link

http://dj-triquatra.com/guestbook
Back to top
View user's profile Send private message
Carbonize



Joined: 12 Jun 2003
Posts: 3961
Location: Bristol, UK

PostPosted: Fri Nov 18, 2005 6:38 am    Post subject: Reply with quote

1 - update to 2.3.4 by downloading the full package from this site and replacing all but the config.inc.php file. This patches a couple of exploits. It does mean you will have to edit the templates again though.

2 - I believe the error lies in either addentry.php or add.class.php. Goto www.carbonize.co.uk/AG and have a look at the pre modded files I put there.
_________________
Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
testar81



Joined: 22 Oct 2004
Posts: 33

PostPosted: Mon Nov 28, 2005 2:05 pm    Post subject: Reply with quote

I have downloaded the file to make the changes to my guestbook but now i get an error when i should write messages, it says that i havent write anything in the name filed though i have done that what should i do?
I forgot to take backup of the old files.
Plese help.
_________________
Nordiva.
Back to top
View user's profile Send private message
Carbonize



Joined: 12 Jun 2003
Posts: 3961
Location: Bristol, UK

PostPosted: Mon Nov 28, 2005 3:56 pm    Post subject: Reply with quote

testar81 wrote:
I have downloaded the file to make the changes to my guestbook but now i get an error when i should write messages, it says that i havent write anything in the name filed though i have done that what should i do?
I forgot to take backup of the old files.
Plese help.


You using 2.3.4 ?
_________________
Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mabrychis



Joined: 28 Nov 2005
Posts: 5

PostPosted: Mon Nov 28, 2005 10:22 pm    Post subject: Reply with quote

I am using version 2.3.1 and tried using the revised code provided here and of course I have done something wrong somewhere I just don't know where! This is the error I am getting only when you click sign the guestbook:

Parse error: parse error, unexpected T_ELSEIF, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/jmn1888/public_html/guestbook/lib/add.class.php on line 202

Can I just use the already provided files and upload them? I wasn't sure as it says its for a different version and I didnt know if that would conflict with my current version. Would be much easier Wink

So, here is the link:

http://www.mabrychihuahuas.com/guestbook/index.php

Click sign the guestbook and that is where the error message comes in. Please help! Also, I took no backups of the files, now I am sorry.
Back to top
View user's profile Send private message
JTD



Joined: 08 May 2004
Posts: 529
Location: Arkansas

PostPosted: Tue Nov 29, 2005 1:14 am    Post subject: Reply with quote

Just reload the add.class.php file.
_________________
LINK-> Use Lazarus Guestbook
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mabrychis



Joined: 28 Nov 2005
Posts: 5

PostPosted: Tue Nov 29, 2005 2:22 am    Post subject: Reply with quote

Thank you, it appears to have worked Very Happy
Back to top
View user's profile Send private message
rvargas



Joined: 08 Dec 2005
Posts: 1
Location: Los Angeles, CA

PostPosted: Thu Dec 08, 2005 3:45 am    Post subject: error Reply with quote

Hi,
I follow the instructions step by step, and I seem to have problems.
when I try to add a new entry on the guest book I get the error that I need to type the word for the human verification,
I tried to change the word and it did not work,

I went through my code several times and I could not find the error.



could you please give me a hand on where I messed up.
Thank you

I'm using version 2.31
Back to top
View user's profile Send private message Visit poster's website
Carbonize



Joined: 12 Jun 2003
Posts: 3961
Location: Bristol, UK

PostPosted: Thu Dec 08, 2005 10:26 am    Post subject: Reply with quote

Sounds like you messed up something. You really should update to 2.3.4 but anyway you can get the premodded files from www.carbonize.co.uk/AG
_________________
Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
grelli



Joined: 16 Nov 2005
Posts: 3

PostPosted: Thu Dec 08, 2005 2:23 pm    Post subject: Reply with quote

EDIT to the random verification text MOD:

Open lang/English.php (or the language file that you are using)

Find
Code:
$months[11] = "December";


After Add
Code:

# BotTest

$randomText = array("ARMADILLA","GUESTBOOK","VERIFICATION","HUMAN","APACHE","PROXY2");
$index = rand(0,count($randomText)-1);

$LANG["randomText"] = $randomText[$index];

You can of course choose any words you like for the verification and also add more than 6 of them.

Save and close the file.

The change is "count($randomText)-1)", this needs to be done to prevent the index to be OutOfBounds when choosing the random index.

/Grelli.

P.s. This has been changed in the instructions in the previous post!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    proxy2.de Forum Index -> Advanced Guestbook Forum All times are GMT
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 19, 20, 21  Next
Page 12 of 21

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group
Processed in 0.117143 seconds : 14 queries executed