Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cpanelif and logic operators

Discussion in 'cPanel Developers' started by manuki, Nov 29, 2009.

  1. manuki

    manuki Member

    Joined:
    Dec 18, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    I'm trying to use the cpanelif function to hide some things in my theme. Like this:

    <cpanelif $CPDATA{'MAXSQL'} =gtet= 1>
    Show something
    </cpanelif>

    That does not work. Any idea how I can use the logic operators?
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,797
    Likes Received:
    130
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    Just curious if something like:

    Code:
    <cpanelif $CPDATA{'MAXSQL'}>
    Show something
    </cpanelif>
    would work. Since if $CPDATA{'MAXSQL'} is greater than or equal to 1 would return true. The only other value would be 0 which would return false.
     
  3. manuki

    manuki Member

    Joined:
    Dec 18, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    Actually my error was extra spaces. Without spaces it works.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice