The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#17
|
|||
|
|||
![]()
Ok so did a little playing around and have come up with this kind of cheat solution to hide replies when other tabs are open using jquery...
Open postbit template and copy it to a text file and save it as you will need it later. headinclude template: Code:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script> $(document).ready(function(){ $('ul.tabs li').click(function(){ var tab_id = $(this).attr('data-tab'); $('ul.tabs li').removeClass('current'); $('.tab-content').removeClass('current'); $(this).addClass('current'); $("#"+tab_id).addClass('current'); // hide replies if other tabs clicked if($(this).index()) { $(".repliez").hide(); } else { $(".repliez").show(); } }); }); // end </script> Additional CSS: Code:
ul.tabs{ margin: 0px; padding: 0px; list-style: none; } ul.tabs li{ background: none; color: #222; display: inline-block; padding: 10px 15px; cursor: pointer; } .first { height:0!important; padding:0!important; } ul.tabs li.current{ background: #ededed; color: #222; } .tab-content{ display: none; background: #ededed; padding: 15px; } .tab-content.current{ display: inherit; } Top of postbit template (original): PHP Code:
End of postbit template (original) add: HTML Code:
<ul class="tabs"> <li class="tab-link current" data-tab="tab-1">Comments</li> <li class="tab-link" data-tab="tab-2">Discus</li> <li class="tab-link" data-tab="tab-3">Facebook</li> <li class="tab-link" data-tab="tab-4">Google</li> </ul> <div id="tab-1" class="tab-content first current"> </div> <div id="tab-2" class="tab-content"> Relevent content here. </div> <div id="tab-3" class="tab-content"> Relevent content here. </div> <div id="tab-4" class="tab-content"> Relevent content here. </div> <else /> Code:
$template_hook[postbit_start] <table class="tborder" Code:
$template_hook[postbit_start] <table class="tborder repliez" HTML Code:
</if>
and finally copy this all over to the end of original postbit template. So now you should have something like PHP Code:
|
3 благодарности(ей) от: | ||
Dr.CustUmz, greigeh, TheLastSuperman |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|