/**
 * woothemes_metabox_create function.
 *
 * @access public
 * @param object $post
 * @param array $callback
 * @return void
 */
function woothemes_metabox_create($post, $callback)
{
    global $post;
    // Allow child themes/plugins to act here.
    do_action('woothemes_metabox_create', $post, $callback);
    $seo_post_types = array('post', 'page');
    if (defined('SEOPOSTTYPES')) {
        $seo_post_types_update = unserialize(constant('SEOPOSTTYPES'));
    }
    if (!empty($seo_post_types_update)) {
        $seo_post_types = $seo_post_types_update;
    }
    $template_to_show = $callback['args'];
    $woo_metaboxes = get_option('woo_custom_template', array());
    $seo_metaboxes = get_option('woo_custom_seo_template', array());
    if (empty($seo_metaboxes) && $template_to_show == 'seo') {
        return;
    }
    // Array sanity check.
    if (!is_array($woo_metaboxes)) {
        $woo_metaboxes = array();
    }
    // Determine whether or not to display general fields.
    $display_general_fields = true;
    if (count($woo_metaboxes) <= 0) {
        $display_general_fields = false;
    }
    // Determine whether or not to display SEO fields.
    $display_seo_fields = true;
    if (get_option('seo_woo_hide_fields') == 'true' || get_option('seo_woo_use_third_party_data') == 'true') {
        $display_seo_fields = false;
    }
    $output = '';
    // Add nonce for custom fields.
    $output .= nxt_nonce_field('wooframework-custom-fields', 'wooframework-custom-fields-nonce', true, false);
    if ($callback['id'] == 'woothemes-settings') {
        // Add tabs.
        $output .= '<div class="wooframework-tabs">' . "\n";
        $output .= '<ul class="tabber hide-if-no-js">' . "\n";
        if ($display_general_fields) {
            $output .= '<li class="wf-tab-general"><a href="#wf-tab-general">' . __('General Settings', 'woothemes') . '</a></li>' . "\n";
        }
        if ($display_seo_fields) {
            $output .= '<li class="wf-tab-seo"><a href="#wf-tab-seo">' . __('SEO', 'woothemes') . '</a></li>' . "\n";
        }
        // Allow themes/plugins to add tabs to WooFramework custom fields.
        $output .= apply_filters('wooframework_custom_field_tab_headings', '');
        $output .= '</ul>' . "\n";
    }
    if ($display_general_fields) {
        $output .= woothemes_metabox_create_fields($woo_metaboxes, $callback, 'general');
    }
    if ($display_seo_fields && array_search(get_post_type(), $seo_post_types) !== false) {
        $output .= woothemes_metabox_create_fields($seo_metaboxes, $callback, 'seo');
    }
    // Allow themes/plugins to add tabs to WooFramework custom fields.
    $output = apply_filters('wooframework_custom_field_tab_content', $output);
    $output .= '</div>' . "\n";
    echo $output;
}
Exemple #2
0
</textarea>

	<input type="hidden" name="send_to_usernames" id="send-to-usernames" value="<?php 
bp_message_get_recipient_usernames();
?>
" class="<?php 
bp_message_get_recipient_usernames();
?>
" />

	<?php 
do_action('bp_after_messages_compose_content');
?>

	<div class="submit">
		<input type="submit" value="<?php 
_e("Send Message", 'buddypress');
?>
" name="send" id="send" />
	</div>

	<?php 
nxt_nonce_field('messages_send_message');
?>
</form>

<script type="text/javascript">
	document.getElementById("send-to-input").focus();
