1
simonvl
Contact email form for every member: Contact Us small hack with extensive template modification
  • 2004/4/4 11:27

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


I have put a small hack into Contact Us.

I have added a $toEmail value here
extract($HTTP_POST_VARS);
    
$myts =& MyTextSanitizer::getInstance();
    
$toEmail $myts->stripSlashesGPC($toEmail);

and changed the line
$xoopsMailer->setToEmails(function--> admin email)
to     $xoopsMailer->setToEmails($toEmail);


This enables me to send the email address for the contact form through $HTTP_POST_VARS.

I used this with a heavily modified template for userinfo.php which contained a form. The form's toEmail field is a hidden field which contains <input name="toEmail" type="hidden" value="<{$user_email}>" />.

Thus, every member who shows their email address has a contact form... and by deleting the default email field, this is without actually revealing their email address to anyone!

Enjoy.
Simon

Login

Who's Online

209 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 209


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits