View Full Version : disallow guests from sending messages
sulasno
08-25-2010, 08:20 AM
is it possible to disallow guests for using http://domain.com/forum/sendmessage.php
BirdOPrey5
08-25-2010, 09:27 AM
You can open the "contact_us" template and put the form in a conditional...
Before the line:
<form action="sendmessage.php?do=docontactus" method="post">
Put:
<if condition="$show['member']">
and after the line
</form>
Add:
<else />
<div align="center">You must be logged in to contact us.</div>
</if>
That should do it...
BUT...
This is a really bad idea, you need some way for people who can't login to contact you- what if they have login problems, can't register for some reason, or someone not a member has important info you need to know... That is the purpose of this page. If you limit it to users at the absolute minimum you should include an e-mail address as part of the "You must be logged in to contact us" message above.
sulasno
08-25-2010, 09:32 AM
thanks
but I am getting being spam lol
is it possible to add a question before the sender can hit "Send" ?
BirdOPrey5
08-25-2010, 09:38 AM
if you go to admin cp -> vbulletin options -> Human Verification Settings there's a checkbox to use human verification on the contact us form... You can then setup random questions and answers so people have to answer a simple question correctly before the form will send.
Make some easy questions like, name ONE color of the American Flag or How many toes do most people have on one foot?
sulasno
08-25-2010, 10:40 AM
thanks for the wonderful advice
just one final question;
how do I set the strings to the answers?
for example, if the answer required is "Yes" or "yes" ;
if the answer is 2010
--------------- Added 1282739084 at 1282739084 ---------------
I am reading http://au.php.net/manual/en/pcre.examples.php but I don't understand
BirdOPrey5
08-25-2010, 07:46 PM
I don't use a regular expression to verify answers because like most people I don't understand them. I simply add an answer for every possible combo someone is likely to use...
For example to answer the qestion "How many fingers do most people have?" I have the following allowed answers:
10
ten
Ten
TEN
X (for the Romans ;) )
You can add as many answers as you want, if the user enters any of them they will pass the test.
sulasno
08-26-2010, 03:13 AM
thanks
I get the idea now
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.