XF 2.1 Display modal after button click?

Joe Link

Well-known member
I'd like to display an XF modal with a message when a member clicks a button (such as the reply button in a thread). Is there a way to do this via template edit?
 
1. create a new node in acp (your board url/admin.php?nodes/) and select "page".
2. Type the message in "Template-HTML" (disable "Display in the node list") and save it. Remember the URL portion.
The page url = your board url/index.php?pages/URL portion/ and the content will be show in the modal (overlay).
3. Set the button: <a href="your board url/index.php?pages/URL portion/" data-xf-click="overlay"> <button class="actionBar-action actionBar-action--reply"> Button text</button></a>
 
1. create a new node in acp (your board url/admin.php?nodes/) and select "page".
2. Type the message in "Template-HTML" (disable "Display in the node list") and save it. Remember the URL portion.
The page url = your board url/index.php?pages/URL portion/ and the content will be show in the modal (overlay).
3. Set the button: <a href="your board url/index.php?pages/URL portion/" data-xf-click="overlay"> <button class="actionBar-action actionBar-action--reply"> Button text</button></a>

I appreciate the reply! This gives me hope.

1) Is there any way to add it to an existing button, such as popping up the modal when someone likes a post?
2) I'd prefer to do it without adding a page node, if possible.
 
Back
Top Bottom