vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   disallow guests from sending messages (https://vborg.vbsupport.ru/showthread.php?t=249283)

sulasno 08-25-2010 07:20 AM

disallow guests from sending messages
 
is it possible to disallow guests for using http://domain.com/forum/sendmessage.php

BirdOPrey5 08-25-2010 08:27 AM

You can open the "contact_us" template and put the form in a conditional...

Before the line:
Code:

<form action="sendmessage.php?do=docontactus" method="post">
Put:
Code:

<if condition="$show['member']">
and after the line
Code:

</form>
Add:
Code:

<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 08: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 08: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 09: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 [DATE]1282739084[/DATE] at [TIME]1282739084[/TIME] ---------------

I am reading http://au.php.net/manual/en/pcre.examples.php but I don't understand

BirdOPrey5 08-25-2010 06: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 02:13 AM

thanks

I get the idea now


All times are GMT. The time now is 12:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02566 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete