当前位置: 首页>>代码示例>>PHP>>正文


PHP exponent_lang_loadFile函数代码示例

本文整理汇总了PHP中exponent_lang_loadFile函数的典型用法代码示例。如果您正苦于以下问题:PHP exponent_lang_loadFile函数的具体用法?PHP exponent_lang_loadFile怎么用?PHP exponent_lang_loadFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了exponent_lang_loadFile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/approvalpolicy.php');
     if (!defined('SYS_WORKFLOW')) {
         require_once BASE . 'subsystems/workflow.php';
     }
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (isset($object->id)) {
         $form->meta('id', $object->id);
     } else {
         $object->name = '';
         $object->description = '';
         $object->max_approvers = 0;
         $object->required_approvals = 0;
         $object->on_deny = SYS_WORKFLOW_REVOKE_NONE;
         $object->on_edit = SYS_WORKFLOW_REVOKE_NONE;
         $object->on_approve = SYS_WORKFLOW_REVOKE_NONE;
         $object->delete_on_deny = 0;
     }
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->description));
     $form->register('max_approvers', $i18n['max_approvers'], new textcontrol($object->max_approvers));
     $form->register('required_approvals', $i18n['required_approvals'], new textcontrol($object->required_approvals));
     $list = array(SYS_WORKFLOW_REVOKE_NONE => $i18n['revoke_none'], SYS_WORKFLOW_REVOKE_ALL => $i18n['revoke_all'], SYS_WORKFLOW_REVOKE_POSTER => $i18n['revoke_poster'], SYS_WORKFLOW_REVOKE_APPROVERS => $i18n['revoke_approvers'], SYS_WORKFLOW_REVOKE_OTHERS => $i18n['revoke_others']);
     $form->register('on_approve', $i18n['on_approve'], new dropdowncontrol($object->on_approve, $list));
     $form->register('on_edit', $i18n['on_edit'], new dropdowncontrol($object->on_edit, $list));
     $form->register('on_deny', $i18n['on_deny'], new dropdowncontrol($object->on_deny, $list));
     $form->register('delete_on_deny', $i18n['delete_on_deny'], new checkboxcontrol($object->delete_on_deny));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:35,代码来源:approvalpolicy.php

示例2: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/weblog_post.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->title = '';
         $object->internal_name = '';
         $object->body = '';
         global $user;
         $object->poster = $user->id;
         $object->is_private = 0;
         $object->is_draft = 0;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('title', $i18n['title'], new textcontrol($object->title));
     $form->register('body', $i18n['body'], new htmleditorcontrol($object->body));
     $form->register('is_private', $i18n['is_private'], new checkboxcontrol($object->is_private));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:25,代码来源:weblog_post.php

示例3: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/newsitem.php');
     global $user;
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->title = '';
         $object->internal_name = '';
         $object->body = '';
         $object->publish = null;
         $object->unpublish = null;
     } else {
         $form->meta('id', $object->id);
         if ($object->publish == 0) {
             $object->publish = null;
         }
         if ($object->unpublish == 0) {
             $object->unpublish = null;
         }
     }
     $form->register('title', $i18n['title'], new textcontrol($object->title));
     $form->register('body', $i18n['body'], new htmleditorcontrol($object->body));
     $form->register('publish', $i18n['publish'], new popupdatetimecontrol($object->publish, $i18n['nopublish']));
     $form->register('unpublish', $i18n['unpublish'], new popupdatetimecontrol($object->unpublish, $i18n['nounpublish']));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:newsitem.php

示例4: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/imagemanageritem.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->description = '';
         $object->scale = 20;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->description));
     if (!isset($object->id)) {
         $form->register(null, '', new htmlcontrol(exponent_core_maxUploadSizeMessage()));
         $form->register('file', $i18n['file'], new uploadcontrol());
     }
     $form->register('scale', $i18n['scale'], new textcontrol($object->scale));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:25,代码来源:imagemanageritem.php