</script>

    /**
     * Dialog for internal linking.
     *
     * @since 3.1.0
     */
    public static function nxt_link_dialog()
    {
        ?>
	<div style="display:none;">
	<form id="nxt-link" tabindex="-1">
	<?php 
        nxt_nonce_field('internal-linking', '_ajax_linking_nonce', false);
        ?>
	<div id="link-selector">
		<div id="link-options">
			<p class="howto"><?php 
        _e('Enter the destination URL');
        ?>
</p>
			<div>
				<label><span><?php 
        _e('URL');
        ?>
</span><input id="url-field" type="text" tabindex="10" name="href" /></label>
			</div>
			<div>
				<label><span><?php 
        _e('Title');
        ?>
</span><input id="link-title-field" type="text" tabindex="20" name="linktitle" /></label>
			</div>
			<div class="link-target">
				<label><input type="checkbox" id="link-target-checkbox" tabindex="30" /> <?php 
        _e('Open link in a new window/tab');
        ?>
</label>
			</div>
		</div>
		<?php 
        $show_internal = '1' == get_user_setting('nxtlink', '0');
        ?>
		<p class="howto toggle-arrow <?php 
        if ($show_internal) {
            echo 'toggle-arrow-active';
        }
        ?>
" id="internal-toggle"><?php 
        _e('Or link to existing content');
        ?>
</p>
		<div id="search-panel"<?php 
        if (!$show_internal) {
            echo ' style="display:none"';
        }
        ?>
>
			<div class="link-search-wrapper">
				<label>
					<span><?php 
        _e('Search');
        ?>
</span>
					<input type="text" id="search-field" class="link-search-field" tabindex="60" autocomplete="off" />
					<img class="waiting" src="<?php 
        echo esc_url(admin_url('images/nxtspin_light.gif'));
        ?>
" alt="" />
				</label>
			</div>
			<div id="search-results" class="query-results">
				<ul></ul>
				<div class="river-waiting">
					<img class="waiting" src="<?php 
        echo esc_url(admin_url('images/nxtspin_light.gif'));
        ?>
" alt="" />
				</div>
			</div>
			<div id="most-recent-results" class="query-results">
				<div class="query-notice"><em><?php 
        _e('No search term specified. Showing recent items.');
        ?>
</em></div>
				<ul></ul>
				<div class="river-waiting">
					<img class="waiting" src="<?php 
        echo esc_url(admin_url('images/nxtspin_light.gif'));
        ?>
" alt="" />
				</div>
			</div>
		</div>
	</div>
	<div class="submitbox">
		<div id="nxt-link-cancel">
			<a class="submitdelete deletion" href="#"><?php 
        _e('Cancel');
        ?>
</a>
		</div>
		<div id="nxt-link-update">
			<input type="submit" tabindex="100" value="<?php 
        esc_attr_e('Add Link');
        ?>
" class="button-primary" id="nxt-link-submit" name="nxt-link-submit">
		</div>
	</div>
	</form>
	</div>
	<?php 
    }
    function step_finish()
    {
        if (!current_user_can('activate_plugins')) {
            return false;
        }
        // What type of action is happening here?
        $type = 'install' == $this->setup_type ? __('setup', 'buddypress') : __('update', 'buddypress');
        ?>

		<p><?php 
        printf(__("The BuddyPress %1\$s is complete, and your site is ready to go!", 'buddypress'), $type, $type);
        ?>
</p>

		<div class="submit clear">
			<input type="hidden" name="save" value="finish" />
			<input type="hidden" name="step" value="<?php 
        echo esc_attr($this->current_step);
        ?>
" />

			<?php 
        nxt_nonce_field('bpwizard_finish');
        ?>

		</div>

	<?php 
    }
 /**
  * screen()
  * 
  * Handles the nxt-admin screen
  */
 function screen()
 {
     $nonce_name = 'courseware_options';
     $vars = array();
     $vars['nonce'] = nxt_nonce_field($nonce_name, '_nxtnonce', true, false);
     $is_nonce = false;
     if (isset($_POST['_nxtnonce'])) {
         check_admin_referer($nonce_name);
     }
     // Courseware Global Status
     if (isset($_POST['bpsp_global_status'])) {
         if (update_option('bpsp_global_status', strtolower($_POST['bpsp_global_status']))) {
             $vars['flash'][] = __('Courseware option was updated.', 'bpsp');
         }
     }
     if (!isset($_POST['bpsp_global_status']) && isset($_POST['bpsp_global_status_check'])) {
         if (update_option('bpsp_global_status', '')) {
             $vars['flash'][] = __('Courseware option was updated.', 'bpsp');
         }
     }
     // Courseware Collaborative Settings
     if (isset($_POST['bpsp_allow_only_admins'])) {
         if (update_option('bpsp_allow_only_admins', strtolower($_POST['bpsp_allow_only_admins']))) {
             $vars['flash'][] = __('Courseware option was updated.', 'bpsp');
         }
     }
     if (!isset($_POST['bpsp_allow_only_admins']) && isset($_POST['bpsp_allow_only_admins_check'])) {
         if (update_option('bpsp_allow_only_admins', '')) {
             $vars['flash'][] = __('Courseware option was updated.', 'bpsp');
         }
     }
     // Courseware Private Responses
     if (isset($_POST['bpsp_private_responses_check'])) {
         if (update_option('bpsp_private_responses', strtolower($_POST['bpsp_private_responses']))) {
             $vars['flash'][] = __('Courseware option was updated.', 'bpsp');
         }
     }
     if (isset($_POST['bpsp_private_responses_check']) && !isset($_POST['bpsp_private_responses'])) {
         if (update_option('bpsp_private_responses', '')) {
             $vars['flash'][] = __('Courseware option was updated.', 'bpsp');
         }
     }
     // Courseware Default Gradebook Format
     if (isset($_POST['bpsp_gradebook_format_check']) && isset($_POST['bpsp_gradebook_format'])) {
         if (update_option('bpsp_gradebook_format', strtolower($_POST['bpsp_gradebook_format']))) {
             $vars['flash'][] = __('Courseware gradebook format option was updated.', 'bpsp');
         }
     }
     // Courseware Bibliography Webservices Integration
     if (isset($_POST['worldcat_key']) && !empty($_POST['worldcat_key'])) {
         if (update_option('bpsp_worldcat_key', $_POST['worldcat_key'])) {
             $vars['flash'][] = __('WorldCat option was updated.', 'bpsp');
         }
     }
     if (isset($_POST['isbndb_key']) && !empty($_POST['isbndb_key'])) {
         if (update_option('bpsp_isbndb_key', $_POST['isbndb_key'])) {
             $vars['flash'][] = __('ISBNdb option was updated.', 'bpsp');
         }
     }
     // Courseware Custom CSS
     if (isset($_POST['bpsp_load_css_check']) && isset($_POST['bpsp_load_css'])) {
         if (update_option('bpsp_load_css', strtolower($_POST['bpsp_load_css']))) {
             $vars['flash'][] = __('Courseware customization options updated.', 'bpsp');
         }
     }
     if (isset($_POST['bpsp_load_css_check']) && !isset($_POST['bpsp_load_css'])) {
         if (update_option('bpsp_load_css', '')) {
             $vars['flash'][] = __('Courseware customization options updated.', 'bpsp');
         }
     }
     $vars['name'] = 'admin';
     $vars['echo'] = 'true';
     $vars['bpsp_private_responses'] = get_option('bpsp_private_responses');
     $vars['bpsp_gradebook_format'] = get_option('bpsp_gradebook_format');
     $vars['bpsp_allow_only_admins'] = get_option('bpsp_allow_only_admins');
     $vars['bpsp_global_status'] = get_option('bpsp_global_status');
     $vars['worldcat_key'] = get_option('bpsp_worldcat_key');
     $vars['isbndb_key'] = get_option('bpsp_isbndb_key');
     $vars['bpsp_load_css'] = get_option('bpsp_load_css');
     //Load the template
     self::load_template($vars);
 }
    do_action('bp_after_group_send_invites_list');
    ?>

		</div><!-- .main-column -->

		<div class="clear"></div>

		<div class="submit">
			<input type="submit" name="submit" id="submit" value="<?php 
    _e('Send Invites', 'buddypress');
    ?>
" />
		</div>

		<?php 
    nxt_nonce_field('groups_send_invites', '_nxtnonce_send_invites');
    ?>

		<?php 
    /* This is important, don't forget it */
    ?>
		<input type="hidden" name="group_id" id="group_id" value="<?php 
    bp_group_id();
    ?>
" />

	</form><!-- #send-invite-form -->

