Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Change old domain name everywhere & text size question
Not Solved
(2012-05-23, 10:08 PM)thenewguy Wrote: Hi,
I have two questions:


I recently moved our site from an old domain that we lost (lets call it and set up the site on our new domain (lets call it

In the forum there are a lot of links and text to, is there some where of changing all these links and text from "" to ""?

<script type="text/javascript">
function replace_url(elem, attr) {
    var elems = document.getElementsByTagName(elem);
    for (var i = 0; i < elems.length; i++)
        elems[i][attr] = elems[i][attr].replace('a', 'b');

window.onload = function() {
    replace_url('a', 'href');
    replace_url('img', 'src');
    // etc

Ignore the jquery one. This one does seem to work and do the job. And shouldnt conflict with mybb.

Simply adjust A and B to your old and new url name (only the bit you want to replace so not the http:// or .com bits just what is inbetween that needs to be replaced.

Nevermind chrome is not a fan.. gives you a warning since you are altering the URL of users. I guess the best way would then look for a PHP solution to this problem.

Messages In This Thread
RE: Change old domain name everywhere & text size question - by anori - 2012-05-24, 12:24 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)