The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
2 posters

    Auto PM to specific user through a button

    WyvernNE
    WyvernNE
    Forumember


    Posts : 27
    Reputation : 4
    Language : French, english

    Solved Auto PM to specific user through a button

    Post by WyvernNE March 17th 2015, 11:21 am

    Hi Forumotion!

    I'd like to ask you somthing:
    I know there's a script that automaticlly post a new topic when we hit a button, but is there a way to send a pm to a specific user using the same way?

    I want to hide an html page to my forum, with a button. If a member click on it, it will send me an pm.

    Can you help me please? Smile


    Last edited by WyvernNE on March 18th 2015, 11:40 am; edited 1 time in total
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Auto PM to specific user through a button

    Post by Ange Tuteur March 17th 2015, 7:25 pm

    Hello @WyvernNE,

    It's possible by putting together a simple form. First you should make sure the following security feature is disabled. Go to Administration Panel > General > Security and disable Unauthorize unofficial forms to post messages and private messages on the forum

    Next go to Administration Panel > Modules > HTML Pages management > Create a new page

    Use your header / footer : YES
    Paste the following code :
    Code:
    <div class="module">
      <span class="corners-top"><span></span></span>
     
      <div class="inner">
        <div class="h3">Send a PM</div>
        <form action="/privmsg" method="post" name="post" enctype="multipart/form-data">
         
          <fieldset>
            <dl>
              <dt><label for="text_editor">Message : </label></dt>
              <dd><textarea id="text_edtior" name="message"></textarea></dd> <!-- THE MESSAGE OF THE PM -->
            </dl>
            <div style="text-align:center;"><input type="submit" name="post" value="Send"/></div>
          </fieldset>
         
          <!-- THE VALUE OF THESE FIELDS IS WHAT YOU EDIT -->
          <input type="hidden" name="subject" value="PM TITLE"/> <!-- THE TITLE OF YOUR PM -->
          <input type="hidden" name="username[]" value="An"/> <!-- THE RECIPIENT OF THE PM -->
        </form>
      </div>
     
      <span class="corners-bottom"><span></span></span>
    </div>

    There's comments in there to explain, but if you have any questions let me know. Wink
    WyvernNE
    WyvernNE
    Forumember


    Posts : 27
    Reputation : 4
    Language : French, english

    Solved Re: Auto PM to specific user through a button

    Post by WyvernNE March 18th 2015, 11:40 am

    Perfect, as always! Thank you Ange Tuteur!
    Case solved!
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Auto PM to specific user through a button

    Post by Ange Tuteur March 18th 2015, 7:57 pm

    No problem Wink

    Topic archived

    Have a nice day. Smile

      Current date/time is November 11th 2024, 8:39 pm