<?php 
} else {
    ?>
 /**
  * gradebook_screen( $vars )
  *
  * Hooks into screen_handler
  * Adds a UI to assignments for gradebook management.
  *
  * @param Array $vars a set of variables received for this screen template
  * @return Array $vars a set of variable passed to this screen template
  */
 function gradebook_screen($vars)
 {
     global $bp;
     $nonce_name = 'gradebook_nonce';
     $nonce_import_name = 'gradebook_import_nonce';
     $nonce_clear_name = 'gradebook_clear_nonce';
     if (!$this->has_gradebook_caps($bp->loggedin_user->id) && !is_super_admin()) {
         $vars['die'] = __('BuddyPress Courseware Error while forbidden user tried to manage gradebook.', 'bpsp');
         return $vars;
     }
     $students = BP_Groups_Member::get_all_for_group($bp->groups->current_group->id);
     if (isset($_POST['_nxtnonce'])) {
         $is_nonce = nxt_verify_nonce($_POST['_nxtnonce'], $nonce_name);
     }
     if (isset($_POST['_nxtnonce']) && true != $is_nonce) {
         $vars['die'] = __('BuddyPress Courseware Nonce Error while updating gradebook.', 'bpsp');
         return $vars;
     }
     $gradebook_id = $this->has_gradebook($this->current_assignment);
     if (!$gradebook_id) {
         $vars['die'] = __('BuddyPress Courseware Error while creating gradebook.', 'bpsp');
         return $vars;
     }
     if (!empty($_POST['grade'])) {
         foreach ($_POST['grade'] as $grade) {
             if (!empty($grade) && !empty($grade['uid']) && !empty($grade['value'])) {
                 # If grade was added or updated!
                 $status = $this->save_grade($gradebook_id, $grade);
                 if ($status !== null) {
                     $data = array('grade' => $grade, 'teacher' => $bp->loggedin_user->userdata, 'assignment' => $this->current_assignment);
                     if ($status == true) {
                         do_action('courseware_grade_added', $data);
                     } else {
                         do_action('courseware_grade_updated', $data);
                     }
                 }
             }
         }
         $vars['message'] = __('Gradebook saved.', 'bpsp');
     }
     $vars['name'] = 'gradebook';
     $vars['students'] = $students['members'];
     if (empty($vars['grades'])) {
         $vars['grades'] = $this->load_grades($gradebook_id, true);
     }
     $vars['bpsp_gradebook_format'] = get_option('bpsp_gradebook_format');
     $vars['assignment'] = BPSP_Assignments::is_assignment($this->current_assignment);
     $vars['gradebook_permalink'] = $vars['assignment_permalink'] . '/gradebook';
     $vars['clear_gradebook_permalink'] = add_query_arg('_nxtnonce', nxt_create_nonce($nonce_clear_name), $vars['gradebook_permalink'] . '/clear');
     $vars['import_gradebook_nonce'] = nxt_nonce_field($nonce_import_name, '_nxtnonce', true, false);
     $vars['nonce'] = nxt_nonce_field($nonce_name, '_nxtnonce', true, false);
     return $vars;
 }
Exemple #8
0
/**
 * Last used by core in BP 1.1. The markup was merged into DTheme's header.php template.
 */
function bp_search_form()
{
    _deprecated_function(__FUNCTION__, '1.1', 'No longer required.');
    $form = '
		<form action="' . bp_search_form_action() . '" method="post" id="search-form">
			<input type="text" id="search-terms" name="search-terms" value="" />
			' . bp_search_form_type_select() . '

			<input type="submit" name="search-submit" id="search-submit" value="' . __('Search', 'buddypress') . '" />
			' . nxt_nonce_field('bp_search_form') . '
		</form>
	';
    echo apply_filters('bp_search_form', $form);
}
    /**
     * Handles the logic to display the admin page for the plugin.
     *
     * @access private
     * @since 0.2
     */
    public function _admin_page()
    {
        // Update the plugin options
        if ($_POST) {
            check_admin_referer($this->get_uid());
            $this->update_option('required_weekly_words', absint(ClassBlogs_Utils::sanitize_user_input($_POST['required_weekly_words'])));
            ClassBlogs_Admin::show_admin_message(__('Your word-counter options been updated.', 'classblogs'));
        }
        ?>

	<div class="wrap">
		<?php 
        ClassBlogs_Admin::show_admin_icon();
        ?>
		<h2><?php 
        _e('Student Word Counts', 'classblogs');
        ?>
</h2>
<?php 
        // Show the word-count table if we have word counts
        $word_counts = $this->_get_weekly_word_counts();
        $student_ids = ClassBlogs_Students::get_student_user_ids();
        if (!empty($word_counts)) {
            // Compute the total word counts for each student
            $total_counts = array();
            foreach ($student_ids as $student_id) {
                $total_counts[$student_id] = 0;
                foreach ($word_counts as $week_counts) {
                    $total_counts[$student_id] += $week_counts['user_counts'][$student_id];
                }
            }
            // Precompute each student's name
            $student_names = array();
            foreach ($student_ids as $student_id) {
                $user_data = get_userdata($student_id);
                $student_names[$student_id] = $user_data->display_name;
            }
            ?>
		<h3><?php 
            _e('Word Counts by Week', 'classblogs');
            ?>
</h3>

		<p id="student-word-counts-instructions">
			<?php 
            _e('The table below shows the word counts for each student, drawn from any posts and comments that they have written, broken down by the week for which those counts are calculated.  The date displayed in the "Week of" column is for the Monday that started that week.', 'classblogs');
            ?>
		</p>

		<div id="student-word-counts-wrap">
			<table id="student-word-counts">

				<thead>
					<tr>
						<th class="week"><?php 
            _e('Week of', 'classblogs');
            ?>
</th>
						<?php 
            // Show each student's name in the header
            foreach ($student_ids as $student_id) {
                printf('<th>%s</th>', esc_html($student_names[$student_id]));
            }
            ?>
					</tr>
				</thead>

				<tfoot>
					<th><?php 
            _e('Totals', 'classblogs');
            ?>
</th>
					<?php 
            // Display each student's total words in the footer
            foreach ($student_ids as $student_id) {
                printf('<td title="%s">%s</td>', esc_attr($student_names[$student_id]), number_format($total_counts[$student_id]));
            }
            ?>
				</tfoot>

				<tbody>
					<?php 
            // Show each week and every student's total words for that week
            $required_words = $this->get_option('required_weekly_words');
            foreach ($word_counts as $week_counts) {
                echo "<tr>";
                $verbose_date = date_i18n('M j, Y', (int) $week_counts['week_start']->format('U'));
                printf('<th class="week">%s</th>', $verbose_date);
                $counter = 0;
                foreach ($student_ids as $student_id) {
                    $classes = array();
                    $count = $week_counts['user_counts'][$student_id];
                    if (!$count) {
                        $classes[] = 'null';
                    } else {
                        if ($count < $required_words) {
                            $classes[] = 'under';
                        } else {
                            if ($count >= $required_words) {
                                $classes[] = 'over';
                            }
                        }
                    }
                    $classes[] = $counter % 2 ? 'even' : 'odd';
                    $counter++;
                    printf('<td title="%s" class="%s">%s</td>', esc_attr(sprintf(__('%1$s on %2$s'), $student_names[$student_id], $verbose_date)), implode(' ', $classes), number_format($count));
                }
                echo "</tr>";
            }
            ?>
				</tbody>

			</table>
		</div>

		<?php 
        }
        ?>

		<h3><?php 
        _e('Options', 'classblogs');
        ?>
</h3>

		<form method="post" action="">

			<table class="form-table">
				<tr valign="top">
					<th scope="row"><?php 
        _e('Required Weekly Words', 'classblogs');
        ?>
</th>
					<td>
						<input type="text" name="required_weekly_words" id="required-weekly-words" value="<?php 
        echo esc_attr($this->get_option('required_weekly_words'));
        ?>
" /><br />
						<label for="required-weekly-words"><?php 
        _e('The number of words a student must write per week.', 'classblogs');
        ?>
</label>
					</td>
				</tr>
			</table>

			<?php 
        nxt_nonce_field($this->get_uid());
        ?>
			<p class="submit"><input type="submit" class="button-primary" name="Submit" value="<?php 
        _e('Update Required Word Count', 'classblogs');
        ?>
" /></p>
		</form>

	</div>

<?php 
    }
Exemple #10
0
/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (get_option('siteurl') != get_option('home')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . sprintf(__('Your <strong>NXTClass address</strong> must match your <strong>Site address</strong> before creating a Network. See <a href="%s">General Settings</a>.'), esc_url(admin_url('options-general.php'))) . '</p></div>';
        echo '</div>';
        include ABSPATH . 'nxt-admin/admin-footer.php';
        die;
    }
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'nxt-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'nxt-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        echo '<p>' . sprintf(__('You cannot use port numbers such as <code>%s</code>.'), $has_ports) . '</p>';
        echo '<a href="' . esc_url(admin_url()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'nxt-admin/admin-footer.php';
        die;
    }
    echo '<form method="post" action="">';
    nxt_nonce_field('install-network-1');
    $error_codes = array();
    if (is_nxt_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (nxt_CONTENT_DIR != ABSPATH . 'nxt-content') {
        echo '<div class="error"><p><strong>' . __('Warning!') . '</strong> ' . __('Networks may not be fully compatible with custom nxt-content directories.') . '</p></div>';
    }
    $site_name = !empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = !empty($_POST['email']) && !in_array('invalid_email', $error_codes) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?>
</p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of NXTClass sites. We will create configuration files in the next step.');
    ?>
</p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ' . __('Please make sure the Apache <code>mod_rewrite</code> module is installed as it will be used at the end of this installation.') . '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('It looks like the Apache <code>mod_rewrite</code> module is not installed.') . '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>' . __('If <code>mod_rewrite</code> is disabled, ask your administrator to enable that module, or look at the <a href="http://httpd.apache.org/docs/mod/mod_rewrite.html">Apache documentation</a> or <a href="http://www.google.com/search?q=apache+mod_rewrite">elsewhere</a> for help setting it up.') . '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?>
</h3>
		<p><?php 
        _e('Please choose whether you would like sites in your NXTClass network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>');
        ?>
</p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?>
</p>
		<?php 
        // @todo: Link to an MS readme?
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type='radio' name='subdomain_install' value='1'<?php 
        checked($subdomain_install);
        ?>
 /> <?php 
        _e('Sub-domains');
        ?>
</label></th>
				<td><?php 
        printf(_x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'), $hostname);
        ?>
</td>
			</tr>
			<tr>
				<th><label><input type='radio' name='subdomain_install' value='0'<?php 
        checked(!$subdomain_install);
        ?>
 /> <?php 
        _e('Sub-directories');
        ?>
</label></th>
				<td><?php 
        printf(_x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'), $hostname);
        ?>
</td>
			</tr>
		</table>

<?php 
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?>
</h3>
		<p><?php 
        printf(__('We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the <code>www</code> prefix with an address like <code>%2$s</code> but any links will not have the <code>www</code> prefix.'), substr($hostname, 4), $hostname);
        ?>
</p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?>
</th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?>
</h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?>
</th>
				<td><?php 
        _e('Because you are using <code>localhost</code>, the sites in your NXTClass network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?>
</th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your NXTClass network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?>
</th>
				<td><?php 
        _e('Because your install is not new, the sites in your NXTClass network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?>
</th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?>
</th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>
' />
					<br /><?php 
    _e('What would you like to call your network?');
    ?>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Admin E-mail Address');
    ?>
</th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>
' />
					<br /><?php 
    _e('Your email address.');
    ?>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}
function bp_group_member_admin_pagination()
{
    echo bp_get_group_member_admin_pagination();
    nxt_nonce_field('bp_groups_member_admin_list', '_member_admin_pag_nonce');
}
Exemple #12
0
    }
    ?>
	</div>
	<div style="clear: left"></div>

	<input type="submit" name="achievement-change-picture" id="achievement-change-picture" value="<?php 
    _e('Update Picture', 'dpa');
    ?>
">
	<input type="hidden" name="picture_id" id="picture_id" value="<?php 
    echo esc_attr(dpa_get_achievement_picture_id());
    ?>
" />

	<?php 
    nxt_nonce_field('achievement-change-picture-' . dpa_get_achievement_slug());
    ?>
	</form>

	<div id="pag-bottom" class="pagination no-ajax">
		<div class="pag-count" id="achievement-change-picture-dir-count">
			<?php 
    dpa_change_picture_pagination_count();
    ?>
		</div>

		<div class="pagination-links" id="achievement-change-picture-dir-pag">
			<?php 
    dpa_change_picture_pagination();
    ?>
		</div>
Exemple #13
0
<form id="addtag" method="post" action="edit-tags.php" class="validate">
<input type="hidden" name="action" value="add-tag" />
<input type="hidden" name="screen" value="<?php 
            echo esc_attr($current_screen->id);
            ?>
" />
<input type="hidden" name="taxonomy" value="<?php 
            echo esc_attr($taxonomy);
            ?>
" />
<input type="hidden" name="post_type" value="<?php 
            echo esc_attr($post_type);
            ?>
" />
<?php 
            nxt_nonce_field('add-tag', '_nxtnonce_add-tag');
            ?>

<div class="form-field form-required">
	<label for="tag-name"><?php 
            _ex('Name', 'Taxonomy Name');
            ?>
</label>
	<input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
	<p><?php 
            _e('The name is how it appears on your site.');
            ?>
</p>
</div>
<?php 
            if (!global_terms_enabled()) {
Exemple #14
0
function jfb_output_facebook_callback($redirectTo = 0, $callbackName = 0)
{
    //Make sure the plugin is setup properly before doing anything
    global $jfb_name, $jfb_version;
    global $opt_jfb_ask_perms, $opt_jfb_valid, $jfb_nonce_name;
    global $jfb_js_callbackfunc, $opt_jfb_ask_stream, $jfb_callback_list;
    if (!get_option($opt_jfb_valid)) {
        return;
    }
    //Get out our params
    if (!$redirectTo) {
        $redirectTo = htmlspecialchars($_SERVER['REQUEST_URI']);
    }
    if (!$callbackName) {
        $callbackName = $jfb_js_callbackfunc;
    }
    echo "\n<!-- {$jfb_name} Callback v{$jfb_version} -->\n";
    //Make sure we haven't already output a callback with this name
    if (in_array($callbackName, $jfb_callback_list)) {
        echo "\n<!--jfb_output_facebook_callback has already generated a callback named {$callbackName}!  Skipping.-->\n";
        return;
    } else {
        array_push($jfb_callback_list, $callbackName);
    }
    //Output an html form that we'll submit via JS once the FB login is complete; it redirects us to the PHP script that logs us into nxt.
    ?>
  
  <form id="nxt-fb-ac-fm" name="<?php 
    echo $callbackName;
    ?>
_form" method="post" action="<?php 
    echo plugins_url(dirname(plugin_basename(__FILE__))) . "/_process_login.php";
    ?>
" >
      <input type="hidden" name="redirectTo" value="<?php 
    echo $redirectTo;
    ?>
" />
<?php 
    //An action to allow the user to inject additional data in the form, to be transferred to the login script
    do_action('nxtfb_add_to_form');
    ?>
      <?php 
    nxt_nonce_field($jfb_nonce_name, $jfb_nonce_name);
    ?>
   
    </form>
<?php 
    //Output the JS callback function, which Facebook will automatically call once it's been logged in.
    ?>
<script type="text/javascript">//<!--
    function <?php 
    echo $callbackName;
    ?>
()
    {
<?php 
    //An action to allow the user to inject additional javascript to get executed before the login takes place
    do_action('nxtfb_add_to_js', $callbackName);
    //First, make sure the user logged into Facebook (didn't click "cancel" in the login prompt)
    echo "    //Make sure the user logged in\n" . "    FB.getLoginStatus(function(response)\n" . "    {\n" . "      if (!response.authResponse)\n" . "      {\n" . apply_filters('nxtfb_login_rejected', '') . "      return;\n" . "      }\n\n";
    //Submit the login and close the FB.getLoginStatus call
    echo apply_filters('nxtfb_submit_loginfrm', "      document." . $callbackName . "_form.submit();\n");
    echo "    });\n";
    ?>
    }
    //--></script>
    <?php 
}
Exemple #15
0
    do_action('bp_before_registration_submit_buttons');
    ?>

				<div class="submit">
					<input type="submit" name="signup_submit" id="signup_submit" value="<?php 
    _e('Complete Sign Up', 'buddypress');
    ?>
" />
				</div>

				<?php 
    do_action('bp_after_registration_submit_buttons');
    ?>

				<?php 
    nxt_nonce_field('bp_new_signup');
    ?>

			<?php 
}
// request-details signup step
?>

			<?php 
if ('completed-confirmation' == bp_get_current_signup_step()) {
    ?>

				<h2><?php 
    _e('Sign Up Complete!', 'buddypress');
    ?>
</h2>
Exemple #16
0
function dm_manage_page()
{
    global $nxtdb, $parent_file;
    if (isset($_GET['updated'])) {
        do_action('dm_echo_updated_msg');
    }
    dm_sunrise_warning();
    echo "<div class='wrap'><h2>" . __('Domain Mapping', 'nxtclass-mu-domain-mapping') . "</h2>";
    if (false == get_site_option('dm_ipaddress') && false == get_site_option('dm_cname')) {
        if (dm_site_admin()) {
            _e("Please set the IP address or CNAME of your server in the <a href='nxtmu-admin.php?page=dm_admin_page'>site admin page</a>.", 'nxtclass-mu-domain-mapping');
        } else {
            _e("This plugin has not been configured correctly yet.", 'nxtclass-mu-domain-mapping');
        }
        echo "</div>";
        return false;
    }
    if (false == isset($_SERVER['HTTPS'])) {
        $_SERVER['HTTPS'] = 'Off';
    }
    $protocol = 'on' == strtolower($_SERVER['HTTPS']) ? 'https://' : 'http://';
    $domains = $nxtdb->get_results("SELECT * FROM {$nxtdb->dmtable} WHERE blog_id = '{$nxtdb->blogid}'", ARRAY_A);
    if (is_array($domains) && !empty($domains)) {
        $orig_url = parse_url(get_original_url('siteurl'));
        $domains[] = array('domain' => $orig_url['host'], 'path' => $orig_url['path'], 'active' => 0);
        echo "<h3>" . __('Active domains on this blog', 'nxtclass-mu-domain-mapping') . "</h3>";
        echo '<form method="POST">';
        echo "<table><tr><th>" . __('Primary', 'nxtclass-mu-domain-mapping') . "</th><th>" . __('Domain', 'nxtclass-mu-domain-mapping') . "</th><th>" . __('Delete', 'nxtclass-mu-domain-mapping') . "</th></tr>\n";
        $primary_found = 0;
        $del_url = add_query_arg(array('page' => 'domainmapping', 'action' => 'delete'), admin_url($parent_file));
        foreach ($domains as $details) {
            if (0 == $primary_found && $details['domain'] == $orig_url['host']) {
                $details['active'] = 1;
            }
            echo "<tr><td>";
            echo "<input type='radio' name='domain' value='{$details['domain']}' ";
            if ($details['active'] == 1) {
                echo "checked='1' ";
            }
            echo "/>";
            $url = "{$protocol}{$details['domain']}{$details['path']}";
            echo "</td><td><a href='{$url}'>{$url}</a></td><td style='text-align: center'>";
            if ($details['domain'] != $orig_url['host'] && $details['active'] != 1) {
                echo "<a href='" . nxt_nonce_url(add_query_arg(array('domain' => $details['domain']), $del_url), "delete" . $details['domain']) . "'>Del</a>";
            }
            echo "</td></tr>";
            if (0 == $primary_found) {
                $primary_found = $details['active'];
            }
        }
        ?>
</table><?php 
        echo '<input type="hidden" name="action" value="primary" />';
        echo "<p><input type='submit' class='button-primary' value='" . __('Set Primary Domain', 'nxtclass-mu-domain-mapping') . "' /></p>";
        nxt_nonce_field('domain_mapping');
        echo "</form>";
        echo "<p>" . __("* The primary domain cannot be deleted.", 'nxtclass-mu-domain-mapping') . "</p>";
        if (get_site_option('dm_no_primary_domain') == 1) {
            echo __('<strong>Warning!</strong> Primary domains are currently disabled.', 'nxtclass-mu-domain-mapping');
        }
    }
    echo "<h3>" . __('Add new domain', 'nxtclass-mu-domain-mapping') . "</h3>";
    echo '<form method="POST">';
    echo '<input type="hidden" name="action" value="add" />';
    echo "<p>http://<input type='text' name='domain' value='' />/<br />";
    nxt_nonce_field('domain_mapping');
    echo "<input type='checkbox' name='primary' value='1' /> " . __('Primary domain for this blog', 'nxtclass-mu-domain-mapping') . "</p>";
    echo "<p><input type='submit' class='button-secondary' value='" . __("Add", 'nxtclass-mu-domain-mapping') . "' /></p>";
    echo "</form><br />";
    if (get_site_option('dm_cname')) {
        $dm_cname = get_site_option('dm_cname');
        echo "<p>" . sprintf(__('If you want to redirect a domain you will need to add a DNS "CNAME" record pointing to the following domain name for this server: <strong>%s</strong>', 'nxtclass-mu-domain-mapping'), $dm_cname) . "</p>";
        echo "<p>" . __('Google have published <a href="http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=58317" target="_blank">instructions</a> for creating CNAME records on various hosting platforms such as GoDaddy and others.', 'nxtclass-mu-domain-mapping') . "</p>";
    } else {
        echo "<p>" . __('If your domain name includes a hostname like "www", "blog" or some other prefix before the actual domain name you will need to add a CNAME for that hostname in your DNS pointing at this blog URL.', 'nxtclass-mu-domain-mapping') . "</p>";
        $dm_ipaddress = get_site_option('dm_ipaddress', 'IP not set by admin yet.');
        if (strpos($dm_ipaddress, ',')) {
            echo "<p>" . sprintf(__('If you want to redirect a domain you will need to add DNS "A" records pointing at the IP addresses of this server: <strong>%s</strong>', 'nxtclass-mu-domain-mapping'), $dm_ipaddress) . "</p>";
        } else {
            echo "<p>" . sprintf(__('If you want to redirect a domain you will need to add a DNS "A" record pointing at the IP address of this server: <strong>%s</strong>', 'nxtclass-mu-domain-mapping'), $dm_ipaddress) . "</p>";
        }
    }
    echo '<p>' . sprintf(__('<strong>Note:</strong> %s', 'nxtclass-mu-domain-mapping'), dm_idn_warning()) . "</p>";
    echo "</div>";
}
Exemple #17
0
                ?>
</a></li>
<?php 
            }
            ?>
	</ul>
<?php 
        }
        ?>
</div>
<?php 
        if (!$error) {
            ?>
	<form name="template" id="template" action="theme-editor.php" method="post">
	<?php 
            nxt_nonce_field('edit-theme_' . $file . $theme);
            ?>
		 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php 
            echo $content;
            ?>
</textarea>
		 <input type="hidden" name="action" value="update" />
		 <input type="hidden" name="file" value="<?php 
            echo esc_attr($file);
            ?>
" />
		 <input type="hidden" name="theme" value="<?php 
            echo esc_attr($theme);
            ?>
" />
		 <input type="hidden" name="scrollto" id="scrollto" value="<?php 
Exemple #18
0
        do_action('groups_forum_new_topic_after');
        ?>

							<div class="submit">
								<input type="submit" name="submit_topic" id="submit" value="<?php 
        _e('Post Topic', 'buddypress');
        ?>
" />
								<input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php 
        _e('Cancel', 'buddypress');
        ?>
" />
							</div>

							<?php 
        nxt_nonce_field('bp_forums_new_topic');
        ?>

						</form><!-- #forum-topic-form -->

					<?php 
    } elseif (bp_is_active('groups')) {
        ?>

						<div id="message" class="info">

							<p><?php 
        printf(__("You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress'), site_url(bp_get_groups_root_slug() . '/create/'));
        ?>
</p>
Exemple #19
0
    ?>
</label>

	<?php 
    do_action('bp_after_group_delete_admin');
    ?>

	<div class="submit">
		<input type="submit" disabled="disabled" value="<?php 
    _e('Delete Group', 'buddypress');
    ?>
" id="delete-group-button" name="delete-group-button" />
	</div>

	<?php 
    nxt_nonce_field('groups_delete_group');
    ?>

<?php 
}
?>

<?php 
/* This is important, don't forget it */
?>
	<input type="hidden" name="group-id" id="group-id" value="<?php 
bp_group_id();
?>
" />

<?php 
Exemple #20
0
    } else {
        ?>

						<div id="message" class="info">
							<p><?php 
        _e('Once you have built up friend connections you will be able to invite others to your group. You can send invites any time in the future by selecting the "Send Invites" option when viewing your new group.', 'huddle');
        ?>
</p>
						</div>

					<?php 
    }
    ?>

					<?php 
    nxt_nonce_field('groups_create_save_group-invites');
    ?>

					<?php 
    do_action('bp_after_group_invites_creation_step');
    ?>

				<?php 
}
?>

				<?php 
do_action('groups_custom_create_steps');
// Allow plugins to add custom group creation steps
?>
    /**
     * Displays the plugin's admin page.
     *
     * @access private
     * @since 0.2
     */
    public function _admin_page()
    {
        // Change the state of sitewide commenting if switching
        if ($_POST) {
            check_admin_referer($this->get_uid());
            $this->update_option('comments_disabled', $_POST['comment_status'] === 'disabled');
            ClassBlogs_Admin::show_admin_message(__('Your sitewide commenting options have been updated', 'classblogs'));
        }
        ?>
		<div class="wrap">

			<?php 
        ClassBlogs_Admin::show_admin_icon();
        ?>
			<h2><?php 
        _e('Disable Commenting', 'classblogs');
        ?>
</h2>

			<p>
				<?php 
        _e('This page allows you to disable commenting on every blog on this site, which includes both the root blog and the student blogs.  Any new posts will have commenting disabled by default, and all existing posts will not be able to receive comments.', 'classblogs');
        ?>
			</p>

			<form method="post" action="">

					<table class="form-table">
						<tr valign="top">
							<th scope="row"><?php 
        _e('Commenting on All Blogs is', 'classblogs');
        ?>
</th>
							<td>
								<input type="radio" name="comment_status" value="enabled" id="comments-enabled" <?php 
        if (!$this->get_option('comments_disabled')) {
            ?>
checked="checked"<?php 
        }
        ?>
 />
								<label for="comments-enabled"><?php 
        _e('Enabled', 'classblogs');
        ?>
</label>
								<input type="radio" name="comment_status" value="disabled" id="comments-disabled" <?php 
        if ($this->get_option('comments_disabled')) {
            ?>
checked="checked"<?php 
        }
        ?>
 />
								<label for="comments-disabled"><?php 
        _e('Disabled', 'classblogs');
        ?>
</label>
							</td>
						</tr>
					</table>

				<?php 
        nxt_nonce_field($this->get_uid());
        ?>
				<p class="submit"><input type="submit" class="button-primary" name="Submit" value="<?php 
        _e('Update Commenting Status', 'classblogs');
        ?>
" /></p>
			</form>
		</div>
<?php 
    }
Exemple #22
0
        ?>
" /> &nbsp; <?php 
        _e('or press esc to cancel.', 'buddypress');
        ?>
						<input type="hidden" name="comment_form_id" value="<?php 
        bp_activity_id();
        ?>
" />
					</div>

					<?php 
        do_action('bp_activity_entry_comments');
        ?>

					<?php 
        nxt_nonce_field('new_activity_comment', '_nxtnonce_new_activity_comment');
        ?>

				</form>

			<?php 
    }
    ?>

		</div>

	<?php 
}
?>

	<?php 
/**
 * Handles all actions for the admin area for creating, editing and deleting
 * profile groups and fields.
 */
function xprofile_admin($message = '', $type = 'error')
{
    global $bp;
    $type = preg_replace('|[^a-z]|i', '', $type);
    $groups = BP_XProfile_Group::get(array('fetch_fields' => true));
    if (isset($_GET['mode']) && isset($_GET['group_id']) && 'add_field' == $_GET['mode']) {
        xprofile_admin_manage_field($_GET['group_id']);
    } else {
        if (isset($_GET['mode']) && isset($_GET['group_id']) && isset($_GET['field_id']) && 'edit_field' == $_GET['mode']) {
            xprofile_admin_manage_field($_GET['group_id'], $_GET['field_id']);
        } else {
            if (isset($_GET['mode']) && isset($_GET['field_id']) && 'delete_field' == $_GET['mode']) {
                xprofile_admin_delete_field($_GET['field_id'], 'field');
            } else {
                if (isset($_GET['mode']) && isset($_GET['option_id']) && 'delete_option' == $_GET['mode']) {
                    xprofile_admin_delete_field($_GET['option_id'], 'option');
                } else {
                    if (isset($_GET['mode']) && 'add_group' == $_GET['mode']) {
                        xprofile_admin_manage_group();
                    } else {
                        if (isset($_GET['mode']) && isset($_GET['group_id']) && 'delete_group' == $_GET['mode']) {
                            xprofile_admin_delete_group($_GET['group_id']);
                        } else {
                            if (isset($_GET['mode']) && isset($_GET['group_id']) && 'edit_group' == $_GET['mode']) {
                                xprofile_admin_manage_group($_GET['group_id']);
                            } else {
                                ?>

	<div class="wrap">

		<?php 
                                screen_icon('buddypress');
                                ?>

		<h2>

			<?php 
                                _e('Extended Profile Fields', 'buddypress');
                                ?>

			<a id="add_group" class="button add-new-h2" href="admin.php?page=bp-profile-setup&amp;mode=add_group"><?php 
                                _e('Add New Group', 'buddypress');
                                ?>
</a>
		</h2>

		<p><?php 
                                _e('Your users will distinguish themselves through their profile page. You must give them profile fields that allow them to describe themselves in a way that is relevant to the theme of your social network.', 'buddypress');
                                ?>
</p>
		<p><?php 
                                echo sprintf(__('NOTE: Any fields in the "%s" group will appear on the signup page.', 'buddypress'), esc_html(stripslashes(bp_get_option('bp-xprofile-base-group-name'))));
                                ?>
</p>

		<form action="" id="profile-field-form" method="post">

			<?php 
                                nxt_nonce_field('bp_reorder_fields', '_nxtnonce_reorder_fields');
                                ?>

			<?php 
                                nxt_nonce_field('bp_reorder_groups', '_nxtnonce_reorder_groups', false);
                                if (!empty($message)) {
                                    $type = $type == 'error' ? 'error' : 'updated';
                                    ?>

				<div id="message" class="<?php 
                                    echo $type;
                                    ?>
 fade">
					<p><?php 
                                    echo esc_html(esc_attr($message));
                                    ?>
</p>
				</div>

<?php 
                                }
                                ?>

			<div id="tabs">
				<ul id="field-group-tabs">
<?php 
                                if (!empty($groups)) {
                                    foreach ($groups as $group) {
                                        ?>

					<li id="group_<?php 
                                        echo $group->id;
                                        ?>
"><a href="#tabs-<?php 
                                        echo $group->id;
                                        ?>
" class="ui-tab"><?php 
                                        echo esc_attr($group->name);
                                        if (!$group->can_delete) {
                                            ?>
 <?php 
                                            _e('(Primary)', 'buddypress');
                                        }
                                        ?>
</a></li>

<?php 
                                    }
                                }
                                ?>

				</ul>

<?php 
                                if (!empty($groups)) {
                                    foreach ($groups as $group) {
                                        ?>

					<noscript>
						<h3><?php 
                                        echo esc_attr($group->name);
                                        ?>
</h3>
					</noscript>

					<div id="tabs-<?php 
                                        echo $group->id;
                                        ?>
" class="tab-wrapper">
						<div class="tab-toolbar">
							<div class="tab-toolbar-left">
								<a class="button" href="admin.php?page=bp-profile-setup&amp;group_id=<?php 
                                        echo esc_attr($group->id);
                                        ?>
&amp;mode=add_field"><?php 
                                        _e('Add New Field', 'buddypress');
                                        ?>
</a>
								<a class="button edit" href="admin.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=<?php 
                                        echo esc_attr($group->id);
                                        ?>
"><?php 
                                        _e('Edit Group', 'buddypress');
                                        ?>
</a>

<?php 
                                        if ($group->can_delete) {
                                            ?>

								<a class="submitdelete deletion" href="admin.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php 
                                            echo esc_attr($group->id);
                                            ?>
"><?php 
                                            _e('Delete Group', 'buddypress');
                                            ?>
</a>

<?php 
                                        }
                                        ?>

							</div>
						</div>

						<fieldset id="<?php 
                                        echo $group->id;
                                        ?>
" class="connectedSortable field-group">

<?php 
                                        if ($group->description) {
                                            ?>

							<legend><?php 
                                            echo esc_attr($group->description);
                                            ?>
</legend>

<?php 
                                        }
                                        if (!empty($group->fields)) {
                                            foreach ($group->fields as $field) {
                                                // Load the field
                                                $field = new BP_XProfile_Field($field->id);
                                                $class = '';
                                                if (!$field->can_delete) {
                                                    $class = ' core nodrag';
                                                }
                                                /* This function handles the WYSIWYG profile field
                                                 * display for the xprofile admin setup screen
                                                 */
                                                xprofile_admin_field($field, $group, $class);
                                            }
                                            // end for
                                        } else {
                                            // !$group->fields
                                            ?>

							<p class="nodrag nofields"><?php 
                                            _e('There are no fields in this group.', 'buddypress');
                                            ?>
</p>

<?php 
                                        }
                                        // end $group->fields
                                        ?>

						</fieldset>
					</div>

<?php 
                                    }
                                    // End For
                                    ?>

				</div>
<?php 
                                } else {
                                    ?>

				<div id="message" class="error"><p><?php 
                                    _e('You have no groups.', 'buddypress');
                                    ?>
</p></div>
				<p><a href="admin.php?page=bp-profile-setup&amp;mode=add_group"><?php 
                                    _e('Add New Group', 'buddypress');
                                    ?>
</a></p>

<?php 
                                }
                                ?>
				<div id="tabs-bottom">
					&nbsp;
				</div>
			</form>
		</div>
<?php 
                            }
                        }
                    }
                }
            }
        }
    }
}
Exemple #24
0
        ?>

	<?php 
        do_action('bp_after_profile_field_content');
        ?>

	<div class="submit">
		<input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php 
        _e('Save Changes', 'buddypress');
        ?>
 " />
	</div>

	<input type="hidden" name="field_ids" id="field_ids" value="<?php 
        bp_the_profile_group_field_ids();
        ?>
" />

	<?php 
        nxt_nonce_field('bp_xprofile_edit');
        ?>

</form>

<?php 
    }
}
?>

