Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-08-2009, 02:11 PM
Nintendo-Daily's Avatar
Nintendo-Daily Nintendo-Daily is offline
 
Join Date: Nov 2008
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Registration Form

How can I prevent (gray out) members from disabling the "Receive Email from Administrators" field?
Attached Images
File Type: png reg.png (41.5 KB, 0 views)
Reply With Quote
  #2  
Old 04-09-2009, 06:44 PM
Nintendo-Daily's Avatar
Nintendo-Daily Nintendo-Daily is offline
 
Join Date: Nov 2008
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump...

Anyone know how to do this? It should be pretty easy but I'm not exactly sure.
Reply With Quote
  #3  
Old 04-09-2009, 07:45 PM
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Location: .:: Ireland ::.
Posts: 1,306
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not tested but try this.

FIND in register template:

Code:
	<tr>
					<td>
						$vbphrase[administrators_may_send_email]
					</td>
				</tr>
				<tr>
					<td><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] />$vbphrase[receive_email_from_bulletin_board_staff]</label></td>
				</tr>
REPLACE with:

Code:
<label for="cb_adminemail"><input type="hidden" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] /></label>
This should hide the field from your registration form so that it is always checked.
Reply With Quote
  #4  
Old 04-09-2009, 07:51 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that wouldn't be enought
you code cheat it, so you'll have to create a plugin and to check it on the php side also!
Reply With Quote
  #5  
Old 04-09-2009, 08:00 PM
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Location: .:: Ireland ::.
Posts: 1,306
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want the checkbox to stay there but not be checkable you can just use
Code:
	<tr>
					<td>
						$vbphrase[administrators_may_send_email]
					</td>
				</tr>
				<tr>
					<td><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] CHECKED disabled onFocus="this.blur() />$vbphrase[receive_email_from_bulletin_board_staff]</label></td>
				</tr>
in place of the above REPLACE codebox.

Again this is untested. I also may be completely wrong about what your trying to do If thats the case then I apologise
Reply With Quote
  #6  
Old 04-10-2009, 11:43 AM
Nintendo-Daily's Avatar
Nintendo-Daily Nintendo-Daily is offline
 
Join Date: Nov 2008
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EnIgMa1234 View Post
If you want the checkbox to stay there but not be checkable you can just use
Code:
	<tr>
					<td>
						$vbphrase[administrators_may_send_email]
					</td>
				</tr>
				<tr>
					<td><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] CHECKED disabled onFocus="this.blur() />$vbphrase[receive_email_from_bulletin_board_staff]</label></td>
				</tr>
in place of the above REPLACE codebox.

Again this is untested. I also may be completely wrong about what your trying to do If thats the case then I apologise
OK, I have tried this and it produced the following:



It looks like this might work but the words "Receive Email from Administrators" are not next to the grayed-out field any more.

Any other ideas? Seems like we are almost there but not quite. I just thought of something...can't this be overrideen somehow anyway? For example, if the registering member were to uncheck "Receive Email from Administrators" can't this be overridden by me somehow anyway?
Reply With Quote
  #7  
Old 04-10-2009, 11:44 AM
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Location: .:: Ireland ::.
Posts: 1,306
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nintendo-Daily View Post
OK, I have tried this and it produced the following:

Told you it was untested :P

Let me test it on my board.
Reply With Quote
  #8  
Old 04-10-2009, 11:53 AM
Nintendo-Daily's Avatar
Nintendo-Daily Nintendo-Daily is offline
 
Join Date: Nov 2008
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL...wow...that was a quick response. A one minute difference.
Reply With Quote
  #9  
Old 04-10-2009, 01:16 PM
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Location: .:: Ireland ::.
Posts: 1,306
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fix for the above:

Code:
	<tr>
					<td>
						$vbphrase[administrators_may_send_email]
					</td>
				</tr>
				<tr>
					<td><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checkedoff[adminemail] CHECKED disabled onFocus="this.blur()" />$vbphrase[receive_email_from_bulletin_board_staff]</label></td>
				</tr>
Was missing a " which is what caused the error.
Reply With Quote
  #10  
Old 04-10-2009, 01:18 PM
Nintendo-Daily's Avatar
Nintendo-Daily Nintendo-Daily is offline
 
Join Date: Nov 2008
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WOW!! This is exactly what I wanted EnIgMa1234 Thanks so much for working on this. I have tested this myself anyway to see if it works and it does. So, if anyone else is interested in using this I can tell you right now that it works

Thanks SO MUCH again EnIgMa1234.
Reply With Quote
Reply


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 05:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06406 seconds
  • Memory Usage 2,281KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete