Now it is available on head the implementation of email privacy levels.And this is how it works:
acs-subsite with improvements:
acs-subsite has now a way to protect users emails by allowing users to choose the way
they want to show their e-mails, the field priv_email field at users table handles that:
4 = Normal email text link (mailto)
3 = As an image (Need ImageMagick software)
2 = Contact the user using a form.
1 = Not showing the email at all
If the user hasn't change his/her email-privacy-level (how the email is shown), then the site-wide-admin can choose how email will be shown by the EmailPrivacyLevelP parameter of acs-subsite.
Procedure:
One proc,"get_user_email", does all the work. So if want to show the user's email, you MUST use this function, that will return the proper html code.
For #3 level, when someone goes to shared/comunity-member's page for instance, the get_user_emai proc generates an image if is created (if
the user or the site-wide-admin especified and if the ImageMagick software is present) with the email of
the user on it, if the ImageMagick software is not present then the @ symbol is replaced with an image
to protect the email. If the email-image was created then it's stored on the content repository.
When a user edit his/her email then a new revision of the image is created as well.
A relation was created between the item_id and user_id to know what image is asociated to a user_id.
A content_folder and content_type were also created to store the users email-images.
For #2, when the user doesnt want to show their email, will be given link to a form were a message can be
sent to the user without showing his/her email.
The change of the level of privacy makes an update of the users table by changing
the priv_email field. All new users have for default level 5 in the priv_email field. When the priv_email equals
5 then the way that emails are shown is especified in the PrivateEmailLevelP parameter, otherwise the email will be
shown in the way that users especified (priv_email 4,priv_email 3,priv_email 2,priv_email 1)
The site-wide-admin can change the PrivateEmailLevelP in the acs-admin/users were a link to manage-email-privacy was created. And the user can change the way his/her email is shown in pvt/home.
We also change this pages that were showing the email of the user as well:
acs-subsite/www/members/index.tcl (/mebmers/)
acs-subsite/www/shared/community-meber.tcl (/shared/community-member)
dotlrn:
dotlrn/www/mebers.tcl (Mebers list)
dotlrn/www/spam-recipients (Spam all users)
dotlrn/www/members-chunk.adp
dotlrn-portlet/www/dotlrn-members-staff-portlet.adp
Thanks to Miguel that did the development of this feature. (it works for pg and oracle =) )