Latest topics
» IconSkouliki Graphics
by skouliki Fri 20 Oct 2017, 05:08

» "Edit this page" feature
by skouliki Fri 20 Oct 2017, 01:37

» Dark Mode + Another Question
by Haggis Thu 19 Oct 2017, 10:36

» [GAME] Count to 1000 using even numbers Van-Helsing Edition
by Van-Helsing Tue 17 Oct 2017, 15:07

» [GAME] What are you thinking right now?
by Ace 1 Tue 17 Oct 2017, 08:09

» [GAME] Count to One Million!
by Ace 1 Tue 17 Oct 2017, 08:07

» [GAME] Last Letter Game
by Ace 1 Tue 17 Oct 2017, 08:06

» [GAME] World Snake
by Ace 1 Tue 17 Oct 2017, 08:06

» [GAME] Never have I ever..
by Ace 1 Tue 17 Oct 2017, 08:06

» [GAME] Animal Game
by universecat Mon 16 Oct 2017, 21:43

» [GAME] Post a random picture
by SLGray Mon 16 Oct 2017, 16:28

» Hi everyone!
by skouliki Mon 16 Oct 2017, 02:01

» Hai Guys~
by skouliki Mon 16 Oct 2017, 01:59

» Add a login popup for the toolbar
by Ape Sun 15 Oct 2017, 13:51

» Mobile Usability Test
by Ange Tuteur Sat 14 Oct 2017, 11:20

Recent Tutorials
Who is online?
In total there are 6 users online :: 0 Registered, 0 Hidden and 6 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

[SUGGESTION] An @"ALL" script to mention each and every member

View previous topic View next topic Go down

avatar
Guest
Guest
View all awards

PostGuest on Sat 17 Dec 2016, 12:52

Hey! @Ange Tuteur,

We'd like to ask for an @"ALL" script for the admins to be able to mention everyone personally so they WILL get a certain message. Like "Read this before continuing..".

Thanks for looking into this and your time,

Regards,

Hello @Samantha NL (On behalf of @Prometheus).


Last edited by Samantha NL on Mon 19 Dec 2016, 13:56; edited 1 time in total
avatar
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 44
Posts : 2447
Points : 4735
Reputation : 287
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Sat 17 Dec 2016, 16:31

Do you mean something like this:
Code:
@{USERNAME}
avatar
Guest
Guest
View all awards

PostGuest on Sun 18 Dec 2016, 15:22

SLGray wrote:Do you mean something like this:
Code:
@{USERNAME}

That would most likely not push out any notifications, just mentions. But if so that 'd expose a serious security leak @ FM and it should be a reason to have it blocked immediately being used by regular members. That sort of codes should be available to admins only, and that's exactly what I asked for.
avatar
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 44
Posts : 2447
Points : 4735
Reputation : 287
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Sun 18 Dec 2016, 17:10

Do you mean this:
Code:
{USERNAME}

It is one of the variables that appears in most lists that members can use on most sites.
avatar
Guest
Guest
View all awards

PostGuest on Sun 18 Dec 2016, 21:45

oh nvm. I guess it's just too complicated, if not technically impossible, what I'm asking for. @Ange Tuteur pls garbage the idea. ty.
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4698
Points : 9540
Reputation : 2337
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Mon 19 Dec 2016, 12:30

Hmm.. this should be possible. Awhile back I found a useful way to get all the members names using this page :
http://fmdesign.forumotion.com/search?mode=searchuser&fieldname=username&search_username=*

Thing is, it returns ALL members that are on the board, so if you have A LOT ( like THOUSANDS ) of members this page might become a bit unstable, nonetheless it should come in handy for this instance. Go to Admin Panel > Modules > JS Codes mangagement and create a new script

Title : Tag All
Placement : In all the pages
Code:
$(function() {
  if (_userdata.user_level == 1 && $.sceditor && toolbar) {
    var tagAll = function() {
      var editor = this;

      $.get('/search?mode=searchuser&fieldname=username&search_username=*', function(d) {
        for (var a = $('option', d), i = 0, j = a.length, str = ''; i < j; i++) {
          str += '@"' + $(a[i]).text() + '" ';
        }

        editor.insertText(str);
      });
    };

    $.sceditor.command.set('tagall', {
      exec : tagAll,
      txtExec : tagAll,
      tooltip : 'Tag all members'
    });

    toolbar += '|tagall';
  }

  'par ange tuteur';
});
Save the script and it'll add a new button to the editor. Clicking the button will add all member names to the editor. If you want this to be both for mods and admins, remove " == 1" from
Code:
_userdata.user_level == 1
.


Depending on what you want and what forum version you're using, use the following CSS rule(s) to give the button an icon.

FA Edge :
Code:
.sceditor-button-tagall:after {
  content:"\f1fa";
}

Forumotion default versions :
Code:
.sceditor-button-tagall div {
  background-image:url(IMAGE_URL) !important;
}
avatar
Guest
Guest
View all awards

PostGuest on Mon 19 Dec 2016, 13:30

You see... it IS possible after all! You're a genius @Ange Tuteur! It's even pushing out the tag notifications. Perfect. Just a small question:

On Edge, we've got just 2 users on our Edge test site. When sending the test message I saw there's a mention for each member. Is it possible to hide them or even better, to have it replaced with a standard text, say @All ?
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4698
Points : 9540
Reputation : 2337
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Mon 19 Dec 2016, 13:38

Yeah it should be possible. Try using the script below instead :
Code:
$(function() {
  if (_userdata.user_level == 1 && $.sceditor && toolbar) {
    var tagAll = function() {
      var editor = this;
 
      $.get('/search?mode=searchuser&fieldname=username&search_username=*', function(d) {
        for (var a = $('option', d), i = 0, j = a.length, str = ''; i < j; i++) {
          str += '@"' + $(a[i]).text() + '" ';
        }
 
        editor.insertText('[table class="tag-all"][tr][td]' + str + '[/td][/tr][/table]');
      });
    };
 
    $.sceditor.command.set('tagall', {
      exec : tagAll,
      txtExec : tagAll,
      tooltip : 'Tag all members'
    });
 
    toolbar += '|tagall';
  }
 
  'par ange tuteur';
});

document.write('<style>.tag-all { font-size:0; } .tag-all, .tag-all * { display:inline; } .tag-all:before { content:"@All"; font-size:12px; } .tag-all * { display:none; }</style>');
avatar
Guest
Guest
View all awards

PostGuest on Mon 19 Dec 2016, 13:56

Ahhh... le 'display nun' et la 'table' (dinneur for Deux) Laughing seu easy ... Wink

Sank Hugh and you hit perfection lol!

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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