Jump to content

"Auto Thread Tracker"
   (0 reviews)

Kit the Human
  • You can whack the user's subscribed threads into your wrapper, which makes it easier to see what needs replying to. Here's how.

     

    This script will also work with other forum software. However, if you're able to use PHP, I would use that.

     

    For other forums, just change the element that you're targeting:

     

    $("#thread-container").load("URL ELEMENT_TO_TARGET");

     

    Type: Javascript Software: Jcink

One of the things I find useful as both a staffer and a member is having a list of all my subscribed topics displayed on every page. This means I get an update on every thread whenever I log in and it means that I don’t need to manually keep a list updated.

 

In jcink, we can do this with load(). This is exactly as it implies, it lets you load information from another webpage. To mitigate server load (and prevent your site from getting in trouble for resource usage), we bind load to a button. This means that your user needs to click on the button to see their subbed threads.

 

Since this button only needs to be used by members, I hide it from guests to prevent curious visitors from making pointless requests of the server. I presume you know how to hide something based on usergroup, so I’ll focus on the code for the Auto Thread Tracker.

 

Put the following HTML where you want it.

<a href="#threads" id="button-tracker">Thread Tracker</a>
<div id="threads">
	<div id="thread-container">
	</div>
</div>

Put the following script just before the closing </body> in your board wrapper.

<script>
$(document).ready(function(){
	$("#button-tracker").click(function(){
		// first we prevent the page jump that happens when you have a hashtag in your link
		event.preventDefault();
		// now we load the good stuff
		$("#thread-container").load("https://kit89.jcink.net/index.php?act=UserCP&CODE=26 .tableborder > table > tbody > tr:not(:first-of-type)");
	});
});
</script>

Use CSS to hide the bits that you don’t want! For example:

div#thread-container tr:first-child,
div#thread-container tr:last-child,
div#thread-container tr td:first-child,
div#thread-container tr td:nth-child(3),
div#thread-container tr td:nth-child(4),
div#thread-container tr td:nth-child(6) {
	display: none
}

Will produce:

Capture.png

 

This is how it looks on my site!

 

Capture-1.png

 

I hope that this is for useful for someone! I find it very helpful for staying on top of my threads.


  • Like 1
  • Love 1



User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

There are no reviews to display.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.