![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
Conditionals
Im trying to add a button to the thread view postbit controlls next to the edit and quote buttons. Adding the button is easy but Im trying to make it so only the original poster can see the button If i put in the conditional
<if condition="$vbulletin->userinfo['userid'] == $threadinfo['postuserid']"> everyone can see it if i put in the conditional <if condition="$threadinfo['postuserid'] == $bbuserinfo['userid']"> no one can see it shouldnt both of these return the same result? No members have liked this post.
Last edited by Daggerzz : 19 Aug 2008 at 04:26. |
|
#2
|
||||
|
||||
The reason your first one will show to everyone is because $vbulletin->userinfo doesn't exist yet (I don't think), so it will match null, empty, 0, or false, unless you have used the identical operator. The second variable, $threadinfo, also does not exist. In the second example, $bbuserinfo does exist, and will not match null, empty, 0, or false.
__________________
View My Modifications 29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x) Please do not PM me to ask for support - please use the relevant thread or forum. No members have liked this post.
|
||||
|
#3
|
|||
|
|||
|
Ok after messing with that for about 6 hours I came to the same conclusion.
So my question is , is there a way to make a button appear in the postbit controls that only the original thread starter can see. --------------- Added 20 Aug 2008 at 01:23 --------------- Thanks for the help i figured it out No members have liked this post.
Last edited by Daggerzz : 20 Aug 2008 at 01:23. Reason: Auto-Merged DoublePost |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 19:33.


