Adding a reply button next to the quote button to automatically tag users? 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

    Adding a reply button next to the quote button to automatically tag users?

    Rukiafan
    Rukiafan
    Forumember


    Posts : 329
    Reputation : 9
    Language : English

    Solved Adding a reply button next to the quote button to automatically tag users?

    Post by Rukiafan February 19th 2016, 7:53 pm

    Hello! I was wondering if it'd be possible to add a reply button next to the quote button in the forum messages and blog comments body? I want to allow users to easily tag members with tricky usernames with spaces and have it instantly show up in the quick reply box. My forum version is PunBB!

    Thanks in advance! Wink


    Last edited by Rukiafan on February 22nd 2016, 7:18 pm; edited 1 time in total
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19168
    Reputation : 1995
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Ape February 19th 2016, 7:59 pm




    Adding a reply button next to the quote button to automatically tag users? Left1212Adding a reply button next to the quote button to automatically tag users? Center11Adding a reply button next to the quote button to automatically tag users? Right112
    Adding a reply button next to the quote button to automatically tag users? Ape_b110
    Adding a reply button next to the quote button to automatically tag users? Ape1010
    Rukiafan
    Rukiafan
    Forumember


    Posts : 329
    Reputation : 9
    Language : English

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Rukiafan February 19th 2016, 8:07 pm

    @Ape I tried that, but the feature doesn't work on game console or mobile browsers which is bad because I'm the only active admin and if it breaks I wouldn't be able to fix it since I couldn't see it. :/

    That really would fix the issue under normal circumstances however, so thanks for the tip, but it doesn't solve my issue, unfortunately. Sad
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19168
    Reputation : 1995
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Ape February 19th 2016, 8:15 pm

    Hmm it should work as it ad's a button in your Editor system

    I think @Ange Tuteur needs to look over the code again and see why its not working for you on your browser.

    What browser are you using ?



    Adding a reply button next to the quote button to automatically tag users? Left1212Adding a reply button next to the quote button to automatically tag users? Center11Adding a reply button next to the quote button to automatically tag users? Right112
    Adding a reply button next to the quote button to automatically tag users? Ape_b110
    Adding a reply button next to the quote button to automatically tag users? Ape1010
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Ange Tuteur February 19th 2016, 8:32 pm

    Which code did you add specifically ? There's three in that topic. Think

    Oh, the URL of the forum you added it to would help as well.
    Rukiafan
    Rukiafan
    Forumember


    Posts : 329
    Reputation : 9
    Language : English

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Rukiafan February 19th 2016, 9:01 pm

    Http://www.WiiWareWave.com

    The editor version works more or less but the button next to the quote button mentions the user that you're trying to mention as @"" without their username. :/
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51515
    Reputation : 3519
    Language : English
    Location : United States

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by SLGray February 19th 2016, 11:13 pm

    You have to manually enter the username who want to tag.



    Adding a reply button next to the quote button to automatically tag users? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Rukiafan
    Rukiafan
    Forumember


    Posts : 329
    Reputation : 9
    Language : English

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Rukiafan February 19th 2016, 11:16 pm

    @SLGray Then what's the point of the button version?! That's no easier really than manually inputting it lol. scratch
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51515
    Reputation : 3519
    Language : English
    Location : United States

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by SLGray February 19th 2016, 11:17 pm

    I believe what you want is one of the first two options.



    Adding a reply button next to the quote button to automatically tag users? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Rukiafan
    Rukiafan
    Forumember


    Posts : 329
    Reputation : 9
    Language : English

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Rukiafan February 19th 2016, 11:32 pm

    @SLGray @Ange Tuteur is there any way of making option #2 in that tutorial have the same function as option #1? I don't like the @ before the username and option #2 is pretty much pointless in its current state. :/
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Ange Tuteur February 20th 2016, 1:18 am

    Rukiafan wrote:Then what's the point of the button version?! That's no easier really than manually inputting it lol. scratch
    Oh, the button should input the username. I'm assuming there's something preventing the button from getting the username. I have two questions :

    1. Is the button not working in topics, blogs, or both ?
    2. Could you provide me with a test account on your forum ? ( so I can test it first hand )
    Rukiafan
    Rukiafan
    Forumember


    Posts : 329
    Reputation : 9
    Language : English

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Rukiafan February 20th 2016, 1:24 am

    @Ange Tuteur both, also I'm having trouble setting you up an account. I used an email that isn't being used on my site and yet I get the message an account linked to this email is already registered?! scratch

    Can you see if you can create an account? Sorry. :/
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Ange Tuteur February 22nd 2016, 5:47 pm

    I got your PM. thumleft

    I checked and it worked fine for normal posts. The problem was with blog comments. Try replacing the button script with this one :
    Code:
    /* FORUM VERSIONS
     * 0 = PHPBB2
     * 1 = PHPBB3
     * 2 = PUNBB
     * 3 = INVISION
     */
    $(function() {
      var version = 2,
          image = 'http://i19.servimg.com/u/f19/18/21/60/73/mentio10.png';
     
      if (/mode=reply/.test(window.location.search) && my_getcookie('fa_mention')) {
        document.post.message.value += '@"' + my_getcookie('fa_mention') + '" ';
        my_setcookie('fa_mention',''); 
      } if (!/\/t\d+/.test(window.location.pathname)) return;
     
      for (var a = $(['.post-options', '.profile-icons', '.post-options', '.posting-icons'][version]), b, c, d = ['.name strong a', '.author a', '.username a, .author a', '.author a'][version], e, i = 0, j = a.length, t = document.getElementById('text_editor_textarea'), l = version == 1 || version == 3; i<j; i++) {
        b = document.createElement('IMG');
        b.src = image;
        b.alt = 'Mention';
        b.title = 'Mention ' + $(a[i]).closest('.post, .posthead').find(d).not('.fa-mention').text();
        b.className = 'i_icon_mention';
        b.onclick = function() {
          var n = this.title.replace(/^.*?\s/,'');
         
          if ($.sceditor) t.insertText('@"' + n + '" ');
          else {
            my_setcookie('fa_mention', n);
            window.location.href = '/post?t=' + window.location.pathname.replace(/\/t(\d+)-.*/,'$1') + '&mode=reply';
          }
        };
     
        if (l) {
          c = document.createElement('LI');
          c.appendChild(b);
        }
       
        a[i].insertBefore(l ? c : b, a[i].firstChild);
      }
     
      $(function(){
        if (!$.sceditor) return;
        t=$(t).sceditor('instance');
      });
    });
    Rukiafan
    Rukiafan
    Forumember


    Posts : 329
    Reputation : 9
    Language : English

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Rukiafan February 22nd 2016, 7:17 pm

    @Ange Tuteur It worked! Thank you so much! Wink
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19168
    Reputation : 1995
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Adding a reply button next to the quote button to automatically tag users?

    Post by Ape February 22nd 2016, 7:30 pm

    Topic solved and archived



    Adding a reply button next to the quote button to automatically tag users? Left1212Adding a reply button next to the quote button to automatically tag users? Center11Adding a reply button next to the quote button to automatically tag users? Right112
    Adding a reply button next to the quote button to automatically tag users? Ape_b110
    Adding a reply button next to the quote button to automatically tag users? Ape1010