Esempio n. 1
0
             continue;
         }
         $rec['cachable'] = '';
         if ($rec['type'] == 'function') {
             if (function_exists('smarty_cms_' . $rec['type'] . '_' . $rec['name'])) {
                 $rec['cachable'] = 'no';
             } else {
                 if (function_exists('smarty_' . $rec['type'] . '_' . $rec['name'])) {
                     $rec['cachable'] = 'yes';
                 }
             }
         }
         if (function_exists("smarty_cms_help_" . $rec['type'] . "_" . $rec['name'])) {
             $rec['help_url'] = 'listtags.php' . $urlext . '&action=showpluginhelp&plugin=' . $rec['name'] . '&type=' . $rec['type'];
         } else {
             if (CmsLangOperations::key_exists('help_' . $rec['type'] . '_' . $rec['name'])) {
                 $rec['help_url'] = 'listtags.php' . $urlext . '&action=showpluginhelp&plugin=' . $rec['name'] . '&type=' . $rec['type'];
             }
         }
         if (function_exists("smarty_cms_about_" . $rec['type'] . "_" . $rec['name'])) {
             $rec['about_url'] = 'listtags.php' . $urlext . '&action=showpluginabout&plugin=' . $rec['name'] . '&type=' . $rec['type'];
         }
         $file_array[] = $rec;
     }
 }
 // add in standard tags...
 $rec = array('type' => 'function', 'name' => 'content');
 $rec['help_url'] = 'listtags.php' . $urlext . '&action=showpluginhelp&plugin=' . $rec['name'] . '&type=' . $rec['type'];
 $rec['cachable'] = 'no';
 $file_array[] = $rec;
 $rec = array('type' => 'function', 'name' => 'content_image');
 /**
  * Allow nonadmin requests to call lang functions.
  * normally, an error would be generated if calling core lang functions from an frontend action.
  * this method will disable or enable that check.
  *
  * @internal
  * @param boolean flag
  * @return void.
  */
 public static function allow_nonadmin_lang($flag = TRUE)
 {
     self::$_allow_nonadmin_lang = $flag;
 }
Esempio n. 3
0
/**
 * Return a translated string for the default 'admin' realm.
 * This function is merely a wrapper around the lang_by_realm function
 * that assumes the realm is 'admin'.
 *
 * This method will throw a notice if it is called from a frontend request
 *
 * @param string The key to translate
 * @return string
 */
function lang()
{
    $args = func_get_args();
    return CmsLangOperations::lang($args);
}