forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: KOREntertainment on November 08, 2007, 06:44:48 am

Title: Extracting user emails
Post by: KOREntertainment on November 08, 2007, 06:44:48 am
I did a search and the topics that I found did not help.  I am not that educated with pho so it's like another language to me.  How can I extract emails from all users.  The t
Title: Re: Extracting user emails
Post by: Sami on November 08, 2007, 08:18:36 am
Why do you need user's email anyway ?
Title: Re: Extracting user emails
Post by: Joachim Müller on November 08, 2007, 08:31:58 am
Describe in detail what you're up to. "Extract emails" is not a technical term. Do you want to use the email addresses of your users and use them on another page, or display them somewhere else? If yes, post details what you would like to do: where should they appear and for whom?
Title: Re: Extracting user emails
Post by: KOREntertainment on November 15, 2007, 04:18:17 pm
ok, my photo gallery has over 6,000 members, I am going to change servers but this time I am going to bridge my message board with my gallery and I will like to send everyone a detailed message as to what will be going on with the move and what they should do.
Title: Re: Extracting user emails
Post by: Pascal YAP on November 15, 2007, 04:37:01 pm
Morning,

If you want catch all of your users's emails, you can try to use this simple script.
Output email list is in text mode.
Copy and Past this code and name it with a nice name for you, expl "view-user-email.php"
Code: [Select]
<?php
define
('IN_COPPERMINE'1);
require 
'include/init.inc.php';

$test CPG_db_query("SELECT DISTINCT(user_email) FROM {$CONFIG['TABLE_USERS']} WHERE user_email <> ''");
while (
$row mysql_fetch_assoc($test))
echo 
$row['user_email'] . "<br />";
?>

PYAP
Title: Re: Extracting user emails
Post by: KOREntertainment on November 15, 2007, 05:04:12 pm
I'm sorry but can U be more specific?  I am not too familiar with php, I do html but where am I pasting it?  Am I pasting it in a plain php page and then what?
Title: Re: Extracting user emails
Post by: Sami on November 15, 2007, 05:33:56 pm
open notepad (for windows) or any simple text editor and put PYAP's code and save it to your gallery root and then run it
Title: Re: Extracting user emails
Post by: Pascal YAP on November 15, 2007, 05:36:12 pm
This script is a standalone file !
Copy my entire code, and past it in a blank new file.
Name this new file as you want. (if you want : view-user-email.php)
Place this new file on the Coppermine's root.
With your browser, type ht tp://your-Gallery-URL/view-user-email.php

If you have 6000 users, the output will have 6000 lines  ;D
That's all.

PYAP
Title: Re: Extracting user emails
Post by: KOREntertainment on November 15, 2007, 06:14:41 pm
Wow it worked, I tried something like this before but I was not successful.  Thanks all I really appreciate it.
Title: Re: Extracting user emails
Post by: Pascal YAP on November 15, 2007, 06:33:22 pm
Quote
Thanks all I really appreciate it.
Happy for you  ;D

And now, what are you doing with this TXT list ?
Do you want to use it with Excel or something like that ?

PYAP