Acest tabel are un cod in parte pentru fiecare versiune, sper sa va placa
Pentru Invision:
Cod:
function tttf(n) {
var tables = document.getElementById("main-content").getElementsByTagName("table")[n].parentNode;
document.getElementById("ttid").innerHTML = tables.innerHTML;
}
$(function() {
if (location.pathname=="/forum" || location.pathname=="/") {
var tables = $(".index-box").get();
var tf = document.getElementById("main-content");
var ttab = document.createElement("ul");
ttab.setAttribute("id","ttcl");
for (i=0; i<tables.length; i++) {
tables[i].parentNode.style.display="none";
ttab.innerHTML += "<li><a href='javascript:void(0);' onclick='tttf(" + [i] + ")'>" + tables[i].previousSibling.childNodes[0].innerHTML + "</a></li>";
tf.parentNode.insertBefore(ttab,tf);
}
var tl = document.createElement("div");
tl.innerHTML = "<div id='ttid'>Click mai sus pentru a deschide categoriile</div>";
tf.parentNode.insertBefore(tl,tf);
}
});
Phpbb2:
Cod:
function tttf(n) {
var tables = $("#page-body table.forumline")[n];
document.getElementById("ttid").innerHTML = "<table class='forumline' width='100%' cellspacing='1' cellpadding='0' border='0'>" + tables.innerHTML + "</table>";
}
$(function() {
if (location.pathname=="/forum" || location.pathname=="/") {
var tables = $("#page-body table.forumline").get();
var tf = document.getElementById("page-body");
var ttab = document.createElement("ul");
ttab.setAttribute("id","ttcl");
for (i=0; i<tables.length; i++) {
if (i==tables.length-1) {
break;
}
tables[i].style.display="none";
ttab.innerHTML += "<li><a href='javascript:void(0);' onclick='tttf(" + [i] + ")'>" + document.getElementById('page-body').getElementsByTagName('h2')[i].innerHTML + "</a></li>";
tf.parentNode.insertBefore(ttab,tf);
}
var tl = document.createElement("div");
tl.innerHTML = "<div id='ttid'>Click mai sus pentru a deschide categoriile</div>";
tf.parentNode.insertBefore(tl,tf);
}
});
Phpbb3:
Cod:
function tttf(n) {
var tables = $("#main-content .forabg")[n];
document.getElementById("ttid").innerHTML = "<div class='forabg'>" + tables.innerHTML + "</div>";
}
$(function() {
if (location.pathname=="/forum" || location.pathname=="/") {
var tables = $(".forabg").get();
var tf = document.getElementById("main-content");
var ttab = document.createElement("ul");
ttab.setAttribute("id","ttcl");
for (i=0; i<tables.length; i++) {
tables[i].style.display="none";
ttab.innerHTML += "<li><a href='javascript:void(0);' onclick='tttf(" + [i] + ")'>" + tables[i].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].innerHTML + "</a></li>";
tf.parentNode.insertBefore(ttab,tf);
}
var tl = document.createElement("div");
tl.innerHTML = "<div id='ttid'>Click mai sus pentru a deschide categoriile</div>";
tf.parentNode.insertBefore(tl,tf);
}
});
PunBB:
Cod:
function tttf(n) {
var tables = document.getElementById("main-content").getElementsByTagName("table")[n].parentNode;
document.getElementById("ttid").innerHTML = tables.innerHTML;
}
$(function() {
if (location.pathname=="/forum" || location.pathname=="/") {
var tables = document.getElementById("main-content").getElementsByTagName("table");
var tf = document.getElementById("main-content");
var ttab = document.createElement("ul");
ttab.setAttribute("id","ttcl");
for (i=0; i<tables.length; i++) {
tables[i].parentNode.style.display="none";
tables[i].parentNode.previousSibling.style.display="none";
ttab.innerHTML += "<li><a href='javascript:void(0);' onclick='tttf(" + [i] + ")'>" + tables[i].parentNode.previousSibling.childNodes[0].childNodes[0].innerHTML + "</a></li>";
tf.parentNode.insertBefore(ttab,tf);
}
var tl = document.createElement("div");
tl.innerHTML = "<div id='ttid'>Click mai sus pentru a deschide categoriile</div>";
tf.parentNode.insertBefore(tl,tf);
}
});
Si in CSS:
Cod:
#ttcl {
display: block;
list-style-type: none;
margin: 10px 0px 10px 0px;
}
#ttcl li {
display: inline;
padding: 5px;
margin: 0px 0px 0px 5px;
background: #FFFFFF;
border-radius: 5px;
border: 1px solid #000000;
}
#ttid {
display: block;
background: #FFFFFF;
border-radius: 5px;
border: 1px solid #000000;
padding: 5px;
margin: 5px;
}
VizitatoDum 21 Oct - 16:40