Pre-filled New Thread Message with Query Parameter

Pre-filled New Thread Message with Query Parameter

  • Criador do tópico Criador do tópico axtona
  • Data de início Data de início
Lv.12
Moderating
Bronze Member
Iron Member
Donor Member
Associado
28/06/2020
Mensagens
4.400
Pontuação de reações
1.401
Credits
$11.798
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...
 
Top