MyBB Support

PHP Question

Submitted by Tropical, , Thread ID: 4976

Thread Closed
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

#2
@akay is good with mybb. I need to fiddle it omg

RE: PHP Question

OP
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

#4
Congratulations on fixing it yourself.

Users browsing this thread: 3 Guest(s)