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.
The forum of the forums
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 Tue 24 Feb - 15:47

    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 : 1186
    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 Tue 24 Feb - 17:49

    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 Wed 25 Feb - 5:29

    @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_ Wed 25 Feb - 5:42

    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 Wed 25 Feb - 11:53

    @_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_ Wed 25 Feb - 12:10

    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 Wed 25 Feb - 14:30

    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_ Wed 25 Feb - 14:35

    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 Wed 25 Feb - 15:38

    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 Fri 27 Feb - 3:18

    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 Fri 27 Feb - 6:01

    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.

      Current date/time is Sun 22 Sep - 18:34