Back to vBulletin 3.5 Template Modifications

Make 'Contact Us' Name & E-mail fields uneditable for log'd in members
Mod Version: 1.01, by timetunnel

This modification is in the archives.
vB Version: 3.5.0 Rating: (1 vote - 5.00 average) Installs: 20
Released: 28 Oct 2005 Last Update: 16 Nov 2005 Downloads: 18
Not Supported Template Edits  

Hello.

For those of you who have public forums with members who may become future-banned members, because they have too much time on their hands, this is one area of the forum's E-mail system they won't be able to play with.

What I mean is, currently, the 'Contact Us' form's member's 'username' and 'E-mail' fields can be overwritten such that the admin can receive E-mail with the incorrect 'reply to' info if someone monkey's with the username and/or put's someone else's E-mail address in the field. This can cause some unknowing person to receive unwanted E-mail from the admin.

This 'playfulness' is expected from random 'guests'. Therefore, in order to restrict this behavior to 'guests' only, here is the code to make these fields 'uneditable' for logged-in members, since their profile values are automatically filled-in by the system. At least, they won't be able to 'play' here...

Locate the 'name' section of code. Modify with this:

PHP Code:
<!-- begin revision -->
<if 
condition="$show['member']">
                        <
input type="text" class="bginput" name="name" value="$namesize="50" readonly="readonly" /> &nbsp;(uneditable)
<else />
                        <
input type="text" class="bginput" name="name" value="$namesize="50" />
</if>
<!-- 
end revision --> 
Next, locate the 'email' section of code. Modify with this:

PHP Code:
<!-- begin revision -->
<if 
condition="$show['member']">
                        <
input type="text" class="bginput" name="email" value="$emailsize="50" dir="ltr" readonly="readonly" /> &nbsp;(uneditable)
<else />
                        <
input type="text" class="bginput" name="email" value="$emailsize="50" dir="ltr" />
</if>
<!-- 
end revision --> 
NOTE: the difference in the 2 '<input...> statements is the 'readonly' attribute and a field message that lets members know those 2 fields are 'uneditable'.

Hope this helps.

EDIT: Make change to 'contactus' template

EDIT (11/15/05): CHANGED from 'readonly' to readonly="readonly" to make compliant although the original version works. The text file download was also updated.

Download

This modification is archived and cannot be downloaded.

Similar Mods

Make 'Referrer' field in registration UNeditable if from 'referrerid' in URL vBulletin 3.5 Template Modifications

vblts.ru supports vBulletin®, 2022-2024