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.

Can't change Topic Name in Notifications.

2 posters

Go down

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

Post by RandomSil October 8th 2015, 10: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.
RandomSil
RandomSil
Forumember

Posts : 72
Reputation : 1
Language : English

http://www.nrlfantasyfanatics.com/

Back to top Go down

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, 1:25 am

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
Zed is Not Dead
Zed is Not Dead
Forumember

Posts : 257
Reputation : 28
Language : English

http://naruto-ld.forumotion.com/

Back to top Go down

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

Post by RandomSil October 9th 2015, 2:10 pm

Unfortunately even the new codes don't help me. I do appreciate the help though.
RandomSil
RandomSil
Forumember

Posts : 72
Reputation : 1
Language : English

http://www.nrlfantasyfanatics.com/

Back to top Go down

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, 2:55 pm

did you set the peramiters to be viewed on all pages?
Zed is Not Dead
Zed is Not Dead
Forumember

Posts : 257
Reputation : 28
Language : English

http://naruto-ld.forumotion.com/

Back to top Go down

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

Post by RandomSil October 9th 2015, 7:41 pm

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.
RandomSil
RandomSil
Forumember

Posts : 72
Reputation : 1
Language : English

http://www.nrlfantasyfanatics.com/

Back to top Go down

Back to top

- Similar topics

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