Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New Thread/Post Image Verification for Guests Details »»
New Thread/Post Image Verification for Guests
Version: 1.00, by AN-net AN-net is offline
Developer Last Online: Jan 2010 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-21-2004 Last Update: Never Installs: 10
 
No support by the author.

New Thread/Post Image Verification

Description:
This hack will add new a feature to new posts and new threads. When a guest is posting or making a new thread they will be asked to type in the text displayed in the image provided right of the text box. This image is the same exact kind of image used for image verification in vb's registration(its the exact code so i take no rights to saying the code is mine hehe ). Anyways this is useful for forums that allow posting for guests such as for feedback etc. and not letting bots being able to and not having to approve every single post. I made this hack personally stop this ad bot who kept posting on my site

Credits:
-original concept ~ AN-net(Antonbomb22; Anthony Scudese)
-code ~ vB Team/Jelsoft

Requirements:
This does not require GD to be on via options or image verficiation to be on for registration. However, this does require GD library

Support Policy:
I have the right to deny support to anyone for any reason at any time.

Where to Get Support?:
-http://www.animationation.net
-AIM: Antonbomb22
-email: antonbomb22@animationation.net
-this thread

Demo:
-New Reply Demo
-New Thread Demo

File Edits(2):
-------------------------------------
Open: /forumroot/newthread.php
-------------------------------------
Find:
PHP Code:
$phrasegroups = array('threadmanage''posting' 
-------------------------------------
After add:
PHP Code:
'register' 
-------------------------------------
Find:
PHP Code:
    if (!($forumperms CANPOSTPOLL))
    {
        unset(
$_POST['postpoll']);
    } 
-------------------------------------
Underneath add:
PHP Code:
    if($bbuserinfo['userid']=="0")
    {
        
$imagestamp trim(str_replace(' '''$_POST['imagestamp']));
        
$ih $DB_site->query_first("SELECT imagestamp FROM " TABLE_PREFIX "regimage WHERE regimagehash = '" addslashes($_POST['imagehash']) . "'");
        if ((!
$imagestamp) OR (strtoupper($imagestamp) != $ih['imagestamp']))
        {
              
//eval(print_standard_error('error_register_imagecheck'));
              
eval('$errors[140] = "' fetch_phrase('register_imagecheck'PHRASETYPEID_ERROR) . '";');
              
$DB_site->query("DELETE FROM " TABLE_PREFIX "regimage WHERE regimagehash = '" addslashes($_POST['imagehash']) . "'");
              unset(
$imagestamp);
              unset(
$_POST['imagehash']);
              unset(
$_POST['imagestamp']);
        }
    } 
-------------------------------------
Find:
PHP Code:
    if (!isset($newpost['polloptions']))
    {
        
$polloptions 4;
    }
    else
    {
        
$polloptions intval($newpost['polloptions']);
    } 
-------------------------------------
Underneath add:
PHP Code:
    if($bbuserinfo['userid']=="0")
    {
        require_once(
'./includes/functions_user.php');
        
$string fetch_registration_string(6);
        
$imagehash md5(uniqid(rand(), 1));
        
$DB_site->query("INSERT INTO " TABLE_PREFIX "regimage (regimagehash, imagestamp, dateline) VALUES ('" addslashes($imagehash) . "', '" addslashes($string) . "', " TIMENOW ")");
        
$show['imageverf']= true;
        eval(
'$imageregbit = "' fetch_template('register_imagebit') . '";');
    }
    else
    {
        
$show['imageverf']= false;
    } 
-------------------------------------
Save and upload: /forumroot/newthread.php
-------------------------------------


-------------------------------------
Open: /forumroot/newreply.php
-------------------------------------
Find:
PHP Code:
$phrasegroups = array('threadmanage''posting' 
-------------------------------------
After add:
PHP Code:
'register' 
-------------------------------------
Find:
PHP Code:
if ($_POST['do'] == 'postreply')
{
    
globalize($_POST, array(
        
'posthash' => STR_NOHTML,
        
'poststarttime' => STR_NOHTML
    
)); 
-------------------------------------
Underneath add:
PHP Code:
    if($bbuserinfo['userid']=="0")
    {
        
$imagestamp trim(str_replace(' '''$_POST['imagestamp']));
        
$ih $DB_site->query_first("SELECT imagestamp FROM " TABLE_PREFIX "regimage WHERE regimagehash = '" addslashes($_POST['imagehash']) . "'");
        if ((!
$imagestamp) OR (strtoupper($imagestamp) != $ih['imagestamp']))
        {
              
//eval(print_standard_error('error_register_imagecheck'));
              
eval('$errors[140] = "' fetch_phrase('register_imagecheck'PHRASETYPEID_ERROR) . '";');
              
$DB_site->query("DELETE FROM " TABLE_PREFIX "regimage WHERE regimagehash = '" addslashes($_POST['imagehash']) . "'");
              unset(
$imagestamp);
              unset(
$_POST['imagehash']);
              unset(
$_POST['imagestamp']);
        }
    } 
-------------------------------------
Find:
PHP Code:
    if ($forumperms CANPOSTATTACHMENT AND $bbuserinfo['userid'])
    {
        if (!
$posthash OR !$poststarttime)
        {
            
$poststarttime TIMENOW;
            
$posthash md5($poststarttime $bbuserinfo['userid'] . $bbuserinfo['salt']);
        }
        else
        {
            
$currentattaches $DB_site->query("
                SELECT filename, filesize
                FROM " 
TABLE_PREFIX "attachment
                WHERE posthash = '" 
addslashes($newpost['posthash']) . "'
                    AND userid = 
$bbuserinfo[userid]
            "
);

            while (
$attach $DB_site->fetch_array($currentattaches))
            {
                
$attach['extension'] = strtolower(file_extension($attach['filename']));
                
$attach['filename'] = htmlspecialchars_uni($attach['filename']);
                
$attach['filesize'] = vb_number_format($attach['filesize'], 1true);
                
$show['attachmentlist'] = true;
                eval(
'$attachments .= "' fetch_template('newpost_attachmentbit') . '";');
            }
        }
        
$attachurl "t=$threadid";
        eval(
'$attachmentoption = "' fetch_template('newpost_attachment') . '";');
    }
    else
    {
        
$attachmentoption '';
    } 
-------------------------------------
Underneath add:
PHP Code:
    if($bbuserinfo['userid']=="0")
    {
        require_once(
'./includes/functions_user.php');
        
$string fetch_registration_string(6);
        
$imagehash md5(uniqid(rand(), 1));
        
$DB_site->query("INSERT INTO " TABLE_PREFIX "regimage (regimagehash, imagestamp, dateline) VALUES ('" addslashes($imagehash) . "', '" addslashes($string) . "', " TIMENOW ")");
        
$show['imageverf']= true;
        eval(
'$imageregbit = "' fetch_template('register_imagebit') . '";');
    }
    else
    {
        
$show['imageverf']= false;
    } 
-------------------------------------
Save and upload: /forumroot/newreply.php
-------------------------------------



Template Edits(2):
~~~~~~~~~~~~~~~~~~~~~~~~
Edit template: newreply
~~~~~~~~~~~~~~~~~~~~~~~~
Find:
HTML Code:
		<tr>
			<td><input type="text" class="bginput" name="title" value="$title" size="50" maxlength="85" tabindex="1" title="$vbphrase[optional]" /></td>
			<td>&nbsp;&nbsp;</td>
			<td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td>
		</tr>
~~~~~~~~~~~~~~~~~~~~~~~~
Underneath add:
HTML Code:
<if condition="$show[imageverf]">
<tr>
<td class="smallfont" colspan="2">Image Verification Text: <br /><input type="text" class="bginput" name="imagestamp" size="50" maxlength="6" value="$imagestamp" title="$vbphrase[enter_text_image_right]" /><input type="hidden" name="imagehash" value="$imagehash" /></td>
<td><img src="image.php?$session[sessionurl]type=regcheck&amp;imagehash=$imagehash" alt="$vbphrase[registration_image]" width="201" height="61" border="0" /></td>
</tr>
</if>
~~~~~~~~~~~~~~~~~~~~~~~~
Save: newreply
~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~
Edit Template: newthread
~~~~~~~~~~~~~~~~~~~~~~~~
Find:
HTML Code:
		<tr>
			<td><input type="text" class="bginput" name="subject" value="$subject" size="40" maxlength="85" tabindex="1" /></td>
			<td>&nbsp;&nbsp;</td>
			<td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td>		</tr>
~~~~~~~~~~~~~~~~~~~~~~~~
Underneath add:
HTML Code:
<if condition="$show[imageverf]">
<tr>
<td class="smallfont" colspan="2">Image Verification Text: <br /><input type="text" class="bginput" name="imagestamp" size="50" maxlength="6" value="$imagestamp" title="$vbphrase[enter_text_image_right]" /><input type="hidden" name="imagehash" value="$imagehash" /></td>
<td><img src="image.php?$session[sessionurl]type=regcheck&amp;imagehash=$imagehash" alt="$vbphrase[registration_image]" width="201" height="61" border="0" /></td>
</tr>
</if>
~~~~~~~~~~~~~~~~~~~~~~~~
Save: newthread
~~~~~~~~~~~~~~~~~~~~~~~~

I have also attached 3 screenshots

Please click install .

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-22-2004, 08:37 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you please put this in a txt file for easier download?
Reply With Quote
  #3  
Old 11-22-2004, 11:12 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sure ill do this when i get home from school today
Reply With Quote
  #4  
Old 11-25-2004, 12:42 PM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
sure ill do this when i get home from school today
You know...this axtually sounds very nice! It'll be a practical but annoying addition for guests, that doesn't take away their features, but still encourages registration!
Reply With Quote
  #5  
Old 03-05-2005, 10:15 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey can you have this set for ever odd amount? like every three times or something?

I also would LOVE to have this for private messages
Reply With Quote
  #6  
Old 03-17-2005, 09:39 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know it was old but any ideas?
Reply With Quote
  #7  
Old 09-23-2005, 01:53 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no ideas on every X post image v pops up? or doing this on private messages?

I have the first part but the second paste I am not sure where to put it (doing myself) for private messages.
Reply With Quote
  #8  
Old 09-15-2006, 03:31 PM
f1vlad's Avatar
f1vlad f1vlad is offline
 
Join Date: Apr 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, thanks! Works perfect for my project.
Reply With Quote
  #9  
Old 01-03-2007, 09:50 AM
interfx interfx is offline
 
Join Date: Dec 2001
Posts: 209
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone have this working for 3.6.X??? This is absolutely perfect for guest forums...
Reply With Quote
  #10  
Old 01-08-2007, 09:26 PM
firewoofer firewoofer is offline
 
Join Date: Mar 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by interfx View Post
Anyone have this working for 3.6.X??? This is absolutely perfect for guest forums...
Good question does this work in 3.5.7?
Reply With Quote
Reply


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


All times are GMT. The time now is 01:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04644 seconds
  • Memory Usage 2,376KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_html
  • (12)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete