I want to add an option for registered users to choose from:
1. Keep email address private (*this option will still show the email address on their profile page for the actual user and site administrator) 2. Allow only registered users to view email address 3. Allow guests and registered users to view email address
Ideally, this option will be added to their registration and they can update it if they wish through their 'Edit Profile' option. Depending upon their selection, their email address would appear on their profile page (and possibly their articles and/or comments) along with any other method of contact they have chosen. I realize that they can select to receive emails and private messages through the site, however, in my specific application there will be many who will prefer to provide their email address, without using it as their username.
*The reason behind the user seeing their own email address on their own profile page is so they will be more likely to update it if it has changed. Without seeing it, they are more likely to forget that it has changed and not update it.
Now, I have added plenty of text fields so I know how to do that. My question is, which field would I place a 'Show Email Address' option in for it to behave as I am wanting? Member field, Settings field, Usergroup field, or Switches. And for the mysql field type, would it be integer?
You want a member text field. The html for register/edit profile could be this: <select name="emailprivacy"><option value="private">private</option><option value="registered">only registered users</option><option value="public">public</option></select>
And then you'd use condtionals like this for the email display places: <IF {MEMBEREMAILPRIVACY} is public>{MEMBEREMAIL}</IF> <IF {MEMBEREMAILPRIVACY} is registered and {THISMEMBERISREGISTERED}>{MEMBEREMAIL}</IF>
I suggest you use {MEMBEREMAILDISGUISE} instead of {MEMBEREMAIL} so that they get spammed less when set as public.
<IF {MEMBERMAILPRIVACY} is all><span class="labels">E-Mail:</span> <a href="mailto:{MEMBEREMAIL}">{MEMBEREMAIL}</a></IF> <IF {MEMBERMAILPRIVACY} is registered and {THISMEMBERISREGISTERED}><span class="labels">E-Mail:</span> <a href="mailto:{MEMBEREMAIL}">{MEMBEREMAIL}</a></IF> <IF {MEMBERMAILPRIVACY} is none and {THISMEMBERISADMIN}><span class="labels">E-Mail:</span> <a href="mailto:{MEMBEREMAIL}">{MEMBEREMAIL}</a></IF>
This code above does not let the actual member see their own email address in their profile and I wasn't able to figure out how to do it without php errors appearing on the page. However, after some thought, I realized that they were more likely to view their 'Options' page than their 'Profile' so I added in the home.tpl:
<p><b>Email address on file: {MEMBEREMAIL}</b></p>
Also, something you may consider adding to the homesubwrapper.tpl is:
I added it right above the 'Edit Profile' link. It seemed like a long run around to view your own profile since you had to click through it either from the member list or your own post.
Erm, why would someone want to view their own email? Surely they know it. If they've forgotten what their own email is, they can find it by editing their profile. If you show it on the view profile page even when another visitor won't see it, you'll just confuse people into thinking you've exposed it to spam when you haven't.
The point is not to necessarily show them their email address, but to remind them to update it if it has changed. Out of the 758 members I emailed last night, 146 bounced. Every year I send an email to everyone associated with the site to see who no longer has a valid email listed with us, so that means that within the past year 146 people have changed their email address and failed to notify me. Several weeks ago I sent an email to the main mail list reminding them to check the email address on the site and let me know if it has changed and about two dozen who contacted me to update their email address.
Now, to some groups this would not be important, however in the family history research field it is. These are email addresses for researchers who have asked to have their contact information placed on our site so others can contact them about a specific surname or family group in our area. Therefore, by letting them see easily their email address, it is a gentle reminder to keep it updated.
I did take it off of the 'View Profile' page for those that chose to keep it private and now it is on the 'Member Home' page. Now, for those that chose to make it public, that is because in my little world, especially with the older generation, they don't grasp the concept of email forms to contact other members and if it is not given to them as an option, they will just plaster their email address in every comment box they can find. Believe me, I have been the volunteer for this area since 1999 and while some in the group have come a long way into understanding how to use the web, others just don't quite get it. And while they will eventually come around, I do my best to keep them happy in the meantime. After all, I count on these very people to continue to submit free data and they won't do that if they are not happy.
0/5
1
2
3
4
5
Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.
Comments on Adding Custom Field
Member
Usergroup: Customer
Joined: Oct 01, 2004
Total Topics: 14
Total Comments: 46
I want to add an option for registered users to choose from:
1. Keep email address private (*this option will still show the email address on their profile page for the actual user and site administrator)
2. Allow only registered users to view email address
3. Allow guests and registered users to view email address
Ideally, this option will be added to their registration and they can update it if they wish through their 'Edit Profile' option. Depending upon their selection, their email address would appear on their profile page (and possibly their articles and/or comments) along with any other method of contact they have chosen. I realize that they can select to receive emails and private messages through the site, however, in my specific application there will be many who will prefer to provide their email address, without using it as their username.
*The reason behind the user seeing their own email address on their own profile page is so they will be more likely to update it if it has changed. Without seeing it, they are more likely to forget that it has changed and not update it.
Now, I have added plenty of text fields so I know how to do that. My question is, which field would I place a 'Show Email Address' option in for it to behave as I am wanting? Member field, Settings field, Usergroup field, or Switches. And for the mysql field type, would it be integer?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You want a member text field. The html for register/edit profile could be this: <select name="emailprivacy"><option value="private">private</option><option value="registered">only registered users</option><option value="public">public</option></select>
And then you'd use condtionals like this for the email display places:
<IF {MEMBEREMAILPRIVACY} is public>{MEMBEREMAIL}</IF>
<IF {MEMBEREMAILPRIVACY} is registered and {THISMEMBERISREGISTERED}>{MEMBEREMAIL}</IF>
I suggest you use {MEMBEREMAILDISGUISE} instead of {MEMBEREMAIL} so that they get spammed less when set as public.
Member
Usergroup: Customer
Joined: Oct 01, 2004
Total Topics: 14
Total Comments: 46
I went with:
<IF {MEMBERMAILPRIVACY} is all><span class="labels">E-Mail:</span> <a href="mailto:{MEMBEREMAIL}">{MEMBEREMAIL}</a></IF>
<IF {MEMBERMAILPRIVACY} is registered and {THISMEMBERISREGISTERED}><span class="labels">E-Mail:</span> <a href="mailto:{MEMBEREMAIL}">{MEMBEREMAIL}</a></IF>
<IF {MEMBERMAILPRIVACY} is none and {THISMEMBERISADMIN}><span class="labels">E-Mail:</span> <a href="mailto:{MEMBEREMAIL}">{MEMBEREMAIL}</a></IF>
This code above does not let the actual member see their own email address in their profile and I wasn't able to figure out how to do it without php errors appearing on the page. However, after some thought, I realized that they were more likely to view their 'Options' page than their 'Profile' so I added in the home.tpl:
<p><b>Email address on file: {MEMBEREMAIL}</b></p>
Also, something you may consider adding to the homesubwrapper.tpl is:
<a href="memberlist.php?action=profile&id={MEMBERID}" class="homenav">View Profile</a>
I added it right above the 'Edit Profile' link. It seemed like a long run around to view your own profile since you had to click through it either from the member list or your own post.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Erm, why would someone want to view their own email? Surely they know it. If they've forgotten what their own email is, they can find it by editing their profile. If you show it on the view profile page even when another visitor won't see it, you'll just confuse people into thinking you've exposed it to spam when you haven't.
Member
Usergroup: Customer
Joined: Oct 01, 2004
Total Topics: 14
Total Comments: 46
The point is not to necessarily show them their email address, but to remind them to update it if it has changed. Out of the 758 members I emailed last night, 146 bounced. Every year I send an email to everyone associated with the site to see who no longer has a valid email listed with us, so that means that within the past year 146 people have changed their email address and failed to notify me. Several weeks ago I sent an email to the main mail list reminding them to check the email address on the site and let me know if it has changed and about two dozen who contacted me to update their email address.
Now, to some groups this would not be important, however in the family history research field it is. These are email addresses for researchers who have asked to have their contact information placed on our site so others can contact them about a specific surname or family group in our area. Therefore, by letting them see easily their email address, it is a gentle reminder to keep it updated.
I did take it off of the 'View Profile' page for those that chose to keep it private and now it is on the 'Member Home' page. Now, for those that chose to make it public, that is because in my little world, especially with the older generation, they don't grasp the concept of email forms to contact other members and if it is not given to them as an option, they will just plaster their email address in every comment box they can find. Believe me, I have been the volunteer for this area since 1999 and while some in the group have come a long way into understanding how to use the web, others just don't quite get it. And while they will eventually come around, I do my best to keep them happy in the meantime. After all, I count on these very people to continue to submit free data and they won't do that if they are not happy.