示例5: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('database/inbox_contactbanned.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!defined('SYS_USERS')) {
         require_once BASE . 'subsystems/users.php';
     }
     $users = array();
     foreach (exponent_users_getAllUsers() as $u) {
         // Get the current user.
         $thisuser = $_SESSION['/']['user'];
         if ($u->is_acting_admin == 0 && $u->id != $thisuser->id) {
             $users[$u->id] = $u->firstname . ' ' . $u->lastname . ' (' . $u->username . ')';
         }
     }
     global $db;
     foreach ($db->selectObjects('inbox_contactbanned', 'owner=' . $thisuser->id) as $b) {
         unset($users[$b->user_id]);
     }
     $form->register('uid', $i18n['uid'], new dropdowncontrol(0, $users));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:27,代码来源:inbox_contactbanned.php

示例6: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->affiliate_id = 0;
         $object->url = 'http://';
     } else {
         $form->meta('id', $object->id);
         global $db;
         $file = $db->selectObject('file', 'id=' . $object->file_id);
         $form->register(uniqid(''), '', new htmlcontrol('<img src="' . $file->directory . '/' . $file->filename . '"/>'));
     }
     $i18n = exponent_lang_loadFile('datatypes/banner_ad.php');
     $affiliates = BannerModule::listAffiliates();
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $submit = new buttongroupcontrol($i18n['save'], '', $i18n['cancel']);
     if (count($affiliates)) {
         $form->register('affiliate_id', $i18n['affiliate_id'], new dropdowncontrol($object->affiliate_id, $affiliates));
     } else {
         $form->registerBefore('name', null, '', new htmlcontrol('<div class="error">' . $i18n['no_affiliates'] . '</div>'));
         $submit->disabled = 1;
     }
     $form->register('url', $i18n['url'], new texteditorcontrol($object->url, 2, 40));
     $form->register('submit', '', $submit);
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:banner_ad.php

示例7: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $i18n = exponent_lang_loadFile('datatypes/user.php');
     $form = new form();
     if (!isset($object->id)) {
         // If the user object has no id, then this is a new user form.
         // Populate the empty user object with default attributes,
         // so that the calls to $form->register can confidently dereference
         // thes attributes.
         $object->firstname = '';
         $object->lastname = '';
         $object->email = '';
         // Username and Password can only be specified for a new user.  To change the password,
         // a different form is used (part of the loginmodule)
         $form->register('username', $i18n['desired_username'], new textcontrol());
         $form->register('pass1', $i18n['pass1'], new passwordcontrol());
         $form->register('pass2', $i18n['pass2'], new passwordcontrol());
         $form->register(null, '', new htmlcontrol('<br />'));
     } else {
         $form->meta("id", $object->id);
     }
     // Register the basic user profile controls.
     $form->register('firstname', $i18n['firstname'], new textcontrol($object->firstname));
     $form->register('lastname', $i18n['lastname'], new textcontrol($object->lastname));
     $form->register(null, '', new htmlcontrol('<br />'));
     $form->register('email', $i18n['email'], new textcontrol($object->email));
     $form->register(null, '', new htmlcontrol('<br />'));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:34,代码来源:user.php

示例8: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/ContactModule_config.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->subject = $i18n['default_subject'];
         $object->replyto_address = '';
         $object->from_name = $i18n['default_from_name'];
         $object->from_address = 'info@' . HOSTNAME;
         $object->final_message = $i18n['default_final_message'];
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('subject', $i18n['subject'], new textcontrol($object->subject));
     $form->register('from_name', $i18n['from_name'], new textcontrol($object->from_name));
     $form->register('from', $i18n['from'], new textcontrol($object->from_address));
     $form->register('replyto', $i18n['replyto'], new textcontrol($object->replyto_address));
     $form->register('final_message', $i18n['final_message'], new htmleditorcontrol($object->final_message));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:25,代码来源:contactmodule_config.php

