cformsII Support Forum
Current User: Guest *Frequently Asked Questions*
Search 
Search Forums:


 




What if i would like to mail ?

Add a New Topic Reply to Post
Post

Dod - Guest

8:10 pm - April 22, 2008

1

First of all, all this information is not also required for my question, so pls forgive me not using any template right now.. :D


So here goes my question..

I'm very proud to have some forms like cforms and i appreciate all the hard work you have done.

I do use your forms but i thought it would be a little better if i could use it to mail any author via the author pages..

I tried a little, but no wonder no result.

So i would like to ask, how could i change the "to:" section for cforms3form so my 3rd form. So it will send the data that the forum contains to the author.

I could make 100 forms and give them the right mail, and the form send the data to them but its useless right ?

This is a complicated question and maybe i could not describe it perfectly but i guess you did understand me :D

Oliver - Admin

8:33 pm - April 22, 2008

posts 3909

2

I've never used "author pages", where is the info stored that determines the author when being on such a page?

Can you give me your URL to an example author page?

Dod - Guest

8:58 pm - April 22, 2008

3

http://avntn.org/author/admin/

I put the form on the left side.

Oliver - Admin

10:04 pm - April 22, 2008

posts 3909

4

Here is how I would do it:

  • change all @mail($to,...in lib_ajax.php & lib_nonajax.php
    to: @mail(check_default_vars($to,$no),... (6x)
  • add this:
global $wp_query;
$curauth = $wp_query->get_queried_object();
$m = str_replace( '{author_email}', $curauth->user_email, $m );

to lib_aux.php, after (line ~128):

function check_default_vars($m,$no) {...

  • and finally replace your current email address with {author_email}in the admin email config setting of your form

I made this up on-the-fly, but think it should work just fine.

Dod - Guest

10:48 pm - April 22, 2008

5

Thanks m8.

Reply to Post


Reply to Topic: What if i would like to mail ?
PLEASE READ THE FAQs FIRST! THANK YOU.

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Topic Reply:

Save New PostSmileysOptions

Guest URL (required)

Math Required!
What is the sum of:
10 + 12
   

 
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell

Search