Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 07-11-2012, 03:54 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure I follow what you're doing there. You wouldn't want a link that unsubscribes someone by userid (and didn't require logging in) because it would be too easy for someone to unsubscribe everyone, for instance.

But anyway, we're talking about a link you click on from an email, so we probably wouldn't want to use javascript. And after more discussion in the thread we've decided that it's enough if it takes you to a page where you enter your email to unsubscribe. Apparently the big problem they had was making it so you have to log in to unsubscribe. I actually appreciate that because sometimes you just don't want to receive email from a site anymore and you don't want to have to try to remember how to log in.
Reply With Quote
  #22  
Old 07-11-2012, 04:21 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I've started to work on this, but I haven't gotten very far - I almost forgot to check this thread to see if you made any progress. Anyway, do you still need this? I only glanced at the dbtech mod, but it looks like it does a lot, so there may still be some use for a mod that simply makes it easy for members to unsubscribe by setting the options.
The mod won't work as far as my host is concerned because it doesn't handle the system emails which are the only emails I send out.

Quote:
Originally Posted by kh99
Do you happen to know if setting each of those user options to No and deleting all subscriptions covers everything? I was actually thinking of maintaining a list of addresses and checking it in the mail send function as a way of ensuring that no email was sent to someone who opted out (assuming they wanted to opt out of all emails from the site).
As far as I can tell those settings are all of the settings that would trigger an email. I suppose you could not turn off pms and turn off the emailonpm bitfield, but that bitfield is in the group name=regoptions (vs the group name=useroptions where all of the bitfields we talked about are grouped) which I haven't really fiddled around with yet.

Quote:
Originally Posted by kh99
Edit: you also mentioned moving the user to another group, do you still think that would be a useful option? I thought I'd just start with setting the admin email option to no, then go from there.
I think it is a viable option as it would be another layer of opting out in my opinion. I had created a user group back in Aug of last year that has all of the settings that would send emails turned off except for pms. I would move those users that sent me a reply to the birthday email asking to be un-subscribed, or if the emails were bounced. Since then I've installed https://vborg.vbsupport.ru/showthread.php?t=138884 to handle the bounced emals and am loving that mod (well until the host blocked all outgoing emails but that's not the mods fault )

I'm actually going to tweak that user group once we get this working to limit the pm inboxes and such to encourage people who do use the unsubscribe but want to use pms to "double opt in (opt in 1 by requesting a user group change and opt in 2 by having to select (or not) the options to get emails) to cover my butt in case they later complain.

--------------- Added [DATE]1342028394[/DATE] at [TIME]1342028394[/TIME] ---------------

Oh my sometimes I really wish I could afford to get new glasses There is a bitfield for emailonpm in the useroptions group. It's 4096.

I guess the choice depends (in my case for sure) on whether or not you include the changing of user groups. If you include the changing of user groups then I suggest turning off the emailonpm option vs turning off pms altogether.

If you don't include the changing of user groups then i would suggest turning off pms altogether.

Just my $.02 as this is your baby and I'm just along for the ride
Reply With Quote
  #23  
Old 07-11-2012, 04:40 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I'm not sure I follow what you're doing there. You wouldn't want a link that unsubscribes someone by userid (and didn't require logging in) because it would be too easy for someone to unsubscribe everyone, for instance.

But anyway, we're talking about a link you click on from an email, so we probably wouldn't want to use javascript. And after more discussion in the thread we've decided that it's enough if it takes you to a page where you enter your email to unsubscribe. Apparently the big problem they had was making it so you have to log in to unsubscribe. I actually appreciate that because sometimes you just don't want to receive email from a site anymore and you don't want to have to try to remember how to log in.
Ok well it could still be the email address that you tag on so when the user clicks the link in his email something like /misc.php?do=vistedurl&myemail@myaddress.com it will take you to the site, you wouldn't need to log inbut triggering the misc should cause the plugin to do the rest - well thats as simple as i saw it in my head
Reply With Quote
  #24  
Old 07-11-2012, 04:45 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just tested the emailonpm bitfield and it works like a charm

Code:
$db->query("UPDATE " . TABLE_PREFIX . "user SET options= options - 4096 WHERE (options & 4096) AND userid=" . $vbulletin->userinfo['userid']);
--------------- Added [DATE]1342028910[/DATE] at [TIME]1342028910[/TIME] ---------------

Quote:
Originally Posted by Simon Lloyd View Post
Ok well it could still be the email address that you tag on so when the user clicks the link in his email something like /misc.php?do=vistedurl&myemail@myaddress.com it will take you to the site, you wouldn't need to log inbut triggering the misc should cause the plugin to do the rest - well thats as simple as i saw it in my head
If that would indeed work as I can envision it in my head, the user wouldn't have to enter their email address as the plugin could populate the email address automatically. That way all they'd have to do is click the unsubscribe button.

However I am the noob here so who knows if I'm even close to being right