示例9: modifyForm

 function modifyForm($form, $user)
 {
     // new if !isset($user->id)
     $i18n = exponent_lang_loadFile('subsystems/users/profileextensions/phoneextension.php');
     if (!isset($user->user_phone) || $user->user_phone == null) {
         $user->user_phone = phoneextension::_blankPhone();
     }
     $form->register(null, "", new htmlcontrol('<hr size="1" /><b>' . $i18n['header'] . '</b>'));
     $form->register("home_phone", $i18n['home_phone'], new textcontrol($user->user_phone->home_phone, 16, false, 15));
     $form->register("bus_phone", $i18n['bus_phone'], new textcontrol($user->user_phone->bus_phone, 16, false, 15));
     $form->register("other_phone", $i18n['other_phone'], new textcontrol($user->user_phone->other_phone, 16, false, 15));
     // Define pref_contact dropdown sources
     $pref_array = array('', $i18n['home_phone'], $i18n['bus_phone'], $i18n['other_phone'], $i18n['email']);
     if (!isset($user->user_phone->pref_contact)) {
         $form->register("pref_contact", $i18n['pref_contact'], new dropdowncontrol("", $pref_array));
     } else {
         $form->register("pref_contact", $i18n['pref_contact'], new dropdowncontrol($user->user_phone->pref_contact, $pref_array));
     }
     //Define contact_time dropdown sources
     $time_array = array("", "12am - 3am", "3am - 6am", "6am - 9am", "9am - 12pm", "12pm - 3pm", "3pm - 6pm", "6pm - 9pm", "9pm - 12am");
     if (!isset($user->user_phone->contact_time)) {
         $form->register("contact_time", $i18n['contact_time'], new dropdowncontrol("", $time_array));
     } else {
         $form->register("contact_time", $i18n['contact_time'], new dropdowncontrol($user->user_phone->contact_time, $time_array));
     }
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:27,代码来源:phoneextension.php

示例10: form

 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $i18n = exponent_lang_loadFile('datatypes/group.php');
     $form = new form();
     if (!isset($object->id)) {
         // If the user object has no id, then this is a new user form.
         // Populate the empty user object with default attributes,
         // so that the calls to $form->register can confidently dereference
         // thes attributes.
         $object->name = '';
         $object->description = '';
         $object->inclusive = 1;
     } else {
         $form->meta('id', $object->id);
     }
     // Register the basic user profile controls.
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->description));
     $form->register('inclusive', $i18n['inclusive'], new checkboxcontrol($object->inclusive));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:26,代码来源:group.php

示例11: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/contact_contact.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $type = 0;
     $default = 0;
     $form = new form();
     if (!isset($object->id)) {
         $object->user_id = 0;
         $object->addressbook_contact_id = 0;
         $object->email = '';
         $object->contact_info = '';
     } else {
         $form->meta('id', $object->id);
         if ($object->user_id != 0) {
             $type = 0;
             $default = $object->user_id;
         } else {
             $type = 1;
             $default = $object->email;
         }
     }
     $form->register('contact', $i18n['contact'], new contactcontrol($default, $type));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:29,代码来源:contact_contact.php

示例12: form

 function form($object = null)
 {
     $i18n = exponent_lang_loadFile('datatypes/section_template.php');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->active = 1;
         $object->public = 1;
         $object->subtheme = '';
         $object->page_title = SITE_TITLE;
         $object->keywords = SITE_KEYWORDS;
         $object->description = SITE_DESCRIPTION;
         if (!isset($object->parent)) {
             $object->parent = 0;
         }
         // NOT IMPLEMENTED YET
         //$object->subtheme='';
     } else {
         $form->meta('id', $object->id);
     }
     $form->meta('parent', $object->parent);
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     if (!isset($object->id) && $object->parent != 0) {
         // Add the 'Add' drop down if not a top level
         global $db;
         $sections = $db->selectObjects('section_template', 'parent=' . $object->parent);
         if (count($sections)) {
             if (!defined('SYS_SORTING')) {
                 require_once BASE . 'subsystems/sorting.php';
             }
             usort($sections, 'exponent_sorting_byRankAscending');
             $dd = array($i18n['position_top']);
             foreach ($sections as $s) {
                 $dd[] = sprintf($i18n['position_after'], $s->name);
             }
             $form->register('rank', $i18n['rank'], new dropdowncontrol(count($dd) - 1, $dd));
         } else {
             $form->meta('rank', 0);
         }
     } else {
         $form->meta('rank', 0);
     }
     if (is_readable(THEME_ABSOLUTE . 'subthemes')) {
         // grab sub themes
         $form->register('subtheme', $i18n['subtheme'], new dropdowncontrol($object->subtheme, exponent_theme_getSubThemes()));
     }
     $form->register('active', $i18n['active'], new checkboxcontrol($object->active));
     $form->register('public', $i18n['public'], new checkboxcontrol($object->public));
     // Register the Page Meta Data controls.
     $form->register('page_title', $i18n['page_title'], new textcontrol($object->page_title));
     $form->register('keywords', $i18n['keywords'], new texteditorcontrol($object->keywords, 5, 25));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->keywords, 5, 25));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['save']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:59,代码来源:section_template.php

