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.

(Javascript) condition: new private message

4 posters

Go down

Solved (Javascript) condition: new private message

Post by Niko Wed 21 May - 22:32

Hello

I would like to make a popup (not the forumotion one) appear when a member has a new private message

I have the toolbar active, but it seems that there are no variables concerning new private messages

Cna you help me? :rose:


Last edited by Niko! on Wed 21 May - 22:55; edited 1 time in total
Niko
Niko
Helper
Helper

Male Posts : 3100
Reputation : 244
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: (Javascript) condition: new private message

Post by SLGray Wed 21 May - 22:40

Members can set it in their profiles.


(Javascript) condition: new private message 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 : 51464
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: (Javascript) condition: new private message

Post by Ange Tuteur Wed 21 May - 22:43

Hello Niko,

Are you wanting to alert new toolbar notifications, or just private messages. If it's just private messages are you using the default navbar ?

Thank you for providing the needed information.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: (Javascript) condition: new private message

Post by Niko Wed 21 May - 22:45

this is what I'd like to have


if a member has a new private message, a customized html popup is shown thumleft


Thank you anyway, I managed to do it  Mr. Green  Lol  Mr. Green

Code:
$(window).load(function() {
  var pmnumber = document.getElementById("i_icon_mini_new_message").title.split(" ")[2];
if(Number(pmnumber) > 0 && _userdata["user_posts"] > 1){
      $('#fa_toolbar').before('HTML CONTENT HERE');
}
});
Niko
Niko
Helper
Helper

Male Posts : 3100
Reputation : 244
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: (Javascript) condition: new private message

Post by Sir Chivas™ Wed 21 May - 23:00

Thank you for providing the answer, Niko.

Topic Locked & Solved.
Sir Chivas™
Sir Chivas™
Helper
Helper

Male Posts : 6965
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Back to top


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