The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
LifesGreatestGift, is there anyway I could use a vb:if conditional inside showthread with that new position variable? I just want to wrap it around something. vb:if condition="$position >= x" or something like that.
|
#12
|
||||
|
||||
Theres no need, it will only display when the condition of the plugin is met. So just put it where you want and style it in the plugin.
|
#13
|
|||
|
|||
Well I have another mod that shows a button somewhere else in the SHOWTHREAD template, and I want to essentially show one button there if the position is higher than a certain number, and another button if its lower than that number. Was hoping to accomplish that with a simple conditional, if it's possible anyway. No big need it's more of an extra.
|
#14
|
||||
|
||||
will only the thread starter see it or everyone? if everyone, the query will need to be ran for everyone.
--------------- Added [DATE]1360715675[/DATE] at [TIME]1360715675[/TIME] --------------- right now, the query is just ran for the thread author. |
#15
|
|||
|
|||
I see what you mean. Yes it does still have to work for the thread owner, but there is a vbif conditional for that right, thread postuserid == bbuserinfo userid or something like that? So I could wrap that conditional around it so the query is still only run for the thread owner, then a conditional inside that for $position (assuming I can even use that as a conditional as a result of using the code you gave me)
--------------- Added [DATE]1360715918[/DATE] at [TIME]1360715918[/TIME] --------------- Maybe i just don't know what I'm talking about lol :/ |
#16
|
||||
|
||||
I need to know, if everyone will be able to see the new button based on the condition you want to make, or just the thread author.
|
#17
|
|||
|
|||
just the thread author
--------------- Added [DATE]1360724846[/DATE] at [TIME]1360724846[/TIME] --------------- Right next to the new thread button is where I have it now. (it just doesn't change according to position) The only reason I mention that at all is because I was thinking of the 2 different hook locations you talked about, showthread_complete and showthread_start idk if that location makes a difference. |
#18
|
||||
|
||||
does this work?
Code:
<vb:if condition="$position == 2">DO THIS</vb:if> FIND Code:
vB_Template::preRegister('SHOWTHREAD',array('display' => $display)); Code:
vB_Template::preRegister('SHOWTHREAD',array('display' => $display)); vB_Template::preRegister('SHOWTHREAD',array('position' => $position)); |
#19
|
|||
|
|||
I think it's stupid that I have to like someone else's post before I can like yours, LOL
That worked perfect, I had to add the second preregister line to make it work. Awesomeness. Thank you so much for the help, seriously appreciate it. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|