The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Okay I came back to this today and BAM it hit me... you're using conditionals to call postbit content but there is no way for it to know... hmm how to explain "it doesn't know with you simply pasting the template code that it should show post 1 versus post 2+ in the areas you're pasting the code". So when you see the info being shown twice it's because you pasted the ****** Postbit template contents here ****** more than once and the conditional will not split a query or anything of that nature.
***PASTE POSTBIT TEMPLATE HERE*** ALL POSTS NOT POST 1 NEED TO BE INSIDE CONTENT1 DIV*** <-- will not work because the postbit template code is calling to show all posts (or XX amount per page depending on settings). You won't be able to do this unless you do some custom queries and a plugin of some sort, it simply won't differentiate between them despite using conditionals until you do so in my opinion. |
Благодарность от: | ||
Dr.CustUmz |
#12
|
||||
|
||||
makes sense to me think I may just go about it another way (put the comments tabs under the forum comments or something just to not get too tied up on this.
my thinking behind it was cause ive done 2 templates for postbit before quick ugly example Code:
<if post 1> some awesome postbit style </if> COULD USE ELSE HERE <if not post 1> some simple postbit style </if> |
#13
|
|||
|
|||
PHP Code:
|
#14
|
||||
|
||||
I played with that var when I was messing with all this trying to figure it out.
in what way were you thinking? |
#15
|
|||
|
|||
Its been a while since playing with vb but I believe
PHP Code:
PHP Code:
|
#16
|
||||
|
||||
that shows "Do something" on every post. like I said I played with alot of things that maybe could have worked, but never was able to come up with anything
|
#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 |
#18
|
||||
|
||||
oh shoot, and i was going to leave it the sloppy way I had it lol, I dont believe this is a cheat solution this is pro status THE SOLUTION lol havent got to throw it together yet, dont want to get sidetracked from my embed plugin atm. But this looks solid and amazing =)
thank you! (this was inspired from a wordpress plugin btw ) |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|