thanks stramm.
i know your extremely busy, so i want to help any way i can.
since i posted this request, i have discovered something -close- to what is hoped for:
Send ecards to phpBB Members
open
ecard.php
=============
find
=============
$recipient_name = get_post_var('recipient_name');
$recipient_email = get_post_var('recipient_email');
===============
change it to
===============
//$recipient_name = get_post_var('recipient_name');
//$recipient_email = get_post_var('recipient_email');
if (!empty($_POST['recipient_id'])){
$recipient_id = (int) $_POST['recipient_id'];
$sql = "SELECT {$cpg_udb->field['username']} AS user_name,
{$cpg_udb->field['email']} AS user_email
FROM {$cpg_udb->usertable}
WHERE {$cpg_udb->field['user_id']} = $recipient_id
LIMIT 1";
$result = cpg_db_query($sql, $cpg_udb->link_id);
if (!mysql_num_rows($result)) cpg_die(ERROR, 'Unable to obtain user details', __FILE__, __LINE__);
$row = mysql_fetch_assoc($result);
$recipient_name = stripslashes($row['user_name']);
$recipient_email = $row['user_email'];
}
=============
find
=============
<tr>
<td class="tableh2" colspan="2"><b>{$lang_ecard_php['to']}</b></td>
</tr>
<tr>
<td class="tableb" valign="top" width="40%">
{$lang_ecard_php['rcpt_name']}<br />
</td>
<td valign="top" class="tableb" width="60%">
<input type="text" class="textinput" name="recipient_name" value="$recipient_name" style="width: 100%;" /><br />
</td>
</tr>
<tr>
<td class="tableb" valign="top" width="40%">
{$lang_ecard_php['rcpt_email']}<br />
</td>
<td valign="top" class="tableb" width="60%">
<input type="text" class="textinput" name="recipient_email" value="$recipient_email" style="width: 100%;" /><br />
$recipient_email_warning
</td>
</tr>
===============
change it to
===============
<tr>
<td class="tableh2" colspan="2"><b>{$lang_ecard_php['to']}</b></td>
</tr>
EOT;
$recipientdropdown = '<select name="recipient_id">';
$sql = "SELECT {$cpg_udb->field['user_id']} AS user_id,
{$cpg_udb->field['username']} AS user_name
FROM {$cpg_udb->usertable}
WHERE {$cpg_udb->field['email']} != ''
ORDER BY {$cpg_udb->field['username']}";
$result = cpg_db_query($sql, $cpg_udb->link_id);
while ($row = mysql_fetch_assoc($result))
$recipientdropdown .= '<option value="'. $row['user_id'] . '">'.stripslashes($row['user_name']).'</option>';
$recipientdropdown .= '</select>';
echo <<< EOT
<tr>
<td class="tableb" valign="top" width="40%">
Recipient<br />
</td>
<td valign="top" class="tableb" width="60%">
$recipientdropdown<br />
</td>
</tr>
But with this - the Admin has to pick allowing EITHER sending ecards via typical email OR sending ecards to phpbb members.
It would be nice to:
- have both
- link to phpbb buddies list
thanks again