XF 2.3 Having prewritten text in message

Seeker-Smith

Well-known member
Is there a way, or an addon that allows you to have some prewritten text in the large text field in message but only in select nodes?

I've tried custom fields and title prompts but they don't fit the bill.
 
You can edit the template quick_reply_macros:

Above <xf:css src="message.less" /> you can add:

HTML:
    <xf:if is="$xf.reply.containerKey == 'node-2'">
        <xf:set var="$placeholder" value="custom text.." />
    </xf:if>

"custom text.." is your custom text and 2 is the node id, where you want your text to show up. This will change the placeholder text for quick reply.

You can do similar things for thread creation. You just have to find the right template. ;)

Does this solve your problem?
 
You can edit the template quick_reply_macros:

Above <xf:css src="message.less" /> you can add:

HTML:
    <xf:if is="$xf.reply.containerKey == 'node-2'">
        <xf:set var="$placeholder" value="custom text.." />
    </xf:if>

"custom text.." is your custom text and 2 is the node id, where you want your text to show up. This will change the placeholder text for quick reply.

You can do similar things for thread creation. You just have to find the right template. ;)

Does this solve your problem?
Hi and thank you. I think it may.
 
P.S. If you want to change default text in quick thread creation (on forum view):

template forum_post_quick_thread.

find:

HTML:
        <xf:editorrow name="message" value="{$post.message}" rows="3" rowtype="fullWidth noGutter noLabel mergeNext"
            data-min-height="100"
            data-max-height="300"
            placeholder="{{ phrase('message...') }}"
            label="{{ phrase('message') }}"
            data-preview-url="{{ link('forums/thread-preview', $forum) }}" />

replace with:

HTML:
        <xf:if is="$xf.reply.containerKey == 'node-2'">
            <xf:set var="$customPlaceholder" value="custom text.." />
        <xf:else />
            <xf:set var="$customPlaceholder" value="{{ phrase('message...') }}" />
        </xf:if>

        <xf:editorrow name="message" value="{$post.message}" rows="3" rowtype="fullWidth noGutter noLabel mergeNext"
            data-min-height="100"
            data-max-height="300"
            placeholder="{{ $customPlaceholder }}"
            label="{{ phrase('message') }}"
            data-preview-url="{{ link('forums/thread-preview', $forum) }}" />
 
Don't mean to hijack this post, but I kind of want something similar for my Resources , specifically when someone clicks on the " Report " button..I want it to be pre-filled with " Link is dead/needs an update " in the reason box. Is this a possibility?
 
Back
Top Bottom