Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 18 Aug 2008, 20:03
Daggerzz Daggerzz is offline
 
Join Date: Jan 2008
Real name: Craig
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?

Last edited by Daggerzz : 19 Aug 2008 at 04:26.
Reply With Quote
  #2  
Old 19 Aug 2008, 09:55
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
Reply With Quote
  #3  
Old 19 Aug 2008, 13:29
Daggerzz Daggerzz is offline
 
Join Date: Jan 2008
Real name: Craig
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

Last edited by Daggerzz : 20 Aug 2008 at 01:23. Reason: Auto-Merged DoublePost
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 19:33.

Layout Options | Width: Wide Color: