The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Can't change Topic Name in Notifications.

View previous topic View next topic Go down

Can't change Topic Name in Notifications.

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

So I followed this process in the following guide.

http://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
Forumember

Posts : 34
Reputation : 1
Language : English

http://www.nrlfantasyfanatics.com/

Back to top Go down

Re: Can't change Topic Name in Notifications.

Post by Zed is Not Dead on 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

Zed is Not Dead
Forumember

Posts : 230
Reputation : 27
Language : English

http://fairytailonline-rp.forumotion.com/

Back to top Go down

Re: Can't change Topic Name in Notifications.

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

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

RandomSil
Forumember

Posts : 34
Reputation : 1
Language : English

http://www.nrlfantasyfanatics.com/

Back to top Go down

Re: Can't change Topic Name in Notifications.

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

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

Zed is Not Dead
Forumember

Posts : 230
Reputation : 27
Language : English

http://fairytailonline-rp.forumotion.com/

Back to top Go down

Re: Can't change Topic Name in Notifications.

Post by RandomSil on 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.

RandomSil
Forumember

Posts : 34
Reputation : 1
Language : English

http://www.nrlfantasyfanatics.com/

Back to top Go down

View previous topic View next topic Back to top


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