We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
System Message Name Change
Topic Started: Sep 18 2016, 03:36 PM (305 Views)
DaPizzaMan
Member Avatar
#TeamSupport

Code Name: System Message Name Change

What the code does: Changes the System Message "name" to whatever you want to call it. Here is one instance of the System Message text that would be replaced. Here is another instance.

How to use the code: Just change Admin and change 123 on these lines:
Code:
 
systemMessage.newName = 'Admin';
systemMessage.userID = '123';
to the name that you want to replace "System Message" with and with the user ID of the member you want to link the new name to.

How to install the code: Add the below code to Admin CP -> Board Template -> Above the Copyright.

Extra notes: This code was made in response to this request.
Code:
 
<script type="text/javascript">
var systemMessage = {};
$(function() {
systemMessage.newName = 'Admin';
systemMessage.userID = '123';
if (location.href.indexOf(main_url + 'msg/') !== -1) {
$('#pm_inbox tbody tr[class] td, #conversation td.c_postinfo span.left').each(function() {
var $this = $(this);
$this.html($this.html().replace(/system message/ig, '<a href="' + main_url + 'profile/' + systemMessage.userID + '/">' + systemMessage.newName + '</a>'));
});
}
$('#pmtoast strong').each(function() {
var $this = $(this);
$this.html($this.html().replace(/system message/ig, '<a href="' + main_url + 'profile/' + systemMessage.userID + '/">' + systemMessage.newName + '</a>'));
});
});
</script>
Offline Profile Quote Post Goto Top
 
Devourz
Member Avatar
Member
[ *  *  * ]
Cool code, although i have no use for it. :3
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply