FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 15 users online :: 0 Registered, 0 Hidden and 15 Guests

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

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

View previous topic View next topic Go down

Anonymous
Guest
Guest

PostGuest 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
SLGray
SLGray
Valued Member
Gender : Male
Age : 51
Posts : 2465
Points : 7128
Reputation : 290
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray Sat 17 Dec 2016, 16:31

Do you mean something like this:
Code:
@{USERNAME}
Anonymous
Guest
Guest

PostGuest 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.
SLGray
SLGray
Valued Member
Gender : Male
Age : 51
Posts : 2465
Points : 7128
Reputation : 290
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray 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.
Anonymous
Guest
Guest

PostGuest 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.
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12035
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur 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 :
https://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;
}
Anonymous
Guest
Guest

PostGuest 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 ?
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12035
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur 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>');
Anonymous
Guest
Guest

PostGuest 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!
Sponsored content

PostSponsored content

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