<?php 
do_action('bp_after_profile_edit_content');
Exemple #25
0
?>

	<?php 
do_action('members_pre_edit_role_form');
//Available pre-form hook for displaying messages.
?>

	<div id="poststuff">

		<form name="form0" method="post" action="<?php 
echo admin_url(esc_url("users.php?page=roles&amp;action=edit&amp;role={$role->name}"));
?>
">

			<?php 
nxt_nonce_field(members_get_nonce('edit-roles'));
?>

			<table class="form-table">

				<tr>
					<th>
						<?php 
_e('Role Name', 'members');
?>
					</th>
					<td>
						<input type="text" disabled="disabled" readonly="readonly" value="<?php 
echo esc_attr($role->name);
?>
" />
    /**
     * admin_screen()
     *
     * Load the admin screen.
     *
     * @since 1.0.0
     */
    function admin_screen()
    {
        $export_type = 'all';
        if (isset($_POST['export-type'])) {
            $export_type = esc_attr($_POST['export-type']);
        }
        ?>
	<div class="wrap">
		<?php 
        screen_icon('tools');
        ?>
	
		<h2><?php 
        _e('Backup Settings', 'woothemes');
        ?>
</h2>
		
		<h3><?php 
        _e('Import Settings', 'woothemes');
        ?>
</h3>
		
		<p><?php 
        _e('If you have settings in a backup file on your computer, the WooFramework can import those into this site. To get started, upload your backup file to import from below.', 'woothemes');
        ?>
</p>

		<div class="form-wrap">
			<form enctype="multipart/form-data" method="post" action="<?php 
        echo admin_url('admin.php?page=' . $this->token);
        ?>
">
				<?php 
        nxt_nonce_field('woothemes-backup-import');
        ?>
				<label for="woothemes-import-file"><?php 
        printf(__('Upload File: (Maximum Size: %s)', 'woothemes'), ini_get('post_max_size'));
        ?>
</label>
				<input type="file" id="woothemes-import-file" name="woothemes-import-file" size="25" />
				<input type="hidden" name="woothemes-backup-import" value="1" />
				<input type="submit" class="button" value="<?php 
        _e('Upload File and Import', 'woothemes');
        ?>
" />
			</form>
		</div><!--/.form-wrap-->
		
		<h3><?php 
        _e('Export Settings', 'woothemes');
        ?>
</h3>
		
		<p><?php 
        _e('When you click the button below, the WooFramework will create a text file for you to save to your computer.', 'woothemes');
        ?>
</p>
		<p><?php 
        echo sprintf(__('This text file can be used to restore your settings here on "%s", or to easily setup another website with the same settings".', 'woothemes'), get_bloginfo('name'));
        ?>
</p>
			
		<form method="post" action="<?php 
        echo admin_url('admin.php?page=' . $this->token);
        ?>
">
			<?php 
        nxt_nonce_field('woothemes-backup-export');
        ?>
			<p><label><input type="radio" name="export-type" value="all"<?php 
        checked('all', $export_type);
        ?>
> <?php 
        _e('All Settings', 'woothemes');
        ?>
</label>
<span class="description"><?php 
        _e('This will contain all of the options listed below.', 'woothemes');
        ?>
</span></p>

			<p><label for="content"><input type="radio" name="export-type" value="theme"<?php 
        checked('theme', $export_type);
        ?>
> <?php 
        _e('Theme Options', 'woothemes');
        ?>
</label></p>
			
			<p><label for="content"><input type="radio" name="export-type" value="seo"<?php 
        checked('seo', $export_type);
        ?>
> <?php 
        _e('SEO Settings', 'woothemes');
        ?>
</label></p>
			
			<p><label for="content"><input type="radio" name="export-type" value="sidebar"<?php 
        checked('sidebar', $export_type);
        ?>
> <?php 
        _e('Sidebar Manager', 'woothemes');
        ?>
 <span class="description"><?php 
        _e('This will contain only the custom sidebars themselves and not the widgets within them', 'woothemes');
        ?>
</span></label></p>
			
			<p><label for="content"><input type="radio" name="export-type" value="framework"<?php 
        checked('framework', $export_type);
        ?>
> <?php 
        _e('Framework Settings', 'woothemes');
        ?>
</label></p>
			
			<input type="hidden" name="woothemes-backup-export" value="1" />
			<input type="submit" class="button" value="<?php 
        _e('Download Export File', 'woothemes');
        ?>
" />
		</form>
		
	</div><!--/.wrap-->
<?php 
    }
    }
    if ($post_type_object->public && !('pending' == $post->post_status && !current_user_can($post_type_object->cap->publish_posts))) {
        ?>
	<div id="edit-slug-box">
	<?php 
        if (!empty($post->ID) && !empty($sample_permalink_html) && 'auto-draft' != $post->post_status) {
            echo $sample_permalink_html;
        }
        ?>
	</div>
<?php 
    }
    ?>
