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:
Locked Topic
[ C ] Harry Potter Language Change
Topic Started: Jul 8 2013, 05:37 PM (1,565 Views)
LillyHope
Member
[ * ]
Board Address: http://w11.zetaboards.com/Hogwarts_Academy/index/
Board Software: (ZetaBoards)
Description: (What you want your code to do)
I'm looking for a code that changes all the things to relevant Harry Potter terms like the Inbox would be Owlery ect. I found a code like this but I did not work


This was the code:


<script language=javascript>
<!--
function change(item,item2) {
var range = document.body.createTextRange();
range.collapse(true);
if (location.href.indexOf("action=") != -1 ) {
return false;
} else {
while (range.findText(item)) {
range.text=item2;
range.collapse(false);
}
}
}
change("inbox","Owlery");
change("my controls","Wizard Registration");
change("View New Posts","View new Corridors");
change("My Assistant" , "House Elf");
change("members","Wizards and Witches");
change("Forum led by","Ministry staff tending to here are");
change("search","Accio!");
change("calendar","House Bulletin Board");
change("latest news","Newset Decrees");
change("visit","apparation");
change("Topics","Corridors");
change("Replies","Howlers");
change("The moderating team","Ministry Staff");
change("Today's top 10 posters","Most active students");
change("Overall top 10 posters","Most honored students");
change("Board Statistics","Ministry Records");
change("Members","Wizards ");
change("Users","Wizards");
change("Mark all posts as read","Ignore all decrees");
change("Last Click","Last Spell");
change("Member Name","Wizard Name");
change("Posted:","decreed:")
change("Group:","House:")
change("Posts:","Howlers:")
change("Member No.:","Wizard No.:")
change("Joined:","Registered:")
change("Warn:","Send to detention:")
change("Attach New Poll","Ask Question")
change("Track this topic","Follow this thread")
change("Email this topic","Share with WWN")
change("Print this topic","Dupicate this topic")
change("Logged in as:","Registered as:")
change("Log In","Come back")
change("Register","Register with Ministry")
change("Resend Validation Email","Check Authorization")
change("Please wait while we Transfer You","Please wait: Apparation in progress")
change("View New Posts","View New Howlers")
change("Open","Allohamora")
// -->
</script>
Edited by LillyHope, Jul 8 2013, 05:43 PM.
Offline Profile Goto Top
 
Eccentric Feline
Member Avatar
梦想
[ *  *  *  *  *  *  *  * ]
A simple, code free solution would be to use filters in your Admin CP.

Go to: Admin CP > Board Customization > Filters

That way every time someone says "inbox" it would appear as "owlery".
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
For a board-wide text change, try this instead:
Code:
 
<script type="text/javascript">
//<![CDATA[
function changeText(oldText, newText) {
$("*").contents().each(function () {
var re = new RegExp(oldText, 'gi');
if (this.nodeType === 3) {
this.nodeValue = this.nodeValue.replace(re, newText);
}
});
}

changeText('OLD_TEXT', 'NEW_TEXT');
changeText('OLD_TEXT', 'NEW_TEXT');
changeText('OLD_TEXT', 'NEW_TEXT');
//]]>
</script>
Offline Profile Goto Top
 
LillyHope
Member
[ * ]
Okay thank you Cory! :) and thanks Eccentric feline I will suggest that to my other admin as well
Cory, it worked until I started adding more then 3 text changes then it isn't working. All I was doing was copying and pasting the part of the code with the old text and new text

Forget it, I fixed it! Thanks again :)
Edited by LillyHope, Jul 9 2013, 02:00 PM.
Offline Profile Goto Top
 
Eccentric Feline
Member Avatar
梦想
[ *  *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic