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


PHP form_comment函数代码示例

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


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

示例1: alter_data

    function alter_data()
    {
        $this->set_display_name('show_hide', 'Visibility in Sitemap');
        $this->add_comments('show_hide', form_comment('This controls whether this site type 
(and the 
sites associated with it)  are displayed in the site map module'));
    }
开发者ID:hunter2814,项目名称:reason_package,代码行数:7,代码来源:site_type.php

示例2: alter_data

 function alter_data()
 {
     $authenticator = array("reason_username_has_access_to_site", $this->get_value("site_id"));
     $existing_asset_type = $this->get_value("file_type");
     $full_asset_path = $this->get_value('file_type') ? ASSET_PATH . $this->_id . '.' . $this->get_value('file_type') : false;
     $params = array('authenticator' => $authenticator, 'max_file_size' => $this->get_actual_max_upload_size(), 'head_items' => &$this->head_items, 'file_display_name' => $this->get_value('file_name'));
     if (!empty($existing_asset_type)) {
         $params = array_merge($params, array('existing_entity' => $this->_id, 'allow_upload_on_edit' => true));
     }
     $this->add_element('asset', 'ReasonUpload', $params);
     $asset = $this->get_element('asset');
     $this->set_comments('name', form_comment('A name for internal reference.'));
     $this->set_comments('content', form_comment('A long description of the document, if it needs it. This field is not required.'));
     $this->set_comments('description', form_comment('A description of the document.'));
     $this->set_comments('keywords', form_comment('A few words to aid in searching for the document.'));
     $this->set_comments('datetime', form_comment('mm/dd/yyyy'));
     $this->set_comments('asset', form_comment('Your filename may be modified if it is has already been taken, or includes spaces or unusual characters.'));
     $this->add_required('description');
     $this->set_display_name('asset', 'File');
     $this->set_display_name('datetime', 'Publication Date');
     $this->change_element_type('file_size', 'hidden');
     $this->change_element_type('file_name', 'text');
     $this->change_element_type('file_type', 'hidden');
     $this->change_element_type('mime_type', 'hidden');
     $this->add_restriction_selector();
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:26,代码来源:asset.php

示例3: on_every_time

 /**
  * @todo add javascript hooks to check / uncheck all
  */
 function on_every_time()
 {
     $this->add_element('publication_id', 'select_no_sort', array('options' => $this->site_publication_names_by_id, 'display_name' => 'Choose a Publication'));
     $this->set_comments('publication_id', form_comment('<p>...Or <a href="' . $this->new_publication_link . '">create a new publication<a/></p>'));
     $this->add_element('issues', 'checkboxgroup', array('options' => $this->unattached_issue_names_by_id, 'display_name' => 'Choose Issues to Attach'));
     $this->set_value('issues', array_keys($this->unattached_issue_names_by_id));
     // check all by default
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:11,代码来源:migrator_screen_6.php

示例4: alter_data

 function alter_data()
 {
     $defaultZoomLevel = defined('GOOGLE_MAPS_DEFAULT_ZOOM_LEVEL') ? GOOGLE_MAPS_DEFAULT_ZOOM_LEVEL : 4;
     $defaultLatitude = defined('GOOGLE_MAPS_DEFAULT_LATITUDE') ? GOOGLE_MAPS_DEFAULT_LATITUDE : 39.059325;
     $defaultLongitude = defined('GOOGLE_MAPS_DEFAULT_LONGITUDE') ? GOOGLE_MAPS_DEFAULT_LONGITUDE : -97.04547599999999;
     $this->set_comments('google_map_msid', form_comment('My places map id (e.g. 206354152960879485239.0004bd7c539131dd1e563) containing custom polygons and placemarks.<br/>Place multiple ids on a separate lines.'));
     $this->set_display_name('google_map_zoom_level', 'Zoom level');
     $this->set_display_name('google_map_latitude', 'Latitude');
     $this->set_display_name('google_map_longitude', 'Longitude');
     $this->set_display_name('google_map_msid', 'Map ID');
     $this->set_display_name('google_map_show_campus_template', 'Show Campus Template');
     $this->set_display_name('google_map_primary_pushpin_latitude', 'Primary Pushpin Latitude');
     $this->set_display_name('google_map_primary_pushpin_longitude', 'Primary Pushpin Longitude');
     $this->set_display_name('google_map_show_primary_pushpin', 'Primary Pushpin');
     $this->change_element_type('google_map_show_primary_pushpin', 'radio_no_sort', array('options' => array('show' => 'Show <span class="smallText formComment">(Drag the primary pushpin to set location)</span>', 'hide' => 'Hide <span id="destination_lat_long" class="smallText formComment">(Don\'t display primary pushpin)</span>')));
     $this->set_display_name('google_map_destination_latitude', 'Destination Latitude');
     $this->set_display_name('google_map_destination_longitude', 'Destination Longitude');
     $this->set_display_name('google_map_show_directions', 'Directions');
     $this->change_element_type('google_map_show_directions', 'radio_no_sort', array('options' => array('show' => 'Show <span class="smallText formComment">(Drag the "To" bubble to set destination)</span>', 'hide' => 'Hide <span id="destination_lat_long" class="smallText formComment">(Don\'t display the directions interface)</span>')));
     //$this->change_element_type('google_map_destination_latitude', 'hidden');
     //$this->change_element_type('google_map_destination_longitude', 'hidden');
     $this->change_element_type('no_share', 'hidden');
     if (!$this->get_value('google_map_zoom_level')) {
         $this->set_value('google_map_zoom_level', $defaultZoomLevel);
     }
     if (!$this->get_value('google_map_latitude')) {
         $this->set_value('google_map_latitude', $defaultLatitude);
     }
     if (!$this->get_value('google_map_longitude')) {
         $this->set_value('google_map_longitude', $defaultLongitude);
     }
     if (!$this->get_value('google_map_primary_pushpin_latitude') && !$this->get_value('google_map_primary_pushpin_longitude')) {
         $this->set_value('google_map_primary_pushpin_latitude', $this->get_value('google_map_latitude') + 0.0002);
         $this->set_value('google_map_primary_pushpin_longitude', $this->get_value('google_map_longitude') - 0.0002);
     }
     if (!$this->get_value('google_map_show_primary_pushpin')) {
         $this->set_value('google_map_show_primary_pushpin', 'show');
     }
     if (!$this->get_value('google_map_destination_latitude') && !$this->get_value('google_map_destination_longitude')) {
         $this->set_value('google_map_destination_latitude', $this->get_value('google_map_latitude'));
         $this->set_value('google_map_destination_longitude', $this->get_value('google_map_longitude'));
     }
     if (!$this->get_value('google_map_show_directions')) {
         $this->set_value('google_map_show_directions', 'show');
     }
     $msid = $this->get_value('google_map_msid');
     if ($msid != null) {
         $this->set_value('google_map_msid', preg_replace("|\\s|", PHP_EOL, $msid));
     }
     $this->set_order(array('name', 'unique_name', 'google_map_zoom_level', 'google_map_latitude', 'google_map_longitude', 'google_map_show_campus_template', 'google_map_show_primary_pushpin', 'google_map_primary_pushpin_latitude', 'google_map_primary_pushpin_longitude', 'google_map_show_directions', 'google_map_destination_latitude', 'google_map_destination_longitude', 'google_map_msid'));
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:51,代码来源:google_map.php

示例5: alter_data

 function alter_data()
 {
     $this->set_comments('description', form_comment('If provided, the short version may be used by modules that need to display quotes in a limited amount of space.'));
     $this->set_display_name('description', 'Quotation Text (Short Version)');
     $this->set_element_properties('description', array('rows' => 3));
     $this->set_display_name('content', 'Quotation Text');
     $this->add_required('content');
     if (!empty($this->fields_to_remove)) {
         foreach ($this->fields_to_remove as $field) {
             $this->remove_element($field);
         }
     }
     $this->set_order($this->field_order);
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:14,代码来源:quote.php

示例6: run

 function run()
 {
     if (!reason_user_has_privs($this->admin_page->user_id, 'view_sensitive_data')) {
         echo 'Sorry; you do not have the rights to view this information.';
         return;
     }
     // get audiences in REason
     $es = new entity_selector();
     $es->add_type(id_of('audience_type'));
     $audiences = $es->run_one();
     $options = array();
     foreach ($audiences as $aud) {
         $options[$aud->get_value('directory_service_value')] = $aud->get_value('name');
     }
     $d = new disco();
     $d->add_element('active_since', 'textdatetime');
     $d->add_element('affiliations', 'checkboxgroup', array('options' => $options));
     $d->set_display_name('affiliations', 'Audiences');
     $d->add_comments('affiliations', form_comment('Leaving these checkboxes blank won\'t filter the results.'));
     $d->set_actions(array('run' => 'Run'));
     $d->run();
     if ($d->get_value('active_since')) {
         $user_ids = $this->_get_active_user_ids($d->get_value('active_since'));
         echo count($user_ids) . ' Reason users modified at least one item since ' . prettify_mysql_datetime($d->get_value('active_since')) . '<br />';
         if ($d->get_value('affiliations')) {
             $affiliations = array_values($d->get_value('affiliations'));
         } else {
             $affiliations = array();
         }
         $users = $this->_get_active_users_from_ids($user_ids, $affiliations);
         echo '<br />' . count($users) . ' of the above users currently have access to at least one site<br />';
         if (!empty($users)) {
             echo '<textarea rows="12">' . "\n";
             $usernames = array();
             foreach ($users as $user) {
                 $usernames[$user->id()] = $user->get_value('name');
             }
             echo implode(', ', $usernames);
             echo '</textarea>' . "\n";
         }
         $emails = $this->_get_email_addresses_from_users($users);
         echo '<br />' . count($emails) . ' of the users with site access have an email addresses in the directory<br />';
         if (!empty($emails)) {
             echo '<textarea rows="12">' . "\n";
             echo implode(', ', $emails);
             echo '</textarea>' . "\n";
         }
     }
 }
开发者ID:natepixel,项目名称:reason_package,代码行数:49,代码来源:active_users.php

示例7: social_account_on_every_time

 /**
  * Add / modify for elements for Email integration.
  */
 function social_account_on_every_time($cm)
 {
     $cm->change_element_type('account_type', 'protected');
     $cm->change_element_type('account_details', 'protected');
     $cm->set_display_name('account_id', 'LinkedIn page URL');
     $cm->add_required('account_id');
     $cm->add_comments('account_id', form_comment(''));
     // lets add a field showing the current link if one is available.
     $account_id = $cm->get_value('account_id');
     if (!empty($account_id)) {
         $link = $account_id;
         $comment_text = '<a href="' . $link . '">' . $link . '</a>';
         $cm->add_element('account_link', 'commentWithLabel', array('text' => $comment_text));
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:18,代码来源:linkedin.php

示例8: social_account_on_every_time

	/**
	 * Add / modify for elements for Facebook integration.
	 */
	function social_account_on_every_time($cm)
	{
		$cm->change_element_type('account_type', 'protected');
		$cm->change_element_type('account_details', 'protected');
		$cm->set_display_name('account_id', 'Google+ ID');
		$cm->add_required('account_id');
		$cm->add_comments('account_id', form_comment('Your Google+ ID is the set of numbers after plus.google.com/ in the URL when you view your profile.'));

		// lets add a field showing the current link if one is available.		
		$account_id = $cm->get_value('account_id');
		if (!empty($account_id))
		{
			$link = 'http://plus.google.com/'.$account_id;
			$comment_text = '<a href="'.$link.'">'.$link.'</a>';
			$cm->add_element('account_link', 'commentWithLabel', array('text' => $comment_text));
		}
	}
开发者ID:natepixel,项目名称:reason_package,代码行数:20,代码来源:googleplus.php

示例9: run

 /**
  * Run the module
  */
 function run()
 {
     $sites = $this->_get_sites();
     if (empty($sites)) {
         echo '<p>You must have editing access to at least one live Reason site for this module to work</p>' . "\n";
         return;
     }
     $users = $this->_get_users();
     if (empty($users)) {
         echo '<p>No users available.</p>' . "\n";
         return;
     }
     echo '<div id="reviewChangesModule">' . "\n";
     $d = new disco();
     $d->add_element('start_date', 'textdate', array('prepopulate' => true, 'year_max' => carl_date('Y'), 'year_min' => '1000'));
     $d->add_required('start_date');
     $d->add_element('end_date', 'textdate', array('year_max' => carl_date('Y'), 'year_min' => '1000'));
     $d->add_comments('end_date', form_comment('If no end date given, changes will be shown for just the start date'));
     $d->add_element('type', 'select', array('options' => $this->_prep_for_disco($this->_get_types())));
     if (!empty($this->admin_page->request['type_id'])) {
         $d->set_value('type', $this->admin_page->request['type_id']);
     }
     $d->add_element('site', 'select', array('options' => $this->_prep_for_disco($sites)));
     if (!empty($this->admin_page->request['site_id'])) {
         $d->set_value('site', $this->admin_page->request['site_id']);
     }
     $d->add_element('user', 'select', array('options' => $this->_prep_for_disco($users)));
     if (!empty($this->admin_page->request['user'])) {
         $d->set_value('user', $this->admin_page->request['user']);
     }
     $d->add_element('sort', 'select', array('options' => array('DESC' => 'Descending', 'ASC' => 'Ascending')));
     $d->set_actions(array('review' => 'Review'));
     $d->run();
     if ($d->successfully_submitted()) {
         $end_date = $d->get_value('end_date') ? $d->get_value('end_date') : $d->get_value('start_date');
         if ($end_date < $d->get_value('start_date')) {
             echo 'Please pick a end date on or after the start date.';
         } else {
             echo $this->_get_changes_markup($d->get_value('start_date'), $end_date, $d->get_value('type'), $d->get_value('site'), $d->get_value('user'), $d->get_value('sort'));
         }
     }
     echo '</div>' . "\n";
 }
开发者ID:natepixel,项目名称:reason_package,代码行数:46,代码来源:review_changes.php

示例10: on_every_time

 function on_every_time()
 {
     $this->add_element('pub_name', 'text', array('display_name' => 'Publication Name'));
     $this->add_required('pub_name');
     $this->add_element('pub_description', 'textarea', array('display_name' => 'Publication Description'));
     $this->set_comments('pub_description', form_comment('Any text entered here will be displayed at the top of the primary page for the publication'));
     $this->add_element('pub_rss_feed_url', 'text', array('display_name' => 'Publication RSS Feed URL'));
     $this->add_required('pub_rss_feed_url');
     $this->add_element('pub_posts_per_page', 'text', array('display_name' => 'Posts per page'));
     $this->add_required('pub_posts_per_page');
     $this->add_element('pub_unique_name', 'text', array('display_name' => 'Publication Unique Name'));
     $this->add_element('date_format', 'select_no_sort', array('options' => array('F j, Y \\a\\t g:i a' => date('F j, Y \\a\\t g:i a'), 'n/d/y \\a\\t g:i a' => date('n/d/y \\a\\t g:i a'), 'l, F j, Y' => date('l, F j, Y'), 'F j, Y' => date('F j, Y'), 'n/d/y' => date('n/d/y'), 'n.d.y' => date('n.d.y'), 'j F Y' => date('j F Y'), 'j F Y \\a\\t  g:i a' => date('j F Y \\a\\t  g:i a'), 'j F Y \\a\\t  g:i a' => date('j F Y \\a\\t  H:i'))));
     // if the site does not have any publications yet, we'll guess at certain values
     if (empty($this->site_publication_names_by_id)) {
         $this->set_value('pub_rss_feed_url', $this->helper->guess_desired_publication_rss_feed_url());
         $this->set_value('pub_description', $this->helper->guess_desired_publication_description());
         $this->set_value('pub_name', $this->helper->guess_desired_publication_name());
     }
     // we always guess at posts per page
     $this->set_value('pub_posts_per_page', $this->helper->guess_desired_publication_posts_per_page());
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:21,代码来源:migrator_screen_3.php

示例11: on_every_time

 function on_every_time()
 {
     $site_list = $this->get_site_list();
     $existing_file = $this->get_value('wordpress_xml');
     if (!empty($existing_file)) {
         $source_file_name = $this->get_value('xml_file_name');
         $this->set_comments('wordpress_xml', form_comment('<p>A file (' . $source_file_name . ') has been uploaded - only upload a file if you want to change the source file</p>'));
     }
     if ($site_list) {
         $this->change_element_type('reason_site', 'select_no_sort', array('options' => $site_list));
     } else {
         $this->change_element_type('reason_site', 'solidtext');
         $this->set_value('reason_site', 'There are no sites available');
     }
     $this->uid = uniqid('', true);
     $this->set_value('xml_id', $this->uid);
     $this->add_element('blog_page_name');
     $this->set_comments('blog_page_name', form_comment('Leave blank if you want the blog to be created on the home page.'));
     if (is_developer()) {
         $this->add_element('kill_all_label', 'comment', array('text' => '<h3>Developer Tools</h3><p>If "Zap site" is checked, we will expunge all the contents of the site instead of parsing/importing XML. Mainly this is for developers who are tweaking an import.</p>'));
         $this->add_element('kill_all', 'checkbox', array('display_name' => 'Zap site'));
         //$this->set_comments('kill_all', form_comment());
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:24,代码来源:SetupForm.php

示例12: on_every_time

 function on_every_time()
 {
     $this->setup_default_actions();
     $category_options = $this->model->get_classified_category_names();
     $this->change_element_type('category', 'radio', array('options' => $category_options));
     if (!empty($this->classified_form_comments)) {
         foreach ($this->classified_form_comments as $k => $v) {
             $this->set_comments($k, form_comment($v));
         }
     }
     if (!empty($this->classified_form_display_names)) {
         foreach ($this->classified_form_display_names as $k => $v) {
             if ($this->get_element($k)) {
                 $this->set_display_name($k, $v);
             }
         }
     }
     $this->alter_classified_form_elements();
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:19,代码来源:classified_view.php

示例13: form_comment

						</form>
				<?php 
} else {
    if ($rezult->uid_winner == $firma) {
        ?>
					<div class="sa_comment_reply"><?php 
        echo JText::_('SAUTO_COMMENT_REPLY');
        ?>
</div>
						
					<form method="post" action="<?php 
        echo $link_comment;
        ?>
" enctype="multipart/form-data" name="submit_comm" id="submit_comm">
						<?php 
        form_comment($r_id, $multiple_id, $anunt_id, $proprietar, $firma);
        echo loadImg($r_id, $multiple_id);
        ?>
					
					</form>
		<?php 
    }
}
?>
	<div>
	<div onClick="document.forms['submit_comm'].submit();" class="someClass">
					<?php 
echo JText::_('SAUTO_COMMENT_BUTTON');
?>
					</div>
	<div class="someClass" style="vertical-align: top;" onclick="window.history.go(-1)"><?php 
开发者ID:grchis,项目名称:Site-Auto,代码行数:31,代码来源:comment_list_d.php

示例14: alter_data

 function alter_data()
 {
     $this->set_order(array('name', 'unique_name', 'slot_description', 'registration_slot_capacity', 'registrant_data'));
     $this->change_element_type('registrant_data', 'solidtext');
     $this->set_comments('registrant_data', form_comment('Registrant data is managed from the event listing on the public site'));
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:6,代码来源:event_slot_registration.php

示例15: do_basic_kaltura_field_modification

 /**
  * Simple form manipulation happens in this method related to kaltura-integrated things.
  */
 function do_basic_kaltura_field_modification()
 {
     $this->manager->add_required('av_type');
     $this->manager->set_display_name('av_type', 'Media Type');
     $this->manager->change_element_type('av_type', 'radio_no_sort', array('options' => array('Audio' => 'Audio <span class="smallText formComment">(e.g. sound-only music, speech, etc.)</span>', 'Video' => 'Video <span class="smallText formComment">(e.g. movies, videos, etc.)</span>')));
     if ($this->manager->get_value('media_duration')) {
         $this->manager->change_element_type('media_duration', 'solidtext');
     } else {
         $this->manager->change_element_type('media_duration', 'protected');
     }
     $this->manager->change_element_type('integration_library', 'protected');
     $this->manager->set_comments('description', form_comment('(e.g. "A Tour of Northfield")'));
     $this->manager->add_element('file_info_header', 'comment', array('text' => '<h4>Media Info</h4>'));
     $this->manager->add_element('access_header', 'comment', array('text' => '<h4>Access and Sharing</h4>'));
     $this->manager->change_element_type('transcoding_status', 'protected');
     $this->manager->change_element_type('entry_id', 'protected');
     $this->manager->change_element_type('email_notification', 'checkbox');
     $this->manager->set_display_name('email_notification', 'Email Alert');
     $this->manager->set_comments('email_notification', '<span class="smallText">Check this box to receive an email when your media finishes processing.</span>');
     $this->manager->set_value('email_notification', true);
     $this->manager->change_element_type('show_embed', 'checkbox');
     $this->manager->change_element_type('show_download', 'checkbox');
     if ($this->manager->get_value('transcoding_status') == 'ready') {
         $download_links_url = carl_make_link(array('cur_module' => 'MediaDownloadLinks'));
         $download_links_link = '<a href="' . $download_links_url . '"><strong>View download links for this media</strong></a>';
         $this->manager->add_element('download_links', 'commentWithLabel', array('text' => $download_links_link));
         $this->manager->set_display_name('download_links', '');
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:32,代码来源:media_work_content_manager_modifier.php


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