Pre-filled New Thread Message with Query Parameter

Pre-filled New Thread Message with Query Parameter

  • Iniciador del hilo Iniciador del hilo axtona
  • Fecha de inicio Fecha de inicio
Registrado
28 Jun 2020
Mensajes
4.400
Puntuación de reacciones
1.401
Credits
$11.794
thanks to dear member @jessy submitted a new resource:

Pre-filled New Thread Message with Query Parameter - Allows you to define a message to be passed as content for 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, ' '));
    const...

Read more about this resource...
 
Superior