Resource icon

Pre-filled New Thread Message with Query Parameter

unproperlypropagated

Active member
unproperlypropagated submitted a new resource:

Pre-filled New Thread Message with Query Parameter - Add a Query parameter to pre-set the message when creating a new thread

Allows you to define a message to be passed as content for a new thread, Xenforo already provides query parameters for the thread title and the prefix but not the post itself.

create a file here: /js/custom/prefill.js with this content:
JavaScript:
XF.ready(() => {

    const params = new URLSearchParams(window.location.search);
    const content = params.get('content');
    if (!content) return;

    const decodedContent = decodeURIComponent(content.replace(/\+/g, '...

Read more about this resource...
 
Back
Top Bottom