add a form on reply and quick reply Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
4 posters

    add a form on reply and quick reply

    avatar
    gunsmaker
    Forumember


    Posts : 34
    Reputation : 1
    Language : English and Indonesian

    add a form on reply and quick reply Empty add a form on reply and quick reply

    Post by gunsmaker February 24th 2015, 2:47 pm

    https://help.forumotion.com/t131789-add-a-form-on-creation-of-a-new-topic
    thanks @Ange Tuteur for the tutorial.

    can i request the codes for the Reply and Quick Reply?
    My forum using phpbb3.
    Ikerepc
    Ikerepc
    Active Poster


    Male Posts : 1187
    Reputation : 167
    Language : Who cares...
    Location : Where web help & support is needed

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by Ikerepc February 24th 2015, 4:49 pm

    You can use this for each topic:

    Code:
    $(function() {
        if (location.pathname == '/post' && location.search == '?t=23&mode=reply') {
          $('#text_editor_textarea').val('[b]Field 1[/b]:\n[b]Field 2[/b]: Don\'t fill this field in\n[b]Field 3[/b]:');
        }
    });

    So change 23 with id of topic. That will work for reply, but not for quick reply.
    avatar
    gunsmaker
    Forumember


    Posts : 34
    Reputation : 1
    Language : English and Indonesian

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by gunsmaker February 25th 2015, 4:29 am

    @Ikerepc , i want for quick reply too. for the normal reply its working.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by _Twisted_Mods_ February 25th 2015, 4:42 am

    Code:
    $(function() {
        var g=location.pathname;
        alert(g)
    if(g.match(/\/t\d+/)){
          $('#quick_reply iframe').contents().find('p').html('[b]Field 1[/b]:<br>[b]Field 2[/b]: Don\'t fill this field in<br>[b]Field 3[/b]:');
    };
    });

    instead of useing \n for line breaks you will have to use <br>
    avatar
    gunsmaker
    Forumember


    Posts : 34
    Reputation : 1
    Language : English and Indonesian

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by gunsmaker February 25th 2015, 10:53 am

    @_Twisted_Mods_ should i replace this "/\/t\d+/" part to the thread number which i want to add the quick reply form?
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by _Twisted_Mods_ February 25th 2015, 11:10 am

    sorry replace
    Code:
    \d+

    with the topic id#
    avatar
    gunsmaker
    Forumember


    Posts : 34
    Reputation : 1
    Language : English and Indonesian

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by gunsmaker February 25th 2015, 1:30 pm

    didnt work.
    nothing appears in the quick reply.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by _Twisted_Mods_ February 25th 2015, 1:35 pm

    remove
    Code:
    alert(g)

    it wasn't suppose to be in the code i forgot to remove it
    avatar
    gunsmaker
    Forumember


    Posts : 34
    Reputation : 1
    Language : English and Indonesian

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by gunsmaker February 25th 2015, 2:38 pm

    still not working, just put the code in js and check in all pages and theres no additional codes right?
    Michael_vx
    Michael_vx
    Forumember


    Male Posts : 659
    Reputation : 29
    Language : Arabic and some English
    Location : Egypt

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by Michael_vx February 27th 2015, 2:18 am

    im not sure about quick reply but that reminded me by something i asked about before something like that
    https://help.forumotion.com/t132021-about-the-code-of-add-a-form-creation-of-a-new-topic
    i hope its help
    avatar
    gunsmaker
    Forumember


    Posts : 34
    Reputation : 1
    Language : English and Indonesian

    add a form on reply and quick reply Empty Re: add a form on reply and quick reply

    Post by gunsmaker February 27th 2015, 5:01 am

    Michael_vx wrote:im not sure about quick reply but that reminded me by something i asked about before something like that
    https://help.forumotion.com/t132021-about-the-code-of-add-a-form-creation-of-a-new-topic
    i hope its help

    @Michael_vx , i already saw that before making this topic.

    i tried some things to make it works, like changing the variable name of the quick reply, but nothings happening, i thought that quick reply has different variable name. but idk, i'm not the maker anyway. xD

    EDIT : NVM, i decided to not using this code, so mods can lock it, thanks for anyone who willing to help.