Back to vBulletin 3.0 Add-Ons

New Thread/Post Image Verification for Guests
Mod Version: 1.00, by AN-net

This modification is in the archives.
vB Version: 3.0.3 Rating: (0 vote - 0 average) Installs: 10
Released: 22 Nov 2004 Last Update: Never Downloads: 0
Not Supported  

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: email
-this thread

Demo:
-http://www.animationation.net/community/newreply.php?do=newreply&noquote=1&p=6251
-http://www.animationation.net/community/newthread.php?do=newthread&f=53

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 .

Download

No files for download.

Supporters / CoAuthors

  • AN-net

Screenshots

     

Similar Mods

Miscellaneous Hacks Send To Friend - Image Verification For Guests vBulletin 3.6 Add-ons

vblts.ru supports vBulletin®, 2022-2024