myPortal CMS - the web design community
  • MyPortal 2.0
  • download
  • demo
  • manual
  • editor
  • faq
  • blog
  • forum

free account: Click here
Username: Password:

Manual

common functions

debuggable()

returns true if debug info allowed for your ip and debugging is enabled. if ips are not set, debug info only visible to myportal loged users.

if(debuggable()){
    $DB->debug = true;
    print_r($_SESSION);
    ...
}

ifelse($if,$else=false)

shorter syntax for

$a = $a ? $a : $b;
 
//shorter
$a = ifelse($a,'');   // return '' if $a is false else $a
$a = ifelse($a);   // return false if $a is false else $a

shorten($string,$len)

string shortener to given lenght

echo shorten('123456789',3);
// 123...

Try myPortal 2: