For those who don't use the extension, this may not be as useful. But if you've been using it, you probably noticed the top floating bar covers a potion of your post title, author, etc when you click on any post target url, like form the index.
I know we all don't go there enough.. the phpBB FAQs page. For instance, click the FAQ topic here: Why Can't I Register, and in doing so, you will be directed to an anchor on the FAQs content page, for the specified FAQ. (You'll see what I mean, that is until Dmzx uses this fix!)
NOTICE how the page loads past the actual anchor topic you clicked or the Fixed Top Bar covers the anchored title. Creating confusion, forcing the user to scroll up or search.
This is an issue that has bothered me for a while, but never got around to.. here's the solution. Resulted to jQuery url detection.. I'm not that great with scripts but here goes..
---
Add the custom CSS for a new class 'adjust-anchor' (or name whatever you want)
Code: Select all
.adjust-anchor{ //keep both the same
padding-top: 55px;
margin-top: -55px;
}
Next, open the overall_footer_after.html from the Fixed Nav bar extension theme/template folder. OR, inject into your themes overall_footer.html below the <!-- EVENT overall_footer_after -->
Add after everything else Add these lines on a new blank line after the preceding line(s) to find
Code: Select all
<script type="text/javascript">
$(document).ready(function () {
if(window.location.href.indexOf("p=") > -1) { // post target links
window.scrollBy(0, -55);
}
if(window.location.href.indexOf("faq") > -1) { // FAQ page
$('.faq > dt').addClass('adjust-anchor');
}
});
</script>
This has been another nuke by yours truly!
