[REQUEST] email address grabber

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
KIFFY
Registered User
Posts: 53
Joined: Sat Oct 28, 2006 7:03 pm
Location: south wales, uk
Contact:

[REQUEST] email address grabber

Post by KIFFY » Sun Apr 13, 2008 7:50 am

this is somehting thats come to me recently with my forums failure to send emails to members.. that and my dislike of the mass email feature within phpbb3

id love a mod that would only appear within the ACP so only admin could use it that enabled me to, hopefull with just a click or two to grab every forum members email address and export them in a word document, or other similar document which i can then use to construct my own more profesional looking emails to my members

User avatar
ccessex
Registered User
Posts: 399
Joined: Sat May 15, 2004 2:04 pm
Location: Furneux Pelham
Contact:

Re: [REQUEST] email address grabber

Post by ccessex » Sun Apr 13, 2008 10:09 am

Already exists, it's called

acp_user_email_list

This installs into the ACP and lists all the members email addys, complete with the ; so is ready to just copy and paste into the BCC or CC box of your email.

KIFFY
Registered User
Posts: 53
Joined: Sat Oct 28, 2006 7:03 pm
Location: south wales, uk
Contact:

Re: [REQUEST] email address grabber

Post by KIFFY » Sun Apr 13, 2008 10:11 am

brilliant, thanks for your reply

User avatar
ccessex
Registered User
Posts: 399
Joined: Sat May 15, 2004 2:04 pm
Location: Furneux Pelham
Contact:

Re: [REQUEST] email address grabber

Post by ccessex » Sun Apr 13, 2008 10:15 am


-ToM-
Registered User
Posts: 11
Joined: Fri Feb 08, 2008 4:12 pm

Re: [REQUEST] email address grabber

Post by -ToM- » Sun Apr 13, 2008 10:53 am

Well, I had just made this very simple modification, you can use it if you wish:

Create a new file called showusers.php and upload to your root dir with the following inside it:

Code: Select all

<?php

include 'config.php';

$table = 'phpbb_users';

if (!mysql_connect($dbhost, $dbuser, $dbpasswd))
    die("Can't connect to the database");

if (!mysql_select_db($dbname))
    die("Can't select the database");

// sending query
$result = mysql_query("SELECT user_email FROM {$table}");
if (!$result) {
    die("Query to show fields from table failed");
}

$fields_num = mysql_num_fields($result);

echo "<h1>All user's email addresses:</h1>";
// printing table headers
for($i=0; $i<$fields_num; $i++)
{
    $field = mysql_fetch_field($result);
}
echo "</tr>\n";
// printing table rows
while($row = mysql_fetch_row($result))
{

    // $row is array... foreach( .. ) puts every element
    // of $row to $cell variable
    foreach($row as $cell)
        echo "<td>$cell<br></td>";

    echo "</tr>\n";
}
mysql_free_result($result);
?>
Open and edit adm/style/acp_main.html.

Find

Code: Select all

			<form id="action_purge_cache_form" method="post" action="{U_ACTION}">
				<dl>
					<dt><label for="action_purge_cache">{L_PURGE_CACHE}</label><br /><span>{L_PURGE_CACHE_EXPLAIN}</span></dt>
					<dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd>
				</dl>
			</form>
			<form><dl>
After, add:

Code: Select all

<dl>
				<dt><label>List all emails</label><br /><span>Lists all emails of all users in one text file.</span></dt>
				<dd><input class="button2" type="button" onClick="document.location.href='http://www.yourforumurl.com/path/showusers.php'" value="Run now" /></dd></dl></form>
NOTE: Change http://www.yourforumurl.com/path/ to your forum url with forum path (if needed).

Go to acp, click on run now for purge cache, then yes. Then click on the run now for list all emails and you should see the screen of everyone's emails.

Locked

Return to “[3.0.x] MOD Requests”