Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
New Topic Button
Topic Started: Aug 1 2008, 08:03 PM (1,247 Views)
Veritas
Member
[ * ]
I have a code to add the 'New Topic' Button on the View Topic Page but it only displays the text, not the actual 'New Topic' image. What is the problem? I also know it's been happening at some other boards aswell :-/

Code:
 
<script src='http://209.85.62.24/3/66/0/p544/newreplybutton.js'>
/* Add New Reply Button by Dennis @ support.zetaboards.com */
</script>
Edited by Veritas, Aug 1 2008, 08:04 PM.
Offline Profile Quote Post Goto Top
 
Dan T
Member Avatar
document.createElement("Alcohol")
[ *  * ]
here try this out

Quote:
 

<script type="text/javascript">
if(location.href.match(/\/topic\//i)){
var newtop = "IMG URL HERE"
var ilink = $(".topic-buttons a").eq(0).attr("href");
var newlink = ilink.split("?");
var newtype = ilink.split("&");

$(".topic-buttons a").before("<a href='"+newlink[0]+"?"+newtype [1]+"&mode=1&"+newtype [2]+"' style='margin-right:5px'><img src='"+newtop+"' alt='Make New Topic' /></a>");

}
</script>
Offline Profile Quote Post Goto Top
 
MONF
Member Avatar
Member
[ *  * ]
@Dan T: That works fine! :)
Offline Profile Quote Post Goto Top
 
Veritas
Member
[ * ]
That works amazingly :D Thanks so much Dan !


I just have one quick question and I don't want to sound like a pest, but, would it be possible for it to be a different button for each theme? We have 2 custom themes + the original and I wanted to keep all of the buttons seperate (i.e. have the "New Topic" button on ZB Original stay the original button but also have the custom buttons for the other themes)

Is that possible? If not, this is just great, thanks a bunch ^_^
Offline Profile Quote Post Goto Top
 
Dan T
Member Avatar
document.createElement("Alcohol")
[ *  * ]
i have no clue, its possible for sure. but technically code requests arent allowed on this board haha.
Offline Profile Quote Post Goto Top
 
Veritas
Member
[ * ]
lol Yeah, I know, I just didn't know if it was a quick edit :r :P

Thanks for your help though :)
Offline Profile Quote Post Goto Top
 
paintsn
Member
[ * ]
Dan T
Aug 15 2008, 12:58 PM
here try this out

Quote:
 

<script type="text/javascript">
if(location.href.match(/\/topic\//i)){
var newtop = "IMG URL HERE"
var ilink = $(".topic-buttons a").eq(0).attr("href");
var newlink = ilink.split("?");
var newtype = ilink.split("&");

$(".topic-buttons a").before("<a href='"+newlink[0]+"?"+newtype [1]+"&mode=1&"+newtype [2]+"' style='margin-right:5px'><img src='"+newtop+"' alt='Make New Topic' /></a>");

}
</script>
im sorry but where do place this at??

thank you
Offline Profile Quote Post Goto Top
 
Dan T
Member Avatar
document.createElement("Alcohol")
[ *  * ]
anywhere under the <!--Board -->
Offline Profile Quote Post Goto Top
 
monday100
Member
[ * ]
If you put it under that board atg thing, you would have to put that in each theme, so wouldn't you just put the button image url different for each theme?
Offline Profile Quote Post Goto Top
 
Dan T
Member Avatar
document.createElement("Alcohol")
[ *  * ]
you can put it in the board template instead of the theme layout.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Coding & Modifications · Next Topic »
Add Reply