Disable subscription: Solution is here

Solutions for other advanced phplisters

Disable subscription: Solution is here

Postby bangonthedrum » 2:41pm, Thu 05 Aug, 2004

yicktan found the solution. I am reposting it here for everyone's convenience:


-----------------
subscribelib2.php

Search for
values("%s",now(),"%s",0,%d,%d,"%s")'

Change to
values("%s",now(),"%s",1,%d,%d,"%s")'
-----------------

Now all you have to do is change the "confirm your subscription" messages a user recieves to reflect a confirmation. I have listed them all below:


PHP Admin

Subscribe Pages:
Thank you page
Message they receive when they confirm their subscription

Configure:
Subject of the message users receive when they subscribe
Message users receive when they subscribe
Subject of the message users receive after confirming their email address
Message users receive after confirming their email address

File
texts/english.inc
$strEmailConfirmation = 'Your email has been added to our system. You will be e-mailed shortly with a request to confirm your membership. Please make sure to click the link in that message to confirm your subscription.';
bangonthedrum
phpLister
 
Posts: 11
Joined: 4:41pm, Wed 04 Aug, 2004

Postby tcochran » 1:50pm, Tue 17 Aug, 2004

I use PHPlist for a conference registration form -- no confirmation is needed.

The simplest way to avoid the confirmation email cycle is to use phpMyAdmin to go into the database and modify the phplist_user_user table so that the "confirmed" field is set to a default of "1".

Every user is then automatically entered as "confirmed".
tcochran
phpLister
 
Posts: 6
Joined: 9:41am, Thu 25 Mar, 2004

Postby bangonthedrum » 12:28pm, Fri 20 Aug, 2004

ahh.
well, i'm a bit of a novice. what exactly is phpmyadmin?
bangonthedrum
phpLister
 
Posts: 11
Joined: 4:41pm, Wed 04 Aug, 2004

Postby tcochran » 12:55pm, Fri 20 Aug, 2004

Great tool for managing MySQL databases.

See www.phpmyadmin.net
tcochran
phpLister
 
Posts: 6
Joined: 9:41am, Thu 25 Mar, 2004

phpmyadmin

Postby bangonthedrum » 5:01pm, Thu 09 Sep, 2004

hi again,

just wanted to thank you again for that tip. tried it...worked so easy.
bangonthedrum
phpLister
 
Posts: 11
Joined: 4:41pm, Wed 04 Aug, 2004

Postby elton » 1:33am, Thu 21 Oct, 2004

I had to use both approaches in order to get rid of the confirmation emails; for some reason using one or the other still resulted in the delivery of confirmation emails...

So I changed the confirmation to thank you to remove the confirmation link and also modified the database entries and the subscribe2.php edit to make sure the users are added with a confirmed status of '1' (which is yes).
elton
phpList newbie
 
Posts: 1
Joined: 12:56am, Thu 21 Oct, 2004

Postby gazebo » 12:16pm, Mon 29 Nov, 2004

I was only successful after doing three things.

1. Change default setting in phpmyadmin (made no difference to confirmation setting in admin > users listing, and users still got confirmation request email). I updated the thank you page in the admin section and that came out fine.

2. Change setting in subscribelib2.php: admin > users setting shows user as confirmed but still receive confirmation request.

3. Updated admin > subscribe pages by copy/paste welcome email text and subject into confirmation request email text box and subject. Seems to be fine now.
gazebo
 

Postby saul11 » 4:40pm, Sat 05 Mar, 2005

Odd, I tested the DB mod method several times, but it doesn't work with me (phplist ver 2.8.12). The code mod does work.
Don't you guys have firstly changed the code and then changes the DB? Cause with only modding the DB I had no succes...

Thanks for the code though
saul11
PL Geek
 
Posts: 100
Joined: 2:27pm, Tue 26 Oct, 2004
Location: NL

Postby winged1 » 9:29am, Mon 07 Mar, 2005

you can work with your config.php setting $test=0; which permits the sending of the confirmation email to both user and admin.

If you go into subscribelib2.php and search for

if ($TEST){

you'll find the email send which follows. You could simply comment out the user part (you'll need to deconstruct the 'if' logic, or you could change it to a series of 'if's based on the value of $TEST for different combinations of who gets mail or not.

This won't add user confirmed, but it will stop the emails to them asking for confirmation.

Quite frankly, the nice thing about confirmation is it's characteristic of improving the quality of your user list. You should keep it in.
winged1
PL Geek
 
Posts: 110
Joined: 7:58pm, Mon 24 Jan, 2005

Disable confirmation email

Postby jiminy » 6:33pm, Fri 20 Jan, 2006

Hello,

Using version 2.10.2 the following is required:

Perform the steps listed in the first post of this thread (by user: bangonthedrum). Ignore the other users comments about the changing the database (it has no effect because the PHP code sets the user's confirmation status explicitly to 0 so setting the DB to default to 1 for this field doesn't do anything).

At this point the user will be confirmed upon subscribing but the confirmation email will still go out. To disable it find the line (also in subscribelib2.php):

if (sendMail($email, getConfig("subscribesubject:$id"), $subscribemessage,system_messageheaders($email),$envelope,1)) {

and replace it (by commenting it out) with:

// if (sendMail($email, getConfig("subscribesubject:$id"), $subscribemessage,system_messageheaders($email),$envelope,1)) {
if (true) {

This should not effect anything else but will stop the confirmation email from being sent.

If someone knows of a problem with doing this please point it out.

J.
jiminy
phpList newbie
 
Posts: 3
Joined: 5:29pm, Fri 20 Jan, 2006

This works...

Postby cUUsh » 4:36am, Wed 22 Feb, 2006

This last post worked perfectly...
but I'm still trying to get rid of the subscription page itself!

See this post:
http://www.phplist.com/forums/viewtopic.php?t=4655

I hope someone can explain that issue as clearly as this post has.

Anyway thanks for the help...
it's really too bad these basic features aren't built into the admin.
cUUsh
phpList newbie
 
Posts: 4
Joined: 3:42am, Wed 22 Feb, 2006

Postby ZhongFu » 7:29am, Thu 02 Mar, 2006

Thanks! This help!

Cheers,

ZhongFu
ZhongFu
PL Nut
 
Posts: 15
Joined: 12:32am, Thu 02 Mar, 2006
Location: Singapore

automatically confirmed

Postby horizonfgi » 2:07am, Sun 23 Apr, 2006

i have looked into the above fixes to make email addresses automatically confirmed and this is what worked for me.

then i went to the subscribe2.php file in the admin directory and changed
values("%s",now(),"%s",0,%d,%d,"%s")',
to
values("%s",now(),"%s",1,%d,%d,"%s")',

this will still send out the confirmation email which you can edit in the admin area for the subscribe page and make it just say welcome.

as far as eliminating the email altogether maybe the post above regarding this will work but i did not test it.

hope this helps someone.
horizonfgi
phpList newbie
 
Posts: 3
Joined: 1:45pm, Tue 21 Mar, 2006

Postby dialtosave » 2:44pm, Fri 28 Jul, 2006

Can anyone work out how to get this to work for just one list out of many?

So that for list A, users are automatically confirmed, but for list B, they are not.
dialtosave
phpList newbie
 
Posts: 3
Joined: 11:25pm, Tue 25 Jul, 2006

Postby austinc » 6:40pm, Tue 10 Oct, 2006

If the confirmation email is not sent out, does that mean the "welcome" email will not be sent as well. If not then how would I disable the "welcome" email?
austinc
phpLister
 
Posts: 5
Joined: 10:49pm, Sun 01 Oct, 2006

Next

Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

cron