Pierre's Wordspew
Feature Idea: Click to start PM (4 posts)

  1. Tosh
    Posted 5 years ago #

    I had this working almost but I updated and forgot to keep a backup. But I had it so when they clicked a display name in the chat box. It put @@DisplayName in the textbox or input field. So you could just start typing after that. Useful if you have a lot of private PM's going back and forth.

    But it didn't do it right. It would put say @@Bob in the box. Even though I clicked on Sally say in the chat box. So it wasn't grabbing the correct display name. I'll post my code here when I've got it back to wait it was.

  2. Tosh
    Posted 5 years ago #

    Here is what I have so far and it is putting @@DisplayName and space after it. Just need the correct display name. What it actually does is put in the display name of the last message of the chat box no matter which name you click on.

    Seems like I had it all in line before. But I don't recall how.

    echo '<li id="comment-new'.$r->id.'">'.$avatar.'<span title="'.jal_time_since( $r->time ).'" class="'.$class. sanitize_name($r->name).'"><a href="#" onclick="pmToUser()">'.stripslashes($url).'</a> : </span>'.convert_smilies(" ".stripslashes($TheText)).$delete.'</li>';
    // Output @@ in TEXT AREA
    echo '<script type="text/javascript">
    function pmToUser()
    document.getElementById("chatbarText").value="@@ ';
    echo stripslashes($url);
    echo ' ";';
    echo 'document.getElementById("chatbarText").focus();
    // Output @@ in TEXT AREA

    I've tried the following:


    This is my full file currently - http://pastebin.com/YPChmtzX

  3. Tosh
    Posted 5 years ago #

    I know I gotta be really close. Any ideas? I was thinking of having the link be the avatar instead of the name. But we'll see.

  4. Pierre_02
    Plugin Author

    Posted 5 years ago #

    Hi Tosh,

    sorry but i'm too lazy to search for that implementation :(...
    But, if you do it don't forget that you'll have to implement it in javascript too... Not so simple i think.

    Good luck Tosh and continue to share your discoveries ;).



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Pierre's Wordspew
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic