Little anti spam extra field.

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2008, 05:42 AM
New Pligger
 
Join Date: Dec 2006
Posts: 21
ok .. Most of you know how to add a extra fields.. so i'm not going into that as your find a load of info on this forum about it.

Anyway i'd been meaning to force the input of my extra field e.g. a tickbox for T&C's ...

Its really simple to add and may kill a lot of spam..

at the bottom of submit.php before :
Code:
return $error;
}

REPLACE with:

Code:
if ($linkres->link_field3 == "") {
$main_smarty->assign('submit_error', 'notick');
$main_smarty->display($the_template . '/submit_errors.tpl'); 
	$error = true;}

return $error;
}

This use link_field3 btw

Then in submit_errors.tpl :

ADD:

Code:
{if $submit_error eq 'notick'}
	<p class="error">No tick</p>
	<br/>
	<form id="thisform">
		<input type="button" onclick="javascript:gPageIsOkToExit=true;window.history.go(-1);" value="Return back to add a tick" class="submit">
	</form>
{/if}

You can of course use lang to add a error but i'm too lazy..

Anyway you have loads of scope with this like simple maths question or even just a word.. Of course it you valiadate the var your own way which I do then everyones is differenet hence i'm not posting all the code..

Hope that might help..
Reply With Quote
  #2 (permalink)  
Old 02-10-2010, 12:11 PM
New Pligger
 
Join Date: Oct 2009
Posts: 1
at the bottom of submit.php before :
Code:
return $error;
}
Which function in submit.php do you mean?

Thanks
Reply With Quote
  #3 (permalink)  
Old 02-10-2010, 06:20 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Location: PA
Posts: 3,828
Quote:
Originally Posted by tostrinj View Post
at the bottom of submit.php before :
Code:
return $error;
}
Which function in submit.php do you mean?

Thanks
tostrinj

Here is a simple tip for you, most would find this to be common sense.
When you are responding to a forum post that is over 2 years old, and no one else has replied to it?.
Chances are you are already running a version that includes this sort of thing, or it doesn't work.


Get the full Pligg Module Pack today.

Anyone want the domain MyHubb.com ? Bid Now!




Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create tag cloud for a extra field? dasaxena Questions and Comments 2 07-28-2009 08:13 PM
Need to add 1 more extra field to the submit page - step2 aaronpais Questions and Comments 3 04-10-2008 02:37 PM
Query missing. Using extra field as Magpierss's source Andtony Questions and Comments 1 08-12-2007 06:08 PM
Extra field with a twitch darker Questions and Comments 10 06-01-2007 02:09 PM
Problem with extra field... Lunatic Questions and Comments 0 09-30-2006 05:09 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development