| Show email; Users can hide or show their email | |
|---|---|
| Tweet Topic Started: Jul 22 2008, 07:06 PM (330 Views) | |
| JakkyD | Jul 22 2008, 07:06 PM Post #1 |
|
First I added "show_email" to my database via php my admin.
I then added this extra field and its functions. You can find how to add new fields here Add New Fields Remember to name it show_email or subshow_email. Add this to both useredit and register
You can obviously change it around i.e. value to <?echo $form->value("show_email"); ?> Then on userinfo add this:
Small but handy if your users want privacy. If it doesnt work for anyone, just say, and I will paste all what I did. P.s. You can just have this on useredit but I put it on register so that users can decide when they first sign up. Also if you really want, you can put on userinfo an " if admin" statement displaying their email incase its hidden. Edited by JakkyD, Jul 22 2008, 07:34 PM.
|
![]() |
|
| scottjcampbell | Jul 23 2008, 10:47 AM Post #2 |
![]()
|
Yes, i have made it so if the user is an Administrator, or if it is their own account, they are allowed to see it, like this:
|
![]() |
|
| feartec | Jul 23 2008, 11:31 AM Post #3 |
|
sorry, but i don't think that will work, you used twice the else statement. It will give the error: Unexpected t_else. What you can do is:
then you use the if, else if and else statement. That must work. Edited by feartec, Jul 23 2008, 03:23 PM.
|
![]() |
|
| scottjcampbell | Jul 23 2008, 09:50 PM Post #4 |
![]()
|
It worked for me? |
![]() |
|
| feartec | Jul 23 2008, 11:26 PM Post #5 |
|
ok, weird. :P, keep up the greet work. |
![]() |
|
| laurens | May 10 2009, 03:50 PM Post #6 |
|
I have a little problem.. In this line.. <tr><td><p>Show email?</p></td><td><select name="show_email"><option selected="selected" value="no">No</option><option value="yes">Yes</option></select></td><td></td></tr> how can I sent the yes or no value to the database, because it stayes with an empty value? |
![]() |
|
| Vimto | Oct 6 2010, 04:40 PM Post #7 |
|
Like he says in the original post, you have to follow the instructions for adding an extra field to a users profile. Here: http://s1.zetaboards.com/jpsystem/topic/154960/1/ |
![]() |
|
| quimkaos | Mar 24 2011, 05:45 PM Post #8 |
|
why are you guys using yes and no?? why not 1 or 0?? i'm using this but with at least true and false statements .... 0/1 true/false |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Other · Next Topic » |






12:49 AM Jul 11