MyBB Support

PHP Question

Submitted by Tropical, , Thread ID: 4976

Thread Closed
Tropical
Fulltime Member
Level:
0
Reputation:
35
Posts:
1.04K
Likes:
54
Credits:
117
22-06-2015, 05:02 AM
This post was last modified: 22-06-2015, 05:26 AM by Tropical
#1
So,
I coded a HTML/CSS pricing table into an upgrade page.

I need to add a bit of PHP to the buttons but not sure how to go about it.
-

I basically wanna add something like {if user is not in group show <div class="blah">BUY</div> else if user is in group show <div class="blah">ALREADY UPGRADED</div>}
and so on ..

I can figure out the rest on where to add it.
Somebody lead me in the right direction, please :noh:

RE: PHP Question

Coin
Level:
0
Reputation:
59
Posts:
1.13K
Likes:
54
Credits:
243
22-06-2015, 05:16 AM
#2
@akay is good with mybb. I need to fiddle it omg

RE: PHP Question

Tropical
Fulltime Member
Level:
0
Reputation:
35
Posts:
1.04K
Likes:
54
Credits:
117
OP
22-06-2015, 05:21 AM
This post was last modified: 22-06-2015, 05:43 AM by Tropical
#3
22-06-2015, 05:16 AM
Kill Wrote:
@akay is good with mybb. I need to fiddle it omg

I think I did this code correct, i dunno..
PHP Code:
<if $usergroup ['gid'] == 11 then><class="btn">ALREADY UPGRADED</a><else><class="btn">BUY</a></if> 

I figured this out myself, it was:
PHP Code:
<if $mybb->user['usergroup'] == "11" then>
<
class="btn">ALREADY UPGRADED</a>

<elseif 
$mybb->user['usergroup'] == "9" then>
<
class="btn">BUY</a>
</if> 

RE: PHP Question

Akay
We are!
Level:
0
Reputation:
28
Posts:
946
Likes:
109
Credits:
2.05K
22-06-2015, 07:12 AM
#4
Congratulations on fixing it yourself.

Users browsing this thread: 1 Guest(s)