Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications

Reply
 
Thread Tools
Make 'Contact Us' Name & E-mail fields uneditable for log'd in members Details »»
Make 'Contact Us' Name & E-mail fields uneditable for log'd in members
Version: 1.01, by timetunnel timetunnel is offline
Developer Last Online: Mar 2007 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-27-2005 Last Update: 11-15-2005 Installs: 20
Template Edits
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-28-2005, 09:08 PM
Moparx Moparx is offline
 
Join Date: Jul 2004
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good idea
Reply With Quote
  #3  
Old 10-28-2005, 09:54 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Text file, please?
Reply With Quote
  #4  
Old 10-28-2005, 11:47 PM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo,

Not sure if this is the answer you're looking for, but I had edited my initial post to show the change is to the 'contactus' template.
Reply With Quote
  #5  
Old 10-29-2005, 01:50 AM
Moparx Moparx is offline
 
Join Date: Jul 2004
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

boofo wants you to add a text file attachment containing the template mods instructions.
its helpful for many of us so we can store it in our hack/modification folders for future use
Reply With Quote
  #6  
Old 10-29-2005, 02:37 AM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If it's a template mod shoudn't it be on template modifications?

Great idea though, I wonder why Jelsoft left it editable...
Reply With Quote
  #7  
Old 10-29-2005, 03:21 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Moparx
boofo wants you to add a text file attachment containing the template mods instructions.
its helpful for many of us so we can store it in our hack/modification folders for future use
Exactly!
Reply With Quote
  #8  
Old 10-29-2005, 11:22 AM
Yorixz Yorixz is offline
 
Join Date: Jun 2005
Location: Netherlands
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice idea, should be standard in vB imho.
Reply With Quote
  #9  
Old 10-29-2005, 05:01 PM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ooh...I see...

is there a particular format for the text file or should I just copy what's above in my initial post?

As far as where to put it, I wasn't sure since I've seen a template mod(s) in this category in the past. Earlier in the week I had mod with a change to 'modifyprofile' template (re: how to hide the member's URL) in code mods and it was moved to tutorial. I thought maybe if it was to be moved, it would have gone into 'template mods' forum. Still feeling my way around to know where to put things. For the future, I'll put template mods in that category.
Reply With Quote
  #10  
Old 10-29-2005, 11:32 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by timetunnel
ooh...I see...

is there a particular format for the text file or should I just copy what's above in my initial post?

As far as where to put it, I wasn't sure since I've seen a template mod(s) in this category in the past. Earlier in the week I had mod with a change to 'modifyprofile' template (re: how to hide the member's URL) in code mods and it was moved to tutorial. I thought maybe if it was to be moved, it would have gone into 'template mods' forum. Still feeling my way around to know where to put things. For the future, I'll put template mods in that category.
Just a text file with the instructions and code in it is all.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:25 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
  • Page Generation 0.04378 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete