Link to user profile page with "send message" window already open

(Andrea Slobodien) #1

Hi guys,

We’re trying to better integrate private messaging on our site (8tracks), and we want to add a “private message” button to 8tracks user profile pages, which would then link to their forum profile page, with the message window already open.

Is there something we can add to the URL to make the profile page appear in this state?



Link to private message a user from outside
(Dean Taylor) #2

You should be able to do this with custom user code JavaScript…
… it’s not built in as far as I am aware.

With 3 parts…

##Part 1 - passing the parameter

A combination of ensuring the links link to a users profile page that doesn’t redirect i.e.

and not

If you include a parameter on the URL i.e.

##Part 2 - opening the private message dialog
Some of the code I have written in this topic will open the composer and start a private message

##Part 3 - read the ?pm=1 parameter
Use JavaScript to read the parameter on page load completed from the URL’s query string i.e. pm=1
then execute the opening of the private message dialog as per part 2.

(Dean Peterson) #3

Adding custom plugin code to discourse is really the only way to do this?? :sob:

(Christopher Heald) #4

There is now a plugin to do this. Link to private message a user from outside

(Arpit Jalan) #5

This feature is now available in Discourse:

(Arpit Jalan) closed #6