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.

Topic Title in Notifications bar/page

3 posters

Go down

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

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

http://www.canvastutorials.org/

Back to top Go down

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

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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
Valoish
Valoish
Forumember

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

http://www.canvastutorials.org/

Back to top Go down

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

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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?
Valoish
Valoish
Forumember

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

http://www.canvastutorials.org/

Back to top Go down

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:
TheCrow
TheCrow
Manager
Manager

Male Posts : 6898
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

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:
Valoish
Valoish
Forumember

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

http://www.canvastutorials.org/

Back to top Go down

Back to top

- Similar topics

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