the codes are possibly obselete
[spoiler][quote][b][color=red]For educational purposes only.[/color][/b][/quote]
An alternative code for customize header names
I made a [b]simple code[/b] & now the code will easily manipulate the headers DOM structure instead using [b]('h2')[0], ('h2')[1][/b] & so on....
Use onload event the code to be execute for friends, fanof or groups
this is example to change the header names in controlpanel box
[quote]if (!attachOnLoadHandler(function() { REPLACEIT.init(); })) window.onload = function() { REPLACEIT.init(); };
if (typeof REPLACEIT == "undefined" || !REPLACEIT) { REPLACEIT = {}; }
(function() {
REPLACEIT = {
head: [],
init: function() {
REPLACEIT.head = REPLACEIT.getModuleByClassName(/controlpanel/i)[0].getElementsByTagName("h1")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";
},
getModuleByClassName: function(sClass) {
var elm = [];
var els = document.getElementsByTagName("*") || document.all;
for (var j = 0, k = els.length; j < k; j++) {
if (new RegExp(sClass).test(els[j].className)) elm.push(els[j]);
}
return elm;
}
};
})();[/quote]
to replace more header just add the code inside init function
<">[b]available headers[/b]
[quote]//Controlpanel Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/controlpanel/i)[0].getElementsByTagName("h1")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Photo Gallery Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/photos/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Blogs Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/blogs/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Reviews Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/reviews/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Moreabout Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/moreabout/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Publiccomments Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/publiccomments/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Media Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/scrapbook/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Friends Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/friends/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Fanof Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/fanof/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
[quote]//Groups Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/groups/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "[b]YOUR TITLE NAME[/b]";[/quote]
save into js extension --> [b][url=http://theftalk.com/t17783-Linker-%28IE6%2C-IE7%2C-Opera9%2B%29.html]JS Linker[/url][/b][/spoiler]
Last edited by feruzz (2008-06-17 11:29:29)