Preset and lock 'account preferences' ?
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #8
[Update2] RE: Preset and lock 'account preferences' ?
(03-05-2012 05:34 AM)RateU Wrote:  Something like that.
For a disabled input fields, if you disable directly the original input, maybe the value of the input fields won't be saved (personally, I don't really like using readonly attribute for a checkboxes). That's why I use an hidden input fields, combined with a dummy input fields.
Something like this (member_register template):

HTML Code
<input type="checkbox" class="checkbox" name="allownoticesdummy" id="allownoticesdummy" value="1" checked="checked" disabled="disabled" />
<input type="hidden" name="allownotices" id="allownotices" value="1" />

Then, set the value in $user['options'] array in member.php (if you're not sure whether a user can change the value of the hidden input fields or not):

PHP Code:
149
"allownotices" => 1,


Thank you for the info !
Display is fine now (scrnshot attached), but when go to user profile, the resulting default options are not as set (scrnshot attached).

Modified code...

Code:
1
2
3
4
5
6
7
8
9
10
[$user['options'] = array(
		"allownotices" =>1,		
		"hideemail" =>1,		
		"subscriptionmethod" =>1,		
		"receivepms" =>1,		
		"pmnotice" =>1, 		
		"emailpmnotify" =>1,		
		"invisible" =>1,		
		"dstcorrection" =>1
	);

...but not sure what it is actually doing for setting options, but have removed the Edit Options button from the UCP (scrnshot attached), so assume that should eliminate the ability to change options ?

Any suggestions on where should look to set the actual options so they take effect at the profile display ?
Would like user to accept messages and have email notice, but not be able to be emailed directly by other users.

Ps:
Took out Email: field at member_profile, so not displayed, now how to get PM link to display ?
'member_profile' for PM looks like...

Code:
<tr>
<td class="{$bgcolors['pm']}"><strong>{$lang->pm}</strong></td>
<td class="{$bgcolors['pm']}"><a href="private.php?action=send&amp;uid={$memprofile['uid']}">{$lang->send_pm}</a></td>
</tr>

PM is showing up for one user, source view...

Code:
<tr>
<td class="trow2"><strong>Private Message:</strong></td>
<td class="trow2"><a href="private.php?action=send&amp;uid=3">Send akmyah a private message.</a></td>
</tr>

but not in another, source view...

Code:
<tr>
<td class="trow1"><strong>Private Message:</strong></td>
<td class="trow1"><a href="private.php?action=send&amp;uid=14"></a></td>
</tr>

...looks like some 'lang' missing somehow ?
Admin looks at account settings, shows one has boxes checked and other does not.
Isnt the (add "checked=\"checked\""; supposed to take care of that ?

Ps2:
Have tried three more test registrations, and all are per the pre-checked settings.
Now wondering how one got thru without.
Deleted and re-registered subject user and still not showing PM... wonder what it is about the one user that goes against the preset options ?
Guess just need to wait and see... few more tests ?



Attached File(s) Thumbnail(s)
           

Thanks again for your help !
(This post was last modified: 03-15-2012 09:27 AM by akm.)
03-15-2012 05:41 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread

 Standard Tools
Forum Jump: