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

    Topic Title in Notifications bar/page

    Valoish
    Valoish
    Forumember


    Female Posts : 291
    Reputation : 54
    Language : English
    Location : NYC

    In progress Topic Title in Notifications bar/page

    Post by Valoish December 14th 2016, 9:17 pm

    Technical Details


    Forum version : #phpBB2
    Position : Founder
    Concerned browser(s) : Mozilla Firefox, Google Chrome, Internet Explorer, Opera
    Screenshot of problem : http://i.prntscr.com/8543daba1b034bb8b608eb799f958f80.png
    Who the problem concerns : All members
    When the problem appeared : Today
    Forum link : http://www.canvasforums.com

    Description of problem

    I used this tutorial to add the title of watched topics to both the notifications bar and the notifications page.
    However, some titles are showing up as "this topic" even though the same topic title showed up in the notifications before (See screenshot)
    Etoile Layouts V 4 and "this topic" are the same thread so I'm not too sure why it shows "this topic" when it showed the thread title right above it? This happens in both the toolbar and the notifications page.
    I've already cleared my browser's cache and it still does the same thing.
    SLGray
    SLGray
    Administrator
    Administrator


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

    In progress Re: Topic Title in Notifications bar/page

    Post by SLGray December 14th 2016, 9:24 pm

    I do not see a screenshot in the image link.  I see a document tree.



    Topic Title in Notifications bar/page Slgray10

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


    Female Posts : 291
    Reputation : 54
    Language : English
    Location : NYC

    In progress Re: Topic Title in Notifications bar/page

    Post by Valoish December 14th 2016, 9:59 pm

    @SLGray; That's weird o-o
    Hopefully this works: http://prntscr.com/djhr99
    SLGray
    SLGray
    Administrator
    Administrator


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

    In progress Re: Topic Title in Notifications bar/page

    Post by SLGray December 14th 2016, 10:02 pm

    The second notification is for tagging usernames.  The tutorial is for watched topics.



    Topic Title in Notifications bar/page Slgray10

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


    Female Posts : 291
    Reputation : 54
    Language : English
    Location : NYC

    In progress Re: Topic Title in Notifications bar/page

    Post by Valoish December 14th 2016, 10:09 pm

    OOOH. Derp moment sorry LOL.
    Is it possible to have the tagged notifications also show the thread titles?
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    In progress Re: Topic Title in Notifications bar/page

    Post by TheCrow December 15th 2016, 1:33 am

    Hey @Valoish,

    Try, based on the tutorial, if you installed both the codes, then add extra to the javascripts these parts in them:
    1st code:
    Code:
    $(function(){
      var middle_text = " tagged you in";
      var empty_title = "this topic";
      if(typeof(compileNotif)!="function")return;var d=compileNotif;Toolbar.compileNotif=compileNotif=function(b){var a=d(b);if(b.text.type==FA.Notification.NOTIF_TOPIC_WATCH){var c=a.match(/^(.*) tagged you in (<a href="\/t[0-9]+(p[0-9]+)?-([^#?"]*)[^"]+">)[^<]+<\/a>$/);c&&(b=c[1]+middle_text+c[2],a=c[4],a="topic"==a||/^[\s-]*$/.test(a)?empty_title:a.replace(/-/g," ").replace(/(^\s+|\s+$)/g,""),a=b+a+"</a>")}return a}
    });

    and if you installed the 2nd one which is optional, add this as well:
    Code:
    location.pathname=="/profile" && location.search.indexOf("page_profil=notifications")!=-1 && $(function(){
     
      var middle_text = " tagged you in ";
      var empty_title = "this topic";
     
      $('.table1 td:first-child,td.gen:first-child,.ipbtable td:first-child,.tcr .postdetails').each(function(){
        var a = $(this).html();
        var c = a.match(/^(.*) tagged you in (<a href="\/t[0-9]+(p[0-9]+)?-([^#?"]*)[^"]+">)[^<]+<\/a>$/);
        c&&(b=c[1]+middle_text+c[2],a=c[4],a="topic"==a||/^[\s-]*$/.test(a)?empty_title:a.replace(/-/g," ").replace(/(^\s+|\s+$)/g,""),$(this).html(b+a+"</a>"))
      });
     
    });

    This way you have this for the tagging as well. Or you can use any combined way you want. If they don't work both in the same javascript try making a new one to try it out. If this doesn't work let me know! Smile :rose:



    Topic Title in Notifications bar/page Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Valoish
    Valoish
    Forumember


    Female Posts : 291
    Reputation : 54
    Language : English
    Location : NYC

    In progress Re: Topic Title in Notifications bar/page

    Post by Valoish December 15th 2016, 1:43 am

    Hi @Luffy,

    I tried installing the first code, both in the same JS file and in a new one, and neither worked ><
    The second code for the Notifications page works fine c:

      Current date/time is November 11th 2024, 4:38 pm