Joomla.it Forum
Componenti per Joomla! => Gestione utenti e community => : erpicio 06 Dec 2010, 02:24:01
-
Salve a tutti.
E' possibile fare in modo che gli utenti quando si registrano decidano loro se mostrare l'email nel profilo, o non mostrarla, mostrando invece il link al form di creazione email?
grazie mille :)
-
senza offesa al Forum di Joomla.it prova a vedere sul forum di CB
-
Ho risolto grazie a quelli di joomlapolis.
La chiave รจ l'utilizzo dei delimiter field.
Posto il riassunto (in inglese, non mi va di ritradurre tutto)
1) I created 3 fields:
- A primaryemailaddress field named email (where users insert their email; this field is not shown on their profile, but only in the user registration form)
- A radio field named cb_showemail (where the users decide whether to show their email with Yes or No; this field is not shown on their profile, but only in the user registration form)
- A delimiter field named as you like (this is the field that must be shown on users' profile)
2) In the wysiwyg text area inside the delimiter settings, i activated the code visualization and wrote the following code:
[cb:if cb_showemail="Yes"]<a href="mailto:[email]">[email]</a>[/cb:if]
[cb:if cb_showemail="No"]<a href="index.php?option=com_comprofiler&task=emailUser&uid=[user_id]">Send E-mail</a>[/cb:if]
3) In CB General Config -> General tab, from the Email management dropdown, you have to set "Show only email" in order to make all the stuff working.
All the above will show the email address+mailto link for the users that clicked on Yes from the radio button in registration form, and will show a "Send E-mail" link to CB e-mail composition form for those who selected No from the radio button.
-
Ciao Erpicio, senza che andavi a modificare il codice come giustamente ti hanno segnalato dal sito ufficiale di joomlapolis potresti utilizzare il plugin privacy che permette la visualizzazione dei vari field a discezione dell'utente stesso :)