vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Generating a mailing list (https://vborg.vbsupport.ru/showthread.php?t=104472)

CLKeenan 01-04-2006 09:29 PM

Generating a mailing list
 
How do I generate a mailing list with username and email? I would like to select all users that meet a certain criteria (from the userfield table) and then create a csv file with their username;emailaddress.

Is this possible within the admincp? If not, how would I go about doing it?

Thanks,
-Chris

vbulletin 3.5.2

nexialys 01-04-2006 10:13 PM

>> Admincp >> Users >> Send Email to Users >> that's it!

and btw, this is not a hack, when you need help with the current vBulletin, go to http://vbulletin.com/forum/ for support!

CLKeenan 01-05-2006 01:12 AM

No, thats *not* what I want. I want a CSV file with a username and a email address. I am not trying to immediately send an email to these people. I am trying to import the list into another newlsetter program.

Thanks,
-Chris

joelabq 01-05-2006 02:46 AM

1 Attachment(s)
I attached a file of a quick little script to do this for you..

Put emaillist.php in your forum's home directory.
Add a template to the style you use on your forum called "email_listbit" and add the following to that new email_listbit template:

Code:

$email_list[username],$email_list[email]<br>
This will output a list of ALL your users, one user per line, username then email address delimited by a comma.

This is just a quick script I wrote for you nothing fancy, only works for someone whose in the administrator group (group id 6).

Hope this helps.

Joel

CLKeenan 01-05-2006 03:04 AM

Joel, thanks for taking the time to do that for me. However, I really need it to be able to select a certain criteria in the userfield table. I'm trying create multiple (4) mailing lists based on this data.

Is there any way you could modify the script to do that?

If it helps, the field in the table userfield that criteria im using is field10 and the data in field10 that I'm looking for is 'US History' (without the 's)

Thanks again,
-Chris

joelabq 01-05-2006 04:20 AM

You said there was 4 different criteria to query for, you only gave me one. What are the other 3?

It's a quick edit, just let me know.

CLKeenan 01-05-2006 04:23 AM

US History
US Government and Politics
Psychology
European History
Economics

so make that 5 actually, sorry

-Chris

joelabq 01-05-2006 05:18 AM

1 Attachment(s)
Ok here's a modified version. I didn't need your criteria, as I was thinking for whatever strange reason...

It'll have a form, in fact, you'll need to add another template: email_list with the following in it:

Code:

<form action="emaillist.php" method="post">
Field Number: <input type="text" name="fieldnum" value="10"><br />
What to search for: <input type="text" name="input" value=""><br />
<input type="submit">
</form>

$email_bits

The email_listbit stays the same

Replace emaillist.php that I attached, overwrite the old one.

Type in the field number (default is 10 for you) and then type in the search field the string you want to look for.

It will be case senstive in the search string.

Joel

CLKeenan 01-05-2006 05:26 AM

I hate to sound like an idiot, but how do I access the script? I tried to open the url but all i got was a blank page. Should i be trying to open it another way? I am logged in as the admin user.

Thanks again for doing this, you dont know how much I appreciate it!

-Chris

joelabq 01-05-2006 05:28 AM

Did you add the two templates (email_list and email_listbit) to your template style?

To access it www.yoursite.com/forum/emaillist.php should do it.

I may not be able to help you more on this until tomorrow.

Joel


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00976 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete