Yankidank, A way to do this, not quite a check box, would be as follows:
1.For the code above, use this code instead If you are looking to change the send announcement module ONLY then skip this step:
Code:
if(isset($_POST['process'])){
if ($_POST['process']=='newcomment') {
$authormail = $db->get_var("SELECT public_email FROM users WHERE `user_id` = '$link->author';");
mail($authormail,"there is a new comment in your story","hello, bodytext!");
insert_comment();
}
}
2.Then you need to go to "templates/yget/user_center.tpl" and remove this code from around line 289:
Code:
{if $user_publicemail ne ""}
<tr>
<td><strong>{#PLIGG_Visual_User_Profile_PublicEmail#}:</strong></td>
<td>{$user_publicemail}</td>
</tr>
{/if}
This will remove the users public email from the users profile so others cannot see it.
3.Next go to Pligg Beta 9 Home » Admin » Modify Language and filter for "public email" Change this to something like "Email Communication"
4.The last step is Optional, but I recommend you add something here. I have shown below what I added due to the new legal requirements but you could change this to anything you want. Go to "templates/yget/profile_center.tpl" and do the following:
between:
Code:
<input type="submit" name="save_profile" value="{#PLIGG_Visual_Profile_Save#}" class="log2" tabindex="16"></p>
add:
Code:
<fieldset><legend>email communication:</legend>
<center>As you may know, from September 5th 2007 the Unsolicited Electronic
Messages Act 2007 will regulate the kinds of messages you can be sent by
email or text.
To allow Linka New Zealand Limited to send you occasional emails be sure to fill out the "Email Communication" field on your profile page.
We don't email you all that often but every now and then we may have something important to let you know about.
By filling out this field you are consenting to Linka New Zealand Limited communicating with you by email. If you do NOT want to receive communications from us please leave this field blank. You can stop receiving emails from Linka New Zealand Limited at anytime by removing your email address from the "Email Communication" field.
</center>
</fieldset>
<br/>
<br/>
this should then look like this
Code:
<br />
<fieldset><legend>email communication:</legend>
<center>As you may know, from September 5th this year the Unsolicited Electronic
Messages Act 2007 will regulate the kinds of messages you can be sent by
email or text.
To allow Linka New Zealand Limited to send you occasional emails be sure to fill out the "Email Communication" field on your profile page.
We don't email you all that often but every now and then we may have something important to let you know about.
By filling out this field you are consenting to Linka New Zealand Limited communicating with you by email. If you do NOT want to receive communications from us please leave this field blank. You can stop receiving emails from Linka New Zealand Limited at anytime by removing your email address from the "Email Communication" field.
</center>
</fieldset>
<br/>
<br/>
<input type="submit" name="save_profile" value="{#PLIGG_Visual_Profile_Save#}" class="log2" tabindex="16"></p>
I changed the way the site announcement works so that people could either subscribe to site wide emails or not. It is up to them. It is not auto switched on which is a pain, but.....it does mean that they can opt in if they want to. then when you send an announcement only those people will receive it. I did this due to a law change in NZ which requires the user to agree to receiving emails. It is the only way I could implement it.
To do this once you have completed above go to
"/modules/send_announcement/templates/sendannouncement.tpl"
search for "user_email" and change to "public_email"