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
2 posters

    Can't change Topic Name in Notifications.

    RandomSil
    RandomSil
    Forumember


    Posts : 72
    Reputation : 1
    Language : English

    Can't change Topic Name in Notifications. Empty Can't change Topic Name in Notifications.

    Post by RandomSil October 8th 2015, 12:44 pm

    So I followed this process in the following guide.

    https://help.forumotion.com/t137560-title-of-watched-topics-in-notifications

    I used both codes involved in separate scripts. Unfortunately it doesn't work as planned as it still only shows "In Topic" instead of the topic names.
    Zed is Not Dead
    Zed is Not Dead
    Forumember


    Posts : 257
    Reputation : 28
    Language : English

    Can't change Topic Name in Notifications. Empty Re: Can't change Topic Name in Notifications.

    Post by Zed is Not Dead October 8th 2015, 3:25 pm

    Hi there, I had issues with javascript as well, and it should be a quick and simple fix try copy and pasting these two codes in place of what you have.

    Code:
    $(function(){
      var middle_text = " replied to ";
      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(/^(.*) wrote a message (<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}
    });;




    Code:
    location.pathname=="/profile" && location.search.indexOf("page_profil=notifications")!=-1 && $(function(){
     
      var middle_text = " replied to ";
      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(/^(.*) wrote a message (<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>"))
      });
     
    });;



    what I did is add an ; at the end of each one, javascript is weird and demands a second ; at the end of the code to allow continuations, if this doesn't work perhaps @Ange Tuteur can help, but hopefully this helps
    RandomSil
    RandomSil
    Forumember


    Posts : 72
    Reputation : 1
    Language : English

    Can't change Topic Name in Notifications. Empty Re: Can't change Topic Name in Notifications.

    Post by RandomSil October 9th 2015, 4:10 am

    Unfortunately even the new codes don't help me. I do appreciate the help though.
    Zed is Not Dead
    Zed is Not Dead
    Forumember


    Posts : 257
    Reputation : 28
    Language : English

    Can't change Topic Name in Notifications. Empty Re: Can't change Topic Name in Notifications.

    Post by Zed is Not Dead October 9th 2015, 4:55 am

    did you set the peramiters to be viewed on all pages?
    RandomSil
    RandomSil
    Forumember


    Posts : 72
    Reputation : 1
    Language : English

    Can't change Topic Name in Notifications. Empty Re: Can't change Topic Name in Notifications.

    Post by RandomSil October 9th 2015, 9:41 am

    I did have it on all pages, however I was successful in doing so. The first code required an extra set of }));; at the end of the code after looking at the other code and realising it had that i thought to give it a shot.

    For anyone who sees this and is confused. Make the first code the following.

    Code:
    $(function(){
      var middle_text = " replied to ";
      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(/^(.*) wrote a message (<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}
    });;
    });;

    Topic is solved, however I have one other question. When in the notification bar it shows the thread names without capital letters. Is that possible to change?

    Again thank you very much for your help it is truly appreciated.

      Current date/time is September 22nd 2024, 11:28 am