Welcome Guest [Log In] [Register]
Add Reply
blah
Topic Started: Dec 2 2007, 08:17 PM (278 Views)
Ken
Administrator
Code:
 

<script type="text/javascript">
/*************************
* Add "New Topic" button
* to Zetaboard's View Topic page.
* Pieced together by Dennis,
* with code and assistance
* from Ken, GenerationStudio
* and Chireru. Thanks guys.
**************************/

/*var newtopicimage = "http://z3.ifrm.com/static/1/t_newtopic.png";*/

if (location.href.match(/topic/i)) {
$(function(){
var xnum = $("#nav li a:last").attr("href").split("forum")[1].split("/")[1];
});
alert(xnum);
document.write("<iframe name='nftb' id='nftb' frameborder='0' src='" + main_url + "forum/" + xnum + "/' height='0' width='0' onload='newtopicbutton();'></iframe>");

function newtopicbutton(){
var bodi = window.frames['nftb'].document.getElementsByTagName("div");
for (b = 0; b < bodi.length; b++) {
if (bodi[b].className == "cat-button" && bodi[b].getElementsByTagName("a")[0].getElementsByTagName("img")[0].alt == "Make New Topic") {
$("div.topic-buttons").append("<a href='http://" + boardurl + "post/?type=1&mode=1&f=" + xnum + "'><img src='" + bodi[b].getElementsByTagName("a")[0].getElementsByTagName("img")[0].src + "' alt='Make New Topic' /></a>");
break;
}
}
}
}
</script>
Offline Profile Quote Post Goto Top
 
Ken
Administrator
Code:
 


<script type="text/javascript">
/*************************
* Add "New Topic" button
* to Zetaboard's View Topic page.
* Pieced together by Dennis,
* with code and assistance
* from Ken, GenerationStudio
* and Chireru. Thanks guys.
**************************/

var newtopicimage = "http://z3.ifrm.com/static/1/t_newtopic.png";

$(function(){if (location.href.match(/topic/i)){var xnum = $("#nav li a:last").attr("href").split("forum")[1].split("/")[1], boardurl=location.hostname+location.pathname.split("topic")[0];$("div.topic-buttons").append("<a href='http://" + boardurl + "post/?type=1&mode=1&f=" + xnum + "'><img src='" + newtopicimage + "' alt='Make New Topic' /></a>");}});
</script>
Offline Profile Quote Post Goto Top
 
Ken
Administrator
asdfasdfsf
Offline Profile Quote Post Goto Top
 
test

asfd
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · General Discussion · Next Topic »
Add Reply