示例13: permissions

 function permissions($internal = '')
 {
     $i18n = exponent_lang_loadFile('modules/WeblogModule/class.php');
     if ($internal == '') {
         return array('administrate' => $i18n['perm_administrate'], 'configure' => $i18n['perm_configure'], 'post' => $i18n['perm_post'], 'edit' => $i18n['perm_edit'], 'delete' => $i18n['perm_delete'], 'comment' => $i18n['perm_comment'], 'edit_comments' => $i18n['perm_edit_comments'], 'delete_comments' => $i18n['perm_delete_comments'], 'view_private' => $i18n['perm_view_private']);
     } else {
         return array('administrate' => $i18n['perm_administrate'], 'edit' => $i18n['perm_edit_one'], 'delete' => $i18n['perm_delete_one'], 'comment' => $i18n['perm_comment'], 'edit_comments' => $i18n['perm_edit_comments'], 'delete_comments' => $i18n['perm_delete_comments'], 'view_private' => $i18n['perm_view_private_one']);
     }
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:9,代码来源:WeblogModule.php

示例14: permissions

 function permissions($internal = "")
 {
     $i18n = exponent_lang_loadFile('modules/imagemanagermodule/class.php');
     if ($internal == '') {
         return array('administrate' => $i18n['perm_administrate'], 'post' => $i18n['perm_post'], 'edit' => $i18n['perm_edit'], 'delete' => $i18n['perm_delete']);
     } else {
         return array('edit' => $i18n['perm_edit'], 'delete' => $i18n['perm_delete']);
     }
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:9,代码来源:class.php

示例15: form

 function form($object)
 {
     $i18n = exponent_lang_loadFile('datatypes/formbuilder_report.php');
     global $db;
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->description = '';
         $object->text = '';
         $object->column_names = '';
     }
     $form->register('name', $i18n['name'], new textcontrol($object->name));
     $form->register('description', $i18n['description'], new texteditorcontrol($object->description));
     $form->register(null, '', new htmlcontrol('<br /><br />' . $i18n['blank_report_message'] . '<br /><br />'));
     $form->register('text', $i18n['text'], new htmleditorcontrol($object->text));
     $fields = array();
     $column_names = array();
     $cols = array();
     if ($object->column_names != '') {
         $cols = explode('|!|', $object->column_names);
     }
     if (isset($object->form_id)) {
         foreach ($db->selectObjects('formbuilder_control', 'form_id=' . $object->form_id . ' and is_readonly=0') as $control) {
             $ctl = unserialize($control->data);
             $control_type = get_class($ctl);
             $def = call_user_func(array($control_type, 'getFieldDefinition'));
             if ($def != null) {
                 $fields[$control->name] = $control->caption;
                 if (in_array($control->name, $cols)) {
                     $column_names[$control->name] = $control->caption;
                 }
             }
         }
         $fields['ip'] = $i18n['field_ip'];
         if (in_array('ip', $cols)) {
             $column_names['ip'] = $i18n['field_id'];
         }
         if (isset($field['field_user_id'])) {
             $fields['user_id'] = $field['field_user_id'];
         }
         if (in_array('user_id', $cols)) {
             $column_names['user_id'] = $i18n['field_user_id'];
         }
         $fields['timestamp'] = $i18n['field_timestamp'];
         if (in_array('timestamp', $cols)) {
             $column_names['timestamp'] = $i18n['field_timestamp'];
         }
     }
     $form->register('column_names', $i18n['column_names'], new listbuildercontrol($column_names, $fields));
     $form->register(null, '', new htmlcontrol('<br /><br /><br />'));
     $form->register('submit', '', new buttongroupcontrol($i18n['save'], '', $i18n['cancel']));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:57,代码来源:formbuilder_report.php


注:本文中的exponent_lang_loadFile函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。