</div>
<?php 
    nxt_nonce_field('samplepermalink', 'samplepermalinknonce', false);
    ?>
</div>
<?php 
}
?>

<?php 
if (post_type_supports($post_type, 'editor')) {
    ?>
<div id="postdivrich" class="postarea">

<?php 
    nxt_editor($post->post_content, 'content', array('dfw' => true, 'tabindex' => 1));
    ?>
</option>
					<?php 
    }
    ?>
					</select>
					<input type="submit" value="Change" />
				</td>
			</tr>
		</table>
	</form>
	<?php 
}
?>
	<form method="post" name="template" id="template">
		<?php 
nxt_nonce_field('ckeditor_create_nonce_file_editor', 'csrf_ckeditor-for-nxtclass');
?>
		<input type="hidden" name="file" value="<?php 
echo $file;
?>
" />
		<h3><?php 
_e('Browsing ', 'ckeditor_nxtclass');
?>
: <i><?php 
echo $file;
?>
</i></h3>
		<table class="form-table">
			<tr valign="top">
				<td>
Exemple #29
0
			</div>

			<div id="blogs-dir-list" class="blogs dir-list">

				<?php 
locate_template(array('blogs/blogs-loop.php'), true);
?>

			</div><!-- #blogs-dir-list -->

			<?php 
do_action('bp_directory_blogs_content');
?>

			<?php 
nxt_nonce_field('directory_blogs', '_nxtnonce-blogs-filter');
?>

			<?php 
do_action('bp_after_directory_blogs_content');
?>

		</form><!-- #blogs-directory-form -->

		<?php 
do_action('bp_after_directory_blogs');
?>

		</div><!-- .padder -->
	</div><!-- #content -->
do_action('bp_members_notification_settings_before_submit');
?>

					<div class="submit">
						<input type="submit" name="submit" value="<?php 
_e('Save Changes', 'buddypress');
?>
" id="submit" class="auto" />
					</div>

					<?php 
do_action('bp_members_notification_settings_after_submit');
?>

					<?php 
nxt_nonce_field('bp_settings_notifications');
?>

				</form>

				<?php 
do_action('bp_after_member_body');
?>

			</div><!-- #item-body -->

			<?php 
do_action('bp_after_member_settings_template');
?>

		</div><!-- .padder -->