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.

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

4 posters

Go down

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

Post by Rukiafan Fri Feb 19, 2016 12: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 Mon Feb 22, 2016 12:18 pm; edited 1 time in total
Rukiafan
Rukiafan
Forumember

Posts : 329
Reputation : 9
Language : English

Back to top Go down

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

Post by Ape Fri Feb 19, 2016 12: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
Ape
Ape
Administrator
Administrator

Male Posts : 19210
Reputation : 2001
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

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

Post by Rukiafan Fri Feb 19, 2016 1: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
Rukiafan
Rukiafan
Forumember

Posts : 329
Reputation : 9
Language : English

Back to top Go down

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

Post by Ape Fri Feb 19, 2016 1: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
Ape
Ape
Administrator
Administrator

Male Posts : 19210
Reputation : 2001
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

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

Post by Ange Tuteur Fri Feb 19, 2016 1: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.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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

Post by Rukiafan Fri Feb 19, 2016 2: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. :/
Rukiafan
Rukiafan
Forumember

Posts : 329
Reputation : 9
Language : English

Back to top Go down

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

Post by SLGray Fri Feb 19, 2016 4: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.
SLGray
SLGray
Administrator
Administrator

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

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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

Post by Rukiafan Fri Feb 19, 2016 4:16 pm

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

Posts : 329
Reputation : 9
Language : English

Back to top Go down

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

Post by SLGray Fri Feb 19, 2016 4: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.
SLGray
SLGray
Administrator
Administrator

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

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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

Post by Rukiafan Fri Feb 19, 2016 4: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. :/
Rukiafan
Rukiafan
Forumember

Posts : 329
Reputation : 9
Language : English

Back to top Go down

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

Post by Ange Tuteur Fri Feb 19, 2016 6:18 pm

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 )
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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

Post by Rukiafan Fri Feb 19, 2016 6:24 pm

@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. :/
Rukiafan
Rukiafan
Forumember

Posts : 329
Reputation : 9
Language : English

Back to top Go down

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

Post by Ange Tuteur Mon Feb 22, 2016 10:47 am

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');
  });
});
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

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

Post by Rukiafan Mon Feb 22, 2016 12:17 pm

@Ange Tuteur It worked! Thank you so much! Wink
Rukiafan
Rukiafan
Forumember

Posts : 329
Reputation : 9
Language : English

Back to top Go down

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

Post by Ape Mon Feb 22, 2016 12: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
Ape
Ape
Administrator
Administrator

Male Posts : 19210
Reputation : 2001
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum