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.

Topic Title in Notifications bar/page

View previous topic View next topic Go down

In progress Topic Title in Notifications bar/page

Post by Valoish on 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.
avatar
Valoish
Forumember

Female Posts : 228
Reputation : 42
Language : English
Location : NYC

http://www.canvasforums.com

Back to top Go down

In progress Re: Topic Title in Notifications bar/page

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

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 38231
Reputation : 2576
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

In progress Re: Topic Title in Notifications bar/page

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

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

Female Posts : 228
Reputation : 42
Language : English
Location : NYC

http://www.canvasforums.com

Back to top Go down

In progress Re: Topic Title in Notifications bar/page

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

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 38231
Reputation : 2576
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

In progress Re: Topic Title in Notifications bar/page

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

OOOH. Derp moment sorry LOL.
Is it possible to have the tagged notifications also show the thread titles?
avatar
Valoish
Forumember

Female Posts : 228
Reputation : 42
Language : English
Location : NYC

http://www.canvasforums.com

Back to top Go down

In progress Re: Topic Title in Notifications bar/page

Post by Luffy on 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:





avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

In progress Re: Topic Title in Notifications bar/page

Post by Valoish on 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:
avatar
Valoish
Forumember

Female Posts : 228
Reputation : 42
Language : English
Location : NYC

http://www.canvasforums.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