Wrighty
Code Helper
[Sj1:0]
Posts: 6
Wrighty said 0 great things
|
Post by Wrighty on Nov 24, 2009 21:32:33 GMT -8
W - Paste the code, I'll take a look at it for you!
|
|
|
Post by tunescool on Nov 26, 2009 14:34:08 GMT -8
i wanna keep the search, get rid of support, and organized by date in the thread title. and hyperlinked threads. studio zeros database doesnt have scrollbar. but the height of the page changes along with the content, i like that and would want that. that problem with the top bar came back, i think it has to have something to do with the div todge put around my forum, it screwed up the way my forum is in my browser too, i have to have my window open wider, but the div does a hell of a difference for smoother loading. celebnook.proboards.com/index.cgi?board=celebsam&action=display&thread=2403<style type="text/css"> <!-- #sideC { width: 25% } #mainC { width: 75% } #side, #main { height: 950px } .head, #side, #main { border: 1px solid #0000DD } .head, #side, #main { padding: 3px } .dhr { width: 75% } .head { border-bottom-width: 0px } #side, #head1 { border-right-width: 0px } #tablelink1 { color: #000000; } #head1 { color: #000000; } --> </style> <center id="dbase" style="display: none"> <div style="width: 92%; text-align: center"> <div class="titlebg" id="head1" style="float: left; width: 65%"><div class="head" id="head1">Celebs T Thru Z Archives</div></div> <div class="titlebg" style="float: right; width: 35%"> <div class="head" style="text-align: right; font-weight: normal"> <a href="javascript: execViewContributors()" id="tablelink1">View Posters</a> | <a href="javascript: execSearch()" id="tablelink1">Search</a> | <a href="javascript: execSupport()" id="tablelink1">Support</a> </div> </div> <div id="sideC" style="clear: both; float: left"> <div id="side" class="windowbg2"></div> </div> <div id="mainC" style="float: right"> <div id="main" class="windowbg" style="overflow: auto"> Welcome to the Archives <br /><br /> </div> </div> </div> <div style="clear: both"><br /><br /></div> </center> <div id="dclear">
<script type="text/javascript"> <!-- // Directory Script Version 2.0
var thread = "2403"; var resources = [ ["Alexis Bledel", [ ["Whitney Contemparies June 17th 2009", "1825", "tunes.cool", "admin"], ["Envy Magazine July 2009", "1843", "tunes.cool", "admin"], ["George Holz Photoshoot For Seventeen", "1050", "tunes.cool", "admin"], ["Karina Taira Photoshoot", "1051", "tunes.cool", "admin"], ["Resource Name", "00000000", "Contributor Displayname", "Contributor Username"] ]], ["Alicia Silverstone", [ ["Beach Malibu September 5th 2009", "1870", "tunes.cool", "admin"], ["West Hollywood 9/4/09", "1871", "tunes.cool", "admin"], ["Resource Name", "00000000", "tunes.cool", "admin"] ]], ["Ali Larter", [ ["Heroes Set July 8th 2009", "1927", "tunes.cool", "admin"], ["Resource Name", "00000000", "Contributor Displayname", "Contributor Username"], ["Resource Name", "00000000", "Contributor Displayname", "Contributor Username"] ]], ["Alyssa Milano", [ ["Chelsea FC Inter Milan July 21 2009", "1122", "tunes.cool", "admin"], ["Fifth Annual Dream Bowling 7/23/09", "1135", "tunes.cool", "admin"], ["Resource Name", "00000000", "tunes.cool", "admin"] ]] ]; resources.total = 0; if(location.href.match(new RegExp("action=display.+thread=" + thread))) { var contributors = ["", []], database = [ document.getElementById("head1").firstChild, document.getElementById("side"), document.getElementById("main") ]; for(var i in resources) if(!isNaN(i)) { resources[i][1].sort(); database[1].innerHTML += "<div style='clear: both'><div style='float: left; width: 80%'><a href='javascript: execCategory(" + i + ")'>" + resources[i][0] + "</a></div><div style='float: right; width: 20%; text-align: right'>" + resources[i][1].length + "</div></div>"; for(var e in resources[i][1]) { if(!contributors[0] || resources[i][1][e][3].match(contributors[0]) != resources[i][1][e][3]) { contributors[0] += contributors[0] ? "|" + resources[i][1][e][3] : resources[i][1][e][3]; contributors[1][resources[i][1][e][3]] = [resources[i][1][e][2], resources[i][1][e][3], 0, []]; for(var x in resources) if(!isNaN(x)) contributors[1][resources[i][1][e][3]][3].push([]); } contributors[1][resources[i][1][e][3]][2] ++; contributors[1][resources[i][1][e][3]][3][i].push([resources[i][1][e][0], resources[i][1][e][1]]); }; resources.total += resources[i][1].length; }; database[0].innerHTML += " - " + resources.total; document.getElementById("dbase").style.display = ""; document.getElementById("dclear").style.display = "none"; function execCategory(a) { var newHTML = "<div><div style='float: left'>" + resources[a][0] + ": " + resources[a][1].length + "</div><div style='float: right'><a href='" + location.href.split(thread)[0] + thread + "&category=" + a + "'>Link To A-M Archives</a></div></div><div style='clear: both' class='dhr'><br /><hr /></div>"; for(var i in resources[a][1]) { newHTML += "<div style='clear: both'><div style='padding-left: 15px; float: left'>" + (i - -1) + ". <a href='" + location.href.split(thread)[0] + resources[a][1][i][1] + "'>" + resources[a][1][i][0] + "</a></div><div style='float: right; width: 50%; text-align: left'><a href='javascript: execContributor(\"" + resources[a][1][i][3] + "\")'>" + resources[a][1][i][2] + "</a></div></div>"; }; database[2].innerHTML = newHTML; } function execContributor(a) { var newHTML = ""; for(var i in contributors[1][a][3]) { if(contributors[1][a][3][i].length) { newHTML += "<div>" + resources[i][0] + "</div>"; } else { continue; } for(var e in contributors[1][a][3][i]) newHTML += "<div style='padding-left: 15px'>" + (e - -1) + ".) <a href='" + location.href.split(thread)[0] + contributors[1][a][3][i][e][1] + "'>" + contributors[1][a][3][i][e][0] + "</a></div>"; }; database[2].innerHTML = "<div><div style='float: left'>" + contributors[1][a][0] + "'s Scripts: " + contributors[1][a][2] + " (<a href='/index.cgi?action=viewprofile&user=" + a + "'>View Profile</a>)</div><div style='float: right'><a href='" + location.href.split(thread)[0] + thread + "&contributor=" + a + "'>Link to directory</a></div></div><div style='clear: both' class='dhr'><br /><hr /></div>" + newHTML; } function execViewContributors() { var total = 1, newHTML = "<div><div style='float: left'>Contributors: " + contributors[0].split("|").length + "</div><div style='float: right'><a href='" + location.href.split(thread)[0] + thread + "&contributors'>Link to directory</a></div></div><div style='clear: both' class='dhr'><br /><hr /></div>"; for(var i in contributors[1]) { newHTML += "<div style='clear: both'><div style='padding-left: 15px; float: left'>" + (total ++) + ". <a href='javascript: execContributor(\"" + contributors[1][i][1] + "\")'>" + contributors[1][i][0] + "</a></div><div style='float: right; width: 50%; text-align: left'>" + contributors[1][i][2] + "</div></div>"; }; database[2].innerHTML = newHTML; } function execCheck(a) { for(var e = 1, x = a.getElementsByTagName("input"); x[e]; e ++) { x[e].checked = x[0].checked; } } function execSearch() { var newHTML = "<form name='dirsearch' onsubmit='execSearch2(this.lastChild); return false'><input name='query' type='text' /> <input type='submit' value='Search!' /><div style='margin-left: 15px'><input type='checkbox' onclick='execCheck(this.parentNode)' /><br />"; for(var i in resources) if(!isNaN(i)) { newHTML += "<input type='checkbox' /> " + resources[i][0] + "<br />"; }; database[2].innerHTML = newHTML + "</div></form>"; } function execSearch2(a) { if(!document.dirsearch.query.value) return false; var total = 1, newHTML = ""; for(var e = 1, x = a.getElementsByTagName("input"); x[e]; e ++) if(x[e].checked) for(var f in resources[e - 1][1]) { if(resources[e - 1][1][f][0].match(new RegExp(document.dirsearch.query.value, "i"))) { newHTML += "<div style='clear: both'><div style='padding-left: 15px; float: left'>" + (total ++) + ".) <a href='" + location.href.split(thread)[0] + resources[e - 1][1][f][1] + "'>" + resources[e - 1][1][f][0] + "</a></div><div style='float: right'><a href='execContributor(\"" + resources[e - 1][1][f][3] + "\")'>" + resources[e - 1][1][f][2] + "</a></div></div>"; } }; database[2].innerHTML = database[2].innerHTML = (newHTML ? "<div>Search results for <i>" + document.dirsearch.query.value + "</i>: " + (total - 1) + "</div><div style='clear: both' class='dhr'><br /><hr /></div>" + newHTML : "No matches found"); } function execSupport() { database[2].innerHTML = "<u>Browsing by Category</u><div style='padding-left: 15px'>You can browse for resources via category by clicking any of the links in the leftward menu. This directory is set up for easy-viewing with resource-name to the right, and creator to the left.</div><br /><u>Browsing by Contributor</u><div style='padding-left: 10px'>In addition to category-browsing, you may also navigate resources created only by certain persons. To do so, simply click any name provided within this directory.</div><br /><u>Searching the Directory</u><div style='padding-left: 10px'>If browsing is too tedious a task, why not have the resource come to you? Simply click the 'search' link to the top-right, type your query, select the categories you want searched, and go!</div>"; } if(location.href.match(new RegExp(thread + "&category=(\\d+)"))) execCategory(RegExp.$1); if(location.href.match(new RegExp(thread + "&contributor=(.+)"))) execContributor(RegExp.$1); if(location.href.match(new RegExp(thread + "&contributors"))) execViewContributors(); } //--> </script>
|
|
|
Post by tunescool on Dec 21, 2009 17:19:40 GMT -8
|
|