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:
Add Reply
Direct link to post in topic
Topic Started: Apr 21 2016, 01:07 PM (495 Views)
Joe
Member Avatar


Code name: Direct link to post in topic
Date created: 4/21/2016, tapped into what Moonface mentioned here.
Author(s): Joe
Description: This script puts a `Permalink` link next to the `Post #` link for posts in the topic view. The link goes to the specific post in the topic, not the individual post like the other link does.

Preview: Self explanatory.

`Board Template → Below the Board`.
Code: HTML
 
<script type="text/javascript">
$(function() {
if (location.href.indexOf('/topic') !== -1) {
$('td.c_postinfo span.right a').each(function() {
$this = $(this);
$this.after(' \u00b7 <a href="' + $.zb.stat.url + 'topic/' + +$this.attr("href").split("t=")[1] + '/findpost/' + +$this.attr("href").split("?p=")[1].split("&")[0] + '/" class="post-permalink">Permalink</a>');
});
}
});
</script>
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
This is already possible? http://support.zathyus.com/topic/5235173/1/#post18116650
Offline Profile Quote Post Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
Ferby
Apr 24 2016, 08:21 PM
That URL needs the page number

Joe's doesn't, so it finds it regardless of posts per topic page settings.

support.zathyus.com/topic/5146503/findpost/18071559
Edited by Quozzo, Apr 25 2016, 06:37 AM.
Offline Profile Quote Post Goto Top
 
Joe
Member Avatar


Exactly. As Quozzo said, this is just a nifty little trick that makes use of `/findpost/`, which I absolutely never knew existed. :P
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply