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.
The forum of the forums
3 posters

    Notification widget in all pages

    Lady Loki
    Lady Loki
    Forumember


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

    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!
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51499
    Reputation : 3523
    Language : English
    Location : United States

    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?



    Notification widget in all pages Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Lady Loki
    Lady Loki
    Forumember


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

    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:
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51499
    Reputation : 3523
    Language : English
    Location : United States

    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?



    Notification widget in all pages Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Lady Loki
    Lady Loki
    Forumember


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

    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).
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51499
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Notification widget in all pages

    Post by SLGray June 12th 2015, 6:12 am

    Did you use the phpBB 3 version?



    Notification widget in all pages Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Lady Loki
    Lady Loki
    Forumember


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

    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.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51499
    Reputation : 3523
    Language : English
    Location : United States

    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?



    Notification widget in all pages Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Lady Loki
    Lady Loki
    Forumember


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

    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!
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51499
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Notification widget in all pages

    Post by SLGray June 12th 2015, 6:48 am

    Do you have other JavaScripts?



    Notification widget in all pages Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Lady Loki
    Lady Loki
    Forumember


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

    Solved Re: Notification widget in all pages

    Post by Lady Loki June 12th 2015, 6:51 am

    Nope, only that one.
    Niko
    Niko
    Helper
    Helper


    Male Posts : 3235
    Reputation : 249
    Language : English, Italian, French
    Location : Italy

    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:
    Lady Loki
    Lady Loki
    Forumember


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

    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
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51499
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Notification widget in all pages

    Post by SLGray June 12th 2015, 7:43 pm

    Topic solved and archived



    Notification widget in all pages Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.

      Current date/time is September 24th 2024, 4:23 am