Replacing "in a watched topic" with the topic's name in the toolbar
4 posters
Page 1 of 1
Replacing "in a watched topic" with the topic's name in the toolbar
Hello everyone,
This code will change the "in a watched topic" with the actual name of the topic. It should work on any forum version, as long as you have the toolbar activated. This code should be added with placement on all pages.
This code will change the "in a watched topic" with the actual name of the topic. It should work on any forum version, as long as you have the toolbar activated. This code should be added with placement on all pages.
- Code:
$(function(){
//by Wolfuryo
var i=0; // initialization for the for loop
if(!_userdata.activate_toolbar || !_userdata.session_logged_in) return; //no toolbar, no fun
/*Adding the name and some classes*/
_lang["Notif_topic_watch"] = "<a href=\"/u%(id)d\">%(name)s</a> wrote a message in <a href=\"/t%(topic_id)d-%(topic_name)s?nid=%(nid)s#%(post_id)d\" class='cl'>%(topic_name)s</a>";
_lang["Notif_topic_watch_p"] = "<a href=\"/u%(id)d\">%(name)s</a> wrote a message in <a href=\"/t%(topic_id)dp%(start)d-%(topic_name)s?nid=%(nid)s#%(post_id)d\" class='cl'>%(topic_name)s</a>";
_lang["Notif_topic_watch_guest"] = "A guest wrote a message in <a href=\"/t%(topic_id)d-%(topic_name)s?nid=%(nid)s#%(post_id)d\" class='cl'>%(topic_name)s</a>";
_lang["Notif_topic_watch_p_guest"] = "A guest wrote a message in <a href=\"/t%(topic_id)dp%(start)d-%(topic_name)s?nid=%(nid)s#%(post_id)d\" class='cl'>%(topic_name)s</a>";
$("body").on("DOMNodeInserted", ".cl", function(){ //The notification is created
$(this).text($(this).text().replace(/-/g, " ")).removeClass("cl").addClass("cd"); //remove some stuff
})
})
Guest- Guest
Re: Replacing "in a watched topic" with the topic's name in the toolbar
Also, as another note, I'm 100% sure there is already a tutorial for this function in the Tricks and Tips section.
Re: Replacing "in a watched topic" with the topic's name in the toolbar
i believe you mean this https://help.forumotion.com/t137560-title-of-watched-topics-in-notifications?highlight=watchedDraxion wrote:Also, as another note, I'm 100% sure there is already a tutorial for this function in the Tricks and Tips section.
Re: Replacing "in a watched topic" with the topic's name in the toolbar
I haven't noticed that tutorial. A mod should send this to trash, as that tutorial is better.
Guest- Guest
Re: Replacing "in a watched topic" with the topic's name in the toolbar
Since to the garbage as requested.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Toolbar Suggestion: Name of thread instead of "In a watched Topic"
» how to customized links in toolbar, and translation, change the "in a watched topic" link and preview of pm's in notifications??
» Email notifications Watched Topics
» Watched Topics
» Watched Topics
» how to customized links in toolbar, and translation, change the "in a watched topic" link and preview of pm's in notifications??
» Email notifications Watched Topics
» Watched Topics
» Watched Topics
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum