The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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,381
    Likes Received:
    23
    Trophy Points:
    38
    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:
    1
    Actually my error was extra spaces. Without spaces it works.
     

Share This Page