The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Gazette (http://www.thevbgeek.com/forumdisplay.php?f=56)
-   -   imported another db, want to add those users to subscribers (http://www.thevbgeek.com/showthread.php?t=5336)

Loco 10-04-2009 03:20 PM

imported another db, want to add those users to subscribers
 
Hello,

I've imported a couple databases with my forum and I want all those users to be subscribers to the newsletter.
I went to

admincp > gaz > tools >subscription tools > Subscribe all users > yes

but it didn't add the 4,000 users I imported (which are now in the registered user group)
do I need to upgrade GAZ or something to get this working, or maybe update another setting?

I have version 2.0.2

Thanks for the help
-Brandon

Loco 10-05-2009 10:13 PM

anyone?
is there a support ticket system here or anything?

thx

Morgan 10-07-2009 02:52 PM

Nope, no ticket system. The vB import is for vB, not for add-ons, so importing isn't going to change the GAZ database tables. You could uninstall and then reinstall GAZ but that means you would need to reset all your newsletters and issues, or you could code something to add the new users to the gaz_subscriptions database table where a value of one in the newsletterX columns means that the userid in the same row is subscribed to newsletter X.

Loco 10-07-2009 11:23 PM

Hello thanks for the answer

I know the vb importer isn't going to work with gaz, what does this setting do?
admincp > gaz > tools >subscription tools > Subscribe all users > yes
the way I read it is it will subscribe all users

I had thought about uninstalling gaz and reinstalling, this may be the way I go

I'm not much of a coder, so I wouldn't know the first place to look to make my own extension.

Loco 10-09-2009 02:09 AM

hi again

how about a sql query that I could ran in the vb maintenance area? :o

Morgan 10-09-2009 02:50 PM

Untested but follow these steps in order:
  1. TRUNCATE TABLE TABLE_PREFIXgaz_subscriptions;
  2. INSERT INTO TABLE_PREFIXgaz_subscriptions (userid, emailformat) SELECT userid, 1 FROM TABLE_PREFIXuser;
  3. ACP -> GAZ -> Tools -> Newsletter subscription tools -> Subscribe all users -> Yes for every newsletter that is listed
This should add and subscribe everyone. You should also temporarily turn off new registrations while doing this so no one slips through while you are running these queries.

Riverwire 10-21-2009 01:55 PM

Loco did you ever figure this out , ive got the same problem and that SQL Query didnt seem to work

Loco 10-23-2009 12:00 AM

I've actually had the flu the last week, so I haven't had time to mess with it.
Could we get a modified version of the query and have all users who have "yes" to receive admin emails, set to subscribe to the newsletter? That would fit my needs better

thanks.

Morgan 10-23-2009 04:56 PM

Untested but follow these steps in order:
  1. TRUNCATE TABLE TABLE_PREFIXgaz_subscriptions;
  2. INSERT INTO TABLE_PREFIXgaz_subscriptions (userid, emailformat, newsletter1) SELECT userid, 1, 1 FROM TABLE_PREFIXuser WHERE options & 16;
  3. INSERT INTO TABLE_PREFIXgaz_subscriptions (userid, emailformat, newsletter1) SELECT userid, 1, 0 FROM TABLE_PREFIXuser WHERE NOT options & 16;
This should add everyone to the gaz_subscriptions table and subscribe those to newsletter1 that are set to receive admin emails. You will need to look at the fields in the gaz_subscriptions table to determine what you should use in place of newsletter1 in the above queries, and do queries two and three for each newsletter field. You should also temporarily turn off new registrations while doing this so no one slips through while you are running these queries.

Loco 10-30-2009 10:42 PM

Awesome, thanks for your time Morgan!
I'll reply and update when it works
I'll make a database backup before hand just in case I jack something up.

Thanks again, you're my hero right now :)


All times are GMT. The time now is 02:29 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.