[quote=biadab_hackerz]
Lima alias kaisar..
gw mau tanya nieh... gimana buat tombol...
hide menu n theme swict kayak profiles fs mu...
untuk ngubah ngubah layouts n laen laen nya[/quote]
[quote]/* THEME SWITCHER */
function getNode(divClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp("(^\s*|\s*$)" + divClass + "(\s|[\$]*?)");
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
var defaultCSS ="[b]url css[/b]";
var themeCSS1 ="[b]url css[/b]";
var themeCSS2 ="[b]url css[/b]";
var themeCSS3 ="[b]url css[/b]";
try {
document.write("<link rel='stylesheet' href='"+themeCSS1+"' title='1'>");
}catch(e){}
try {
document.write("<link rel='stylesheet' href='"+themeCSS2+"' title='2'>");
}catch(e){}
try {
document.write("<link rel='stylesheet' href='"+themeCSS3+"' title='3'>");
}catch(e){}
try {
document.write("<link rel='stylesheet' href='"+defaultCSS+"' title='defaultcss'>");
}catch(e){}
function ActivateCSS(title){
var i, link;
for (i = 0;(link = document.getElementsByTagName("link")[i]);i++){
if (link.getAttribute("rel") != - 1 && link.getAttribute("title")){
link.disabled = true;
if (link.getAttribute("title") == title) link.disabled = false;
}
}
}
var theme;
try {
theme = document.createElement("div");
}catch (e) {
theme = document.createElement("<div>");
}
theme.setAttribute("style","text-align:center;padding-top:5px");
theme.innerHTML = "<div align='center' id='themeswitch'>"+
"<h2><b><font face='courier new'size='4'color='yellow'>THEME SWITCH</font><b><h2>"+
" <input type='button' style='background-color:transparent!important;border-width:3px ;font-family:LEGERD;font-weight:bold;font-size:12;color:#FFFF00;' class='themeButton' value='[b]????[/b]' onClick=\"ActivateCSS('1'); return false;\">"+
" <input type='button' style='background-color:transparent!important;border-width:3px ;font-family:LEGERD;font-weight:bold;font-size:12;color:#FFFF00;' class='themeButton' value='[b]????[/b]' onClick=\"ActivateCSS('2'); return false;\">"+
" <input type='button' style='background-color:transparent!important;border-width:3px ;font-family:LEGERD;font-weight:bold;font-size:12;color:#FFFF00;' class='themeButton' value='[b]????[/b]' onClick=\"ActivateCSS('3'); return false;\">"+
" <input type='button' style='background-color:transparent!important;border-width:3px ;font-family:LEGERD;font-weight:bold;font-size:12;color:#FFFF00;' class='themeButton' value='[b]????[/b]' onClick=\"ActivateCSS('defaultcss'); return false;\"></div>";
document.getElementById("navigation").parentNode.appendChild(theme);[/quote]
ganti url css dgn css yg kmu ingin tampilkan di ef es
yg kode tanda tanya ganti dgn name tema apa saja yg sesuai dgn css
save dalam bentuk js
hide menu
[quote]function toggle(obj) {
var el = document.getElementById(obj);
if ( el.style.display != 'none' ) {
el.style.display = 'none';
}else {
el.style.display = '';
}
}
var showhide;
try {
showhide = document.createElement("div");
}catch (e) {
showhide = document.createElement("<div>");
}
showhide.setAttribute("style","text-align:center;padding-top:5px");
showhide.innerHTML = "<div align='center' id='showhide'>"+
"<h2><b><font face='Arial' size='4' color='#ff0000'>Show / Hide Menu</font><b></h2>"+
"<input type='button' value='Control Panel' onClick=\"javascript:toggle('content_controlpanel_1_1');\">"+
"<input type='button' value='Photos' onClick=\"javascript:toggle('content_photos_1_2');\">"+
"<input type='button' value='Blogs' onClick=\"javascript:toggle('content_blogs_1_3');\">"+
"<input type='button' value='Moreabout' onClick=\"javascript:toggle('content_moreabout_1_5');\">"+
"<input type='button' value='Comment' onClick=\"javascript:toggle('content_publiccomments_1_7');\">"+
"<input type='button' value='Media Box' onClick=\"javascript:toggle('content_scrapbook_1_8');\">"+
"<input type='button' value='Friends' onClick=\"javascript:toggle('content_friends_2_2');\">"+
"<input type='button' value='Fanof' onClick=\"javascript:toggle('content_fanof_2_4');\">"+
"<input type='button' value='Groups' onClick=\"javascript:toggle('content_groups_2_5');\"></div>";
document.getElementById("navigation").parentNode.appendChild(showhide);[/quote]
Last edited by lima (2007-09-21 09:05:15)