![]() |
hi,
how do i get this, only a certain user group can use it, and others get a custom error message ( using a template ) ? there group i want to only access this is: usergroupid=2 could anyone help me please ? thanks for your time - great hack. |
Quote:
Open contact.php. Find: PHP Code:
PHP Code:
The make a new template called: error_nocontact Add this as contents: Code:
You have no permission to access the contact form. Done. :) |
Quote:
also is it possible to place the group in an array. Am a newbie at php, bit am trying different methods to get the same result at the moment. i have : PHP Code:
now i dont get any errors when running this, but the contact template is always displayed, even when am using a group id of 6 - so this dont work for some reason :( i can get it to work, using this : PHP Code:
|
That question belongs in the PHP forum. :) I have no idea why it wouldn't work.
|
it's mean again.
How do you get 'User Profile Fields' to be displayed. this is what i have : PHP Code:
PHP Code:
<tr> <td bgcolor="{firstaltcolor}" align="left" valign="top" nowrap><normalfont>Your m/ship N<font face="Times New Roman">?</font>:</normalfont></td> <td bgcolor="{firstaltcolor}" align="left" width="50%"> <input type="text" name="mem" size="4" class="bginput" tabindex="1" value="$defaultmembership"></td> <td bgcolor="{firstaltcolor}" align="left"><b><font color="#FF0000"> *</font></b></td> </tr> <tr> <td bgcolor="{secondaltcolor}" align="left" valign="top" nowrap><normalfont>Your expiry date:</normalfont></td> <td bgcolor="{secondaltcolor}" align="left" width="50%"> <input type="text" name="expiry" size="8" class="bginput" tabindex="1" value="$defaultexpiry"> example: 08/12/02</td> <td bgcolor="{secondaltcolor}" align="left"><b> <font color="#FF0000">*</font></b></td> </tr> but it dont work ? what else do i need to do ? |
You are obviously using vBPortal there. :)
Well, the $post variables only work in the showthread section since it pulls information from the functions.php - you would need to do a db query to pull the custom user profile fields in contact.php first for this to work. Like I said before, this has nothing to do with my contact form hack. Please ask this in the PHP forum, or in the vBPortal forums. :) I cannot support my hack to make it work with VBPortal - only with vB. |
Great hack - one question:
would it be possible to have the form check that the email address entered is at least in the right format? ie user@domain.com at present you can type in anything as the email address. I know it's not going to matter to those who actually want a reply, but it may put some of the idiots of sending crap :cheeky: cheers Graham |
Quote:
1) People who want to hide their emails will put in a fake one no matter what. 2) I rather they put in an obviously wrong one, so I don't waste time replying. 3) If they keep spamming you, you have their IP address and DNS server sent to you in their email with this hack, and you can still ban them. |
Great hack, about time I install this hack
|
Erwin & Unknown553
Thanx its working fine on vB 2.2.4 :) |
All times are GMT. The time now is 12:44 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|