Author Topic: [MOD] Send email to admin from any template you want  (Read 5374 times)

0 Members and 1 Guest are viewing this topic.

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
[MOD] Send email to admin from any template you want
« on: April 14, 2005, 07:13:18 PM »
Yesterday I was looking the code of  member_mailform.html and thanks to what i find out know the users can send me email from any template I want even new templates that you create.

Screenshots:




add this code wherevere you want in the template:

Code: [Select]
<form method="post" action="{url_member}">
  <table width="100%" border="0" cellspacing="0" cellpadding="1" id="table1">
    <tr>
      <td valign="top">
        <table width="100%" border="0" cellpadding="4" cellspacing="0" id="table2">
          <tr>
            <td class="row2" align="center">
    <input type="text" name="subject"  size="19" value="Subject" class="input2" /></td>
          </tr>
          <tr>
            <td class="row2" width="100%" align="center">
            <input type="text" name="message"  size="19" value="Name" name="message" wrap="virtual" class="textarea2"/></td>
          </tr>
           <td class="row2" width="100%" align="center">
            <input type="text" name="message"  size="19" value="Message" name="message" wrap="virtual" class="textarea2"/></td>
          </tr>
          </table>
      </td>
    </tr>
  </table>
  <input type="hidden" name="action" value="emailuser" />
  <input type="hidden" name="user_id" value="1" />
  <p align="center">
    <input type="submit" value="Enviar" />&nbsp;
  </p>
</form>

Now you have tu check your user id
(http://www.tudominio/4imges/member.php?action=showprofile&user_id=1) in my case isl 1 cuz I am the admin.
once you find you id:
find the previous coder:
Code: [Select]
<input type="hidden" name="user_id" value="1" />
where it says
Code: [Select]
value="1" replace 1 to our user id

Now you need you change the size of the text areas so add these two clases to your style.css:

Code: [Select]
.textarea2 {
  font-family: Tahoma,Verdana,Arial,Helvetica,sans-serif;
  color: #0f5475;
  font-size: 11px;
  width: 150px;
}

.input2 {
  font-family: Tahoma,Verdana,Arial,Helvetica,sans-serif;
  color: #0f5475;
  font-size: 11px;
  width: 150px;
}

That's it. now your users can send you emails from any template :)