Thursday, May 21, 2009

MyBB email notification customized

A user of my RouteConverter forum which is based on MyBB suggested to change the format of the email notifications the forum sends when a user replies to a thread you've been involved in.

By default, the forum sends emails with a fragment that looks like this:

To view the thread, you can go to the following URL:
http://www.routeconverter.de/forum/showthread.php?tid=338&action=newpost

If a thread spans more than one page, this can become annoying since you always have to skip forward to the latest posting of the thread. Now URLs like this are created:

http://www.routeconverter.de/forum/thread-347-post-2232.html#pid2232

Upon following this URL, you jump directly to the posting at the correct position on the page for which you have received the notification email.

To achieve this, modify forum-base-directory/inc/datahandlers/post.php and replace

get_thread_link($thread['tid'], '0', "newpost"))

in line 917 with

get_post_link($this->pid, $thread['tid']), $this->pid))

Voila!

No comments:

Datenschutz