--------------- Added [DATE]1342029051[/DATE] at [TIME]1342029051[/TIME] ---------------

Kevin once the method is decided (either the current route you're pursuing or this new one suggested by Simon) and working I really think that adding these options in the ACP would be a great idea. Give the admins the choice on which of the options are affected by the unsubscribe button, which user group to move them to (if that's included), and give them the ability to customize the phrase without having to edit the xml (which is how I do it if the mod doesn't have ACP settings )
Reply With Quote
  #25  
Old 07-11-2012, 05:04 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
Ok well it could still be the email address that you tag on so when the user clicks the link in his email something like /misc.php?do=vistedurl&myemail@myaddress.com it will take you to the site, you wouldn't need to log inbut triggering the misc should cause the plugin to do the rest - well thats as simple as i saw it in my head
Yeah, that's pretty much what I thought (see post #2), and it's almost what we're doing except that I haven't quite worked out a way to get the email address into a customized email, so we're using a form for the user to enter their email instead. Most vb emails are sent using a phrase but the info like user name and email that are used to customize it are in different variables depending on where the phrase is used, and there's something like 70 email body phrases. Also (and as usual) it's limited by available hooks. I think what I might end up doing is releasing this with the form method, then later adding instructions for a code modification in case someone wants the automatic links.


Quote:
Originally Posted by John Lester View Post
Kevin once the method is decided (either the current route you're pursuing or this new one suggested by Simon) and working I really think that adding these options in the ACP would be a great idea. Give the admins the choice on which of the options are affected by the unsubscribe button, which user group to move them to (if that's included), and give them the ability to customize the phrase without having to edit the xml (which is how I do it if the mod doesn't have ACP settings )
That's what I'm doing right now. I think it's almost done but I haven't tested it yet. So, probably I'll attach another version here in an hour or two.
Reply With Quote
  #26  
Old 07-11-2012, 05:38 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Yeah, that's pretty much what I thought (see post #2), and it's almost what we're doing except that I haven't quite worked out a way to get the email address into a customized email, so we're using a form for the user to enter their email instead. Most vb emails are sent using a phrase but the info like user name and email that are used to customize it are in different variables depending on where the phrase is used, and there's something like 70 email body phrases. Also (and as usual) it's limited by available hooks. I think what I might end up doing is releasing this with the form method, then later adding instructions for a code modification in case someone wants the automatic links.




That's what I'm doing right now. I think it's almost done but I haven't tested it yet. So, probably I'll attach another version here in an hour or two.
Couldn't you add to current phrases $userinfo['email'], or in each of the cron files add your custom misc.php link? just thinking out loud brain farts usually but sometimes there's pearls!

EDIT: this is out of the cron for birthdays
PHP Code:
while ($userinfo $vbulletin->db->fetch_array($birthdays))
{
    
$username unhtmlspecialchars($userinfo['username']);
    eval(
fetch_email_phrases('birthday'$userinfo['languageid']));
    
vbmail($userinfo['email'], $subject$message);
    
$emails .= iif($emails', ');
    
$emails .= $userinfo['username'];

so you could even do something like
PHP Code:
 $message $message "<p><a href='www.mysite.com/misc.php?do=vistedurl&$userinfo['email']'>Unsubscribe</a>" 
Reply With Quote
  #27  
Old 07-11-2012, 06:07 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that would work for birthdays. That's what I was thinking a couple of days ago, and I told John if he just wanted something to deal with the birthday emails we could throw together something quick, but since then it's become my understanding that he'd really like to have a more general solution (but maybe I'm wrong about that).

Edit: oh, right - the other thing I was concerned about is that I think some email addresses might have characters that require URI encoding before adding the addreses to a url, so I didn't want to just add it directly. (In particular, I believe '&' is allowed in an email name).
Reply With Quote
  #28  
Old 07-11-2012, 06:44 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, here's the latest. There are some options in the adminCP, probably all the way at the end in the last section. The "require login" doesn't completely work yet so just leave it as "no" (and that makes it pretty much is like the "unacceptable" version anyway).
Attached Files
File Type: xml product-unsubscribe_link.xml (10.6 KB, 7 views)
Reply With Quote
  #29  
Old 07-11-2012, 08:01 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kevin it's not inserting the unsubscribe link on my live site (emails are temporarily restored for testing). I have it enabled and have the double opt out and require log in set to no.

I have "receive emails from admin" checked and am using instant notification for subscribed threads.
Reply With Quote
  #30  
Old 07-11-2012, 08:05 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Lester View Post
Kevin it's not inserting the unsubscribe link on my live site
OK, I think we may have our signals crossed - this one doesn't automatically insert anything, it's just a port of the one that you liked but wasn't acceptable because of the "double opt-out" - or was it the one that required you to log in? In any case, did the previous one insert a link? Maybe I messed something up without realizing it was there.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04396 seconds
  • Memory Usage 2,308KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete