The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Opt-Out
Can anyone tell me what the best way would be to set up a custom "opt-out" feature, say from a newsletter or mailing list?
I wanted to include a link in an email that would pass in maybe their email address and maybe userid, but I'm also thinking about security and using captcha. |
#2
|
||||
|
||||
Why not a User Profile Field in their User CP?
|
#3
|
||||
|
||||
I was thinking about that but I'm not sure how to check to it in the database.
|
#4
|
|||
|
|||
You can search in custom fields in the User manager in ACP. Even using the Generate Mailing list option has the same search features so you would just ensure to check the right boxes before clicking the generate list button.
|
#5
|
||||
|
||||
Isn't there already an option to not recieve emails from administrators?
|
#6
|
|||
|
|||
Yes there is but I think this only works for Admin emails such as registration signing etc. On our forum we have found it much more useful as per the OP to have a separate user field that is hidden from public view that Admin can use to generate mailing lists. Works a treat using the search method I outlined above
|
#7
|
||||
|
||||
Here's what I got so far:
I have a custom field set up in the usercp under General Settings as shown in the attached image. I was planning to have a field in my mod configuration screen where the field name of the custom user field would go so I know where to pull info from. Then on the sent email I was planning to include an unsubscribe url like: Code:
mydomain.com/reminderemails.php?do=unsubscribe&email=johnsmith@somedomain.com I saw in the profile.php script where the set_userfields method in the userdata object to set the custom fields like so: PHP Code:
PHP Code:
Sorry if I'm rambling... just trying to provide as much information as I can. Anyone got any thoughts on this? |
#8
|
|||
|
|||
Quote:
I think what you would require is to explicitly require the userid of the person in the email link, something along the lines of : Code:
http://mydomain.com/unsubscribe_email.php?u=1&e=email@somwhere.com&s=securitycheck Inside your unsubscribe_emai.php file after you've validated everything you would then have to execute a MySQL query to perform the action you require. Unfortunately I do not know the phrasing of this off the top of my head but based on something I was doing the other day it would look something like: PHP Code:
|
#9
|
||||
|
||||
Ok... I've taken a different approache to this and I'm so close I can taste it. lol However, I need some help from some experts on vb bitfields and how to update them both for the user and in the database. I've been studying the information on the following article:
Add Multiple Options Per User (via Bitfields) I've created an custom option bitfield in the vb_user table called 'inactiveuseroptions'. I have a bitfield_remindermail.xml file in the /includes/xml folder that looks like this: Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <bitfields product="dbmk_reminderemail"> <bitfielddefs> <group name="misc"> <group name="inactiveuseroptions"> <bitfield name="receivereminderemail">1</bitfield> </group> </group> </bitfielddefs> </bitfields> HTML Code:
<div class="blockrow"><label for="cb_reminders">Inactivity Emails:</label> <ul class="checkradio group rightcol"> <li><label for="cb_receivereminderemail"><input type="checkbox" name="inactiveuseroptions[receivereminderemail]" value="1" id="cb_receivereminderemail" tabindex="1" {vb:raw checked.receivereminderemail} />{vb:rawphrase receive_inactivity_reminder_email}</label><input type="hidden" name="set_options[receivereminderemail]" value="1" /></li> </ul> <p class="description">From time to time, the administrators and/or other members may want to send you email notifications or messages. If you do not want to receive email from certain people then you may disable the options here</p> </div> I've got 4 plugins as follows: Profile start: This renders the custom template using the "usercp_options_other" template hook PHP Code:
PHP Code:
PHP Code:
PHP Code:
Are there any knowledgable vb developers out there that can point me in the right direction? Thanks If you have questions or need more info. --------------- Added [DATE]1269219911[/DATE] at [TIME]1269219911[/TIME] --------------- Oh my!! I think I figured it out!! lol |
#10
|
|||
|
|||
For vB4.0: https://vborg.vbsupport.ru/showthread.php?t=246163
For vB3.8: https://vborg.vbsupport.ru/showthread.php?t=240512 These simply set the "receive admin emails" to no. Then when you send out your newsletter, you don't include users who have it set to no. Easy as pie. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|