We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ ! ] ZetaBoards Quick Find Code
Topic Started: Dec 10 2013, 01:49 PM (569 Views)
ValorNET
Member Avatar
ZetaMember
[ * ]
Can anyone make a ZetaBoards conversion for this code?

http://if.invisionfree.com/topic/5075650/1

Reid
 

This topic has been moved from our official support board.

Originally posted by: Qonqueror
[CODE
 
Jump to Topic (=RuneScape Quick-Find-Codes); An easy but useful code]Code Name: Jump To Topic / Runescape QFC
Description: Just like the RuneScape Quick-find-code system, at the bottom of every topic a number is displayed. When you type the number of that topic in a box above the board, you go to that topic. Just try out the preview :P
Preview of it in Use: [Clicky]
Code:
Header & Body
 
<form name="input" action="http://zXX.invisionfree.com/BoardName/index.php" method="get">Go to Topic: <input type="text" name="showtopic" size="6" class="forminput"> <input type="submit" value="Go" class="forminput"></form>

Below <% BOARD %>
 
<script type="text/javascript">
if(location.href.match(/showtopic=(\d+)/i)!=null){
document.write("<center>Topic ID: " + RegExp.$1 + "</center>");
}
</script>

The green text should match your board's details
The red text should be replaced with the text you want in front of the Jump To-box
The blue text should be what you want in front of the topic number


Big thanks to Slayer766 for helping me with this code.
Also, if you want the RuneScape version, here are the codes:
Quote:
 
<div align="right"><form name="input" action="http://zXX.invisionfree.com/BoardName/index.php" method="get"><font color="#808080">Jump to Thread: </font><input type="text" name="showtopic" size="6" class="rsinput"> <input type="submit" value="Go" class="rsinput"></form></div>

Below <% BOARD %>
 
<script type="text/javascript">
if(location.href.match(/showtopic=(\d+)/i)!=null){
document.write("<center><font color='#808080' size='2'>Quick find code: " + RegExp.$1 + "</font></center>");
}
</script>

CSS (!)
 
.rsinput { background-color: #000000; color: #FFFFFF }


EDIT: i've updated the code to match the skins forminput layout.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Above the Board
Code:
 
<div style="margin: 10px; text-align: right">
Jump to topic: <input type="text" name="to_topic" /> <button type="button">Submit</button>
</div>

<script type="text/javascript">
//<![CDATA[
$('input[name="to_topic"]').next('button').click(function () {
var tID = $(this).prev('input[name="to_topic"]').val();
window.location.href = main_url + 'topic/' + tID + '/1/';
});
//]]>
</script>
Offline Profile Goto Top
 
ValorNET
Member Avatar
ZetaMember
[ * ]
Thanks Cory, the input works flawlessly.
I'm not seeing the second part of this code though, where it displays the "QFC/Forum ID" under the thread you're in.
Code:
 
<script type="text/javascript">
if(location.href.match(/showtopic=(\d+)/i)!=null) {
document.write("<center><font color='#808080' size='2'>Quick Find Code: "+RegExp.$1+"</font></center>");}
</script>
I realize that's the old one, but even when I changed "/showtopic" to just "/topic", the script yields nothing at the bottom of the current thread.
Also, I don't get what the variable "+RegExp.$1+" is even referencing - is "if(location.href.match(/showtopic=(\d+)/i)!=null)" the regular expression?
I'll keep messing with it, maybe I'll figure it out myself, maybe not. Thanks for your help and contributions to the ZB community.

*I'm also trying to get the QFC to ONLY show up if you're in a /forum or /topic page, using styles.
Code:
 
<script type="text/javascript">
if (location.href.match(/topic\=/gi)) || (location.href.match(/forum)) {
document.write("<style>.QFC {display:block}</style>");}
else {
document.write("<style>.QFC {display:none}</style>");}
</script>
I'm such a noob. I feel like I should be able to do this all myself. Haven't coded any JS in awhile (years).

Edited by ValorNET, Dec 14 2013, 08:43 PM.
Offline Profile Goto Top
 
Moonface
Member Avatar


This request has gone a lengthy period of time without any new activity, therefore it is being marked as expired. This means that the request was typically too time-consuming or irritating for coders (who provide this service voluntarily in their free time) to complete.

Thank you.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic