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.

Notification widget in all pages

3 posters

Go down

Solved Notification widget in all pages

Post by Lady Loki 11/6/2015, 18:17

Hi! It's me again.
I installed in one of my forums the code from this topic: https://help.forumotion.com/t139188-notifications-without-displaying-toolbar#944510 
It works perfectly but only on the index page. When I move to other parts of the forum the notifications disappear. I mean, the widget stays in its place but the list of notifications don't show up.
Can anyone help me to make it work? Thanks!
Lady Loki
Lady Loki
Forumember

Female Posts : 28
Reputation : 2
Language : English, Spanish

http://alternate-universe.foroactivo.mx

Back to top Go down

Solved Re: Notification widget in all pages

Post by SLGray 11/6/2015, 22:03

Do you have notifications when you load other pages?


JavaScript - Notification widget in all pages 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 : 51489
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: Notification widget in all pages

Post by Lady Loki 12/6/2015, 01:28

@SLGray No, the notifications don't show up when I load other pages. 
It works in the index
Spoiler:
But it doesn't when I go to a subforum, topic or anywhere else.
Spoiler:
Lady Loki
Lady Loki
Forumember

Female Posts : 28
Reputation : 2
Language : English, Spanish

http://alternate-universe.foroactivo.mx

Back to top Go down

Solved Re: Notification widget in all pages

Post by SLGray 12/6/2015, 06:41

Do you go to the other page after checking the notifications?


JavaScript - Notification widget in all pages 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 : 51489
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: Notification widget in all pages

Post by Lady Loki 12/6/2015, 07:06

@SLGray Check as in click the link of "Private Message", for example? No, I don't. 
I sent myself a PM while I was on a subforum to see if it would show up. Instantly appeared the notification/pop-up in the top right corner (the one that disappears after a little while) but nothing on the widget. Just in case, I didn't click anything on the widget (except for the scrollbar) or the pop-up.

If it helps, the toolbar is still there, hidden with CSS (margin-top: -30px).
Lady Loki
Lady Loki
Forumember

Female Posts : 28
Reputation : 2
Language : English, Spanish

http://alternate-universe.foroactivo.mx

Back to top Go down

Solved Re: Notification widget in all pages

Post by SLGray 12/6/2015, 07:12

Did you use the phpBB 3 version?


JavaScript - Notification widget in all pages 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 : 51489
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: Notification widget in all pages

Post by Lady Loki 12/6/2015, 07:16

Yes, that's the one I'm using.
Lady Loki
Lady Loki
Forumember

Female Posts : 28
Reputation : 2
Language : English, Spanish

http://alternate-universe.foroactivo.mx

Back to top Go down

Solved Re: Notification widget in all pages

Post by SLGray 12/6/2015, 07:19

Have you checked your browser's console for any errors?


JavaScript - Notification widget in all pages 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 : 51489
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: Notification widget in all pages

Post by Lady Loki 12/6/2015, 07:45

Checked that and as far as I know, there are no errors. Tried it on a different forum and still nothing. 
But while I was installing it I found this line:
Code:
   "if (_pathName == '/portal' || _pathName == '/forum' || _pathName == '/')" 
I really don't know anything about jQuery so if you could help I'd be really, really grateful!
Lady Loki
Lady Loki
Forumember

Female Posts : 28
Reputation : 2
Language : English, Spanish

http://alternate-universe.foroactivo.mx

Back to top Go down

Solved Re: Notification widget in all pages

Post by SLGray 12/6/2015, 07:48

Do you have other JavaScripts?


JavaScript - Notification widget in all pages 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 : 51489
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: Notification widget in all pages

Post by Lady Loki 12/6/2015, 07:51

Nope, only that one.
Lady Loki
Lady Loki
Forumember

Female Posts : 28
Reputation : 2
Language : English, Spanish

http://alternate-universe.foroactivo.mx

Back to top Go down

Solved Re: Notification widget in all pages

Post by Niko 12/6/2015, 13:34

Hello @Lady loki,

the line
Code:
if (_pathName == '/portal' || _pathName == '/forum' || _pathName == '/') {

tells you that the script code can be executed only if the variable pathName (the page you are in) is /portal or /forum or /.. I'd suggest to replace:
Code:
_pathName == '/portal' || _pathName == '/forum' || _pathName == '/'

with:
Code:
_pathName == _pathName

Idea this way the condition will always be true and the #javascript code should be always executed Wink

Give a try :rose:
Niko
Niko
Helper
Helper

Male Posts : 3108
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: Notification widget in all pages

Post by Lady Loki 12/6/2015, 18:58

@Niko Hello! It works now!! Thank you very very much!!

Topic solved
Lady Loki
Lady Loki
Forumember

Female Posts : 28
Reputation : 2
Language : English, Spanish

http://alternate-universe.foroactivo.mx

Back to top Go down

Solved Re: Notification widget in all pages

Post by SLGray 12/6/2015, 20:43

Topic solved and archived


JavaScript - Notification widget in all pages 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 : 51489
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Back to top

- Similar topics

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