The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[HUH?] if not first post display within first post
Im lost, cant get this one down.
So Im trying to do a tab thingy, and show posts that are not the first post in a tab. Code:
<if condition="$post[postcount] != 1"> so how can I get this to un contradict itself =/ heres what i have POSTBIT Code:
<if condition="$post[postcount] == 1"> POSTBIT TEMPLATE WOULD GO HERE? <div id="content1"> <if condition="$post[postcount] != 1"> PUT POSTS NOT POST 1 IN DIV - POSTBIT TEMPLATE WOULD GO HERE AGAIN BUT CONTRADICTS ITSELF </if> </div> <div id="content2"> more stuff to only show if post one </div> </if> Code:
<div id="posts">$postbits <if condition="$FIRSTPOSTID"> this has to be possible somehow =/ maybe im over thinking it |
#2
|
|||
|
|||
Are you sure $post['postcount'] can be used for that? I thought that stores the current postcount of the user.
|
#3
|
|||
|
|||
Can you not use defined <else conditions /> to get where you want to be?
|
#4
|
||||
|
||||
Quote:
Code:
$post[postcount] my if condition is not wrong, i just need a way to un-contradict myself, so i can show posts not post 1 within a div, in post 1... i think thats right lol, confussing myself now Quote:
hmmmm just an idea, tested - results 2 post down HTML Code:
<if condition="$post[postcount] == 1"> POSTBIT TEMPLATE HERE <div id="content1"> </if> <if condition="$post[postcount] != 1"> POSTBIT TEMPLATE AGAIN HERE </if> <if condition="$post[postcount] == 1"> </div> <div id="content2"> more stuff to only show if post one </div> </if> |
#5
|
||||
|
||||
Perhaps use one of the examples shown here:
https://vborg.vbsupport.ru/showpost....59&postcount=2 Of course remove the vb:if and make it vB3 compliant. Edit: Rough example IF max posts per page is set to 20 in admincp: Code:
<if condition="$post['postcount'] % $vboptions['maxposts'] == 19">YOUR CODE HERE</if> |
#6
|
||||
|
||||
ok, so that almost did it, but the page output is (relative to the example code I placed above)
Code:
POSTBIT TEMPLATE HERE <div id="content1"> </div> <div id="content2"> more stuff to only show if post one </div> POSTBIT TEMPLATE AGAIN HERE POSTBIT TEMPLATE AGAIN HERE POSTBIT TEMPLATE AGAIN HERE POSTBIT TEMPLATE AGAIN HERE POSTBIT TEMPLATE AGAIN HERE POSTBIT TEMPLATE AGAIN HERE should be inside div content1 hmmm...... beats me =( |
#7
|
||||
|
||||
Quote:
|
#8
|
||||
|
||||
Quote:
i guess i can spoil the addon and show you guys one sec ill include code --------------- Added [DATE]1462844841[/DATE] at [TIME]1462844841[/TIME] --------------- this would be the new postbit template: replace red text with def postbit code (just keeping it short) Code:
<if condition="$post[postcount] == 1"> ***PASTE POSTBIT TEMPLATE HERE*** <input id="tab1" type="radio" name="tabs" checked> <label for="tab1">Comments</label> <input id="tab2" type="radio" name="tabs"> <label for="tab2">Disqus</label> <input id="tab3" type="radio" name="tabs"> <label for="tab3">Facebook</label> <input id="tab4" type="radio" name="tabs"> <label for="tab4">Google+</label> <section id="content1"> </if> <if condition="$post[postcount] != 1"> ***PASTE POSTBIT TEMPLATE HERE*** </if> <if condition="$post[postcount] == 1"> </section> <section id="content2"> 2 </section> <section id="content3"> 3 </section> <section id="content4"> 4 </section> </if> what it returns in page *notice content1 is blank, then postbit repeats (those would be comments) at the end, i cut it cause it just keeps repeating for each comment. HTML Code:
<input id="tab4" type="radio" name="tabs"> <label for="tab4">Google+</label> <section id="content1"> </section> <section id="content2"> ... </section> <section id="content3"> ... </section> <section id="content4"> ... </section> <!-- END TEMPLATE: postbit --> </div> <!-- BEGIN TEMPLATE: spacer_close --> </div> </div> </div> <!-- / close content container --> <!-- END TEMPLATE: spacer_close --> <!-- / post #5 --> <!-- END TEMPLATE: postbit_wrapper --><!-- BEGIN TEMPLATE: ad_showthread_firstpost --> <!-- END TEMPLATE: ad_showthread_firstpost --><!-- BEGIN TEMPLATE: postbit_wrapper --> <!-- post #6 --> <!-- BEGIN TEMPLATE: spacer_open --> <!-- open content container --> <div align="center"> <div class="page" style="width:980px; text-align:left"> <div style="padding:0px 25px 0px 25px" align="left"> <!-- END TEMPLATE: spacer_open --> <div id="edit6" style="padding:0px 0px 6px 0px"> <!-- this is not the last post shown on the page --> <!-- BEGIN TEMPLATE: postbit --> LIVE: DEV ZONE |
#9
|
||||
|
||||
Mannnnnnnnnnn why'd you break my brain! This is so simple I think it's being over-complicated or perhaps some of your </if> positions are not correct... see this example:
Code:
<section id="content1"> </if> <if condition="$post[postcount] != 1"> ***PASTE POSTBIT TEMPLATE HERE*** </if> <if condition="$post[postcount] == 1"> </section> I'll have another look tomorrow, been coding my brains out today and now brain = pudding! This looks like a job for Tomorrow Man . |
Благодарность от: | ||
Dr.CustUmz |
#10
|
||||
|
||||
thanks, yeah my head hurts trying to figure this out, i like the idea of seperating the comments from the social comments, but i have tried so many ways i cant figure this out for nothing lol
makes sense to me just cant seem to get it <if condition="$post[postcount] == 1"> ***PASTE POSTBIT TEMPLATE HERE*** SHOWS FIRST POST <section id="content1"> </if> <if condition="$post[postcount] != 1"> ***PASTE POSTBIT TEMPLATE HERE*** ALL POSTS NOT POST 1 NEED TO BE INSIDE CONTENT1 DIV*** THIS IS NOT THE COREECT PLACEMENT </if> <if condition="$post[postcount] == 1"> MORE STUFF IF POST 1 </section> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|