The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
![]()
I'm not sure I understand. It sounds like you are simply using the postbit template, but not the showthread page, correct? So, do these posts even have post numbers? If so, then I suppose <if condition="$post[postcount] == '1'"> may be valid. I really can't tell because I'm not sure if you are using the same variable names at all for these posts.
|
#12
|
|||
|
|||
![]()
Hi Lynne
![]() Thanks for the reply and sorry for the confusion. I'll try explain in more detail. As mentioned before, we're essentially styling the download manager plugin, vbdynamix. Each download has a details page, where you can post updates in the form of posts and optionally allow users to reply etc. This part of the page seems is handled by vb. Since we've told VBD to use its own template, we can go crazy on it without worrying about messing up the main forum. My aim with this project is to get the downloads page to look un-forum-y as possible ![]() PHP Code:
In the postbit_legacy i have this: PHP Code:
PHP Code:
Cheers, Chris |
#13
|
||||
|
||||
![]()
<if condition="$post[postcount] == '1'"> doesn't work? If not it's probably because $post[postcount] doesn't exist. You may have to spit out some variables in the templates in order to see exactly what is available and then determine what you want to use for your conditions.I am unfamiliar with vbdynamix so I really don't know that I can be of much help.
|
#14
|
|||
|
|||
![]()
Hi Lynne,
I tried adding $post[postcount] into the ADV_DYNA_SHOWENTRY page and it didnt output anything. I then went on to add it to the postbit_legacy file and it now shows a 1,2,3 etc on each of the posts. So i'm guessing hte postcount option only works when inside of the postbit template. You mentioned spitting out some variables to see what is available. Could you elaborate? Thanks, Chris |
#15
|
||||
|
||||
![]()
It sounds like you did what I was suggesting - putting something like $post[postcount] in the template to see what gets spit out. Unfortunately, I don't understand what this output page is you are talking about. If that variable works in the template, isn't that where you wanted to use it? You could do what you were saying in the postbit_legacty template by just wrapping it all in a condition, no?
HTML Code:
<if condition="$post[postcount] == '1'"> <li class="updates"> $template_hook[postbit_start] $template_hook[postbit_messagearea_start] <p class="update-date">$post[postdate]</p> <p class="update-message">$post[message]</p> <if condition="is_member_of($bbuserinfo, 6)"><a href="$post[editlink]" name="vB::QuickEdit::$post[postid]">Edit</a></if> $template_hook[postbit_end] </li> <else /> something else </if> |
#16
|
|||
|
|||
![]()
Your comment just sparked an idea! The postcount works when its inside of the postbit template, so if i move the stuff from the ADV_DYNA_SHOWENTRY template into the postbit_wrapper, the postcount should work and we would be golden. I'm gona give it a shot now and will post my findings once i've tested it..
Thanks again! Chris --------------- Added [DATE]1234597137[/DATE] at [TIME]1234597137[/TIME] --------------- close but no cigar ![]() Any ideas? |
#17
|
|||
|
|||
![]()
My goal has been to completely hide the updates block if no updates are available, but thinking more for consistency sake having the block always there isnt necessarily a bad thing. So now i am trying your suggestion, adding the check to the postbit_legacy template:
<if condition="$post[postcount] == '1'"> <li class="updates"> $template_hook[postbit_start] $template_hook[postbit_messagearea_start] <p class="update-date">$post[postdate]</p> <p class="update-message">$post[message]</p> <if condition="is_member_of($bbuserinfo, 6)"><a href="$post[editlink]" name="vB::QuickEdit::$post[postid]">Edit</a></if> $template_hook[postbit_end] </li> <else /> <li class="no-updates"> $template_hook[postbit_start] $template_hook[postbit_messagearea_start] There are no updates for this template. $template_hook[postbit_end] </li> </if> Based on the above, you would expect that the updates block will always be there and if update posts exist, they are displayed, else show a message saying that no updates are available. Unfortunately, what i've ended up with is just the updates heading on the page that doest have any updates (ie, no message saying no updates below the heading) and then on the page that does have updates i have the first update message displaying, but then the no updates messages outputted 3 times where the other updates should be. I know that probably doesnt make sense, so i've attached two images - one showing the download that doesnt have any posts and one of the download that does have posts. Thanks, Chris |
#18
|
|||
|
|||
![]()
Looking at the code again, and studying the output of the postcount variable, i think i know why its outputting the way it is. It looks like the conditional is saying "if postcount is equal to 1", essentially targeting only the post whose post count is 1, ie the first post.
What do you think? Is it possible to tweak the conditional to say if posts exist, else... |
#19
|
||||
|
||||
![]()
I'm a bit confused, but can't you just use the adlocation_firstpost template?
|
#20
|
|||
|
|||
![]()
Hi Dismounted,
You'll have to excuse as this is my first vb project and am not yet 100% on par with how everything works. Would you mind elaborating on how you see it working? I recall seeing the adlocation_firspost variable in the postbit, but figured it was just a placeholder for a banner ad after the first post.. Cheers, Chris |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|