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 June 11th 2015, 5:17 pm

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 June 11th 2015, 9:03 pm

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 June 12th 2015, 12:28 am

@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 June 12th 2015, 5:41 am

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 June 12th 2015, 6:06 am

@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 June 12th 2015, 6:12 am

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 June 12th 2015, 6:16 am

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 June 12th 2015, 6:19 am

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 June 12th 2015, 6:45 am

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 June 12th 2015, 6:48 am

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 June 12th 2015, 6:51 am

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 June 12th 2015, 12:34 pm

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 June 12th 2015, 5:58 pm

@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 June 12th 2015, 7:43 pm

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