/**
 * Renders the page mapping admin panel.
 *
 * @since 1.6.0
 * @todo Use settings API
 * @uses bp_core_admin_component_options()
 */
function bp_core_admin_slugs_settings()
{
    ?>

	<div class="wrap">
		<?php 
    screen_icon('buddypress');
    ?>

		<h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Pages', 'buddypress'));
    ?>
</h2>
		<form action="" method="post" id="bp-admin-page-form">

			<?php 
    bp_core_admin_slugs_options();
    ?>

			<p class="submit clear">
				<input class="button-primary" type="submit" name="bp-admin-pages-submit" id="bp-admin-pages-submit" value="<?php 
    esc_attr_e('Save Settings', 'buddypress');
    ?>
"/>
			</p>

			<?php 
    wp_nonce_field('bp-admin-pages-setup');
    ?>

		</form>
	</div>

<?php 
}
/**
 * The main settings page
 *
 * @since 1.6.0
 *
 * @uses settings_fields() To output the hidden fields for the form.
 * @uses do_settings_sections() To output the settings sections.
 */
function bp_core_admin_settings()
{
    // We're saving our own options, until the WP Settings API is updated to work with Multisite.
    $form_action = add_query_arg('page', 'bp-settings', bp_get_admin_url('admin.php'));
    ?>

	<div class="wrap">

		<h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Settings', 'buddypress'));
    ?>
</h2>

		<form action="<?php 
    echo esc_url($form_action);
    ?>
" method="post">

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

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

			<p class="submit">
				<input type="submit" name="submit" class="button-primary" value="<?php 
    esc_attr_e('Save Settings', 'buddypress');
    ?>
" />
			</p>
		</form>
	</div>

<?php 
}
Ejemplo n.º 3
0
/**
 * Outputs the markup for the bb-forums-admin panel
 */
function bp_forums_bbpress_admin()
{
    // The text and URL of the Site Wide Forums button differs depending on whether bbPress
    // is running
    if (is_plugin_active('bbpress/bbpress.php')) {
        // The bbPress admin page will always be on the root blog. switch_to_blog() will
        // pass through if we're already there.
        switch_to_blog(bp_get_root_blog_id());
        $button_url = admin_url(add_query_arg(array('page' => 'bbpress'), 'options-general.php'));
        restore_current_blog();
        $button_text = __('Configure bbPress', 'buddypress');
    } else {
        $button_url = bp_get_admin_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), 'plugin-install.php'));
        $button_text = __('Install bbPress', 'buddypress');
    }
    $action = bp_get_admin_url('admin.php?page=bb-forums-setup&reinstall=1');
    ?>

	<div class="wrap">
		<?php 
    screen_icon('buddypress');
    ?>

		<h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Forums', 'buddypress'));
    ?>
</h2>

		<?php 
    if (isset($_POST['submit'])) {
        ?>

			<div id="message" class="updated fade">
				<p><?php 
        _e('Settings Saved.', 'buddypress');
        ?>
</p>
			</div>

		<?php 
    }
    ?>

		<?php 
    if (isset($_REQUEST['reinstall']) || !bp_forums_is_installed_correctly()) {
        // Delete the bb-config.php location option
        bp_delete_option('bb-config-location');
        // Now delete the bb-config.php file
        @unlink(ABSPATH . 'bb-config.php');
        // show the updated wizard
        bp_forums_bbpress_install_wizard();
    } else {
        ?>

			<div style="width: 45%; float: left; margin-top: 20px;">
				<h3><?php 
        _e('(Installed)', 'buddypress');
        ?>
 <?php 
        _e('Forums for Groups', 'buddypress');
        ?>
</h3>

				<p><?php 
        _e('Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.', 'buddypress');
        ?>
</p>

				<p><?php 
        _e('Note: This component is retired and will not be receiving any updates in the future.  Only use this component if your current site relies on it.', 'buddypress');
        ?>
</p>

				<h4 style="margin-bottom: 10px;"><?php 
        _e('Features', 'buddypress');
        ?>
</h4>
				<ul class="description" style="list-style: square; margin-left: 30px;">
					<li><?php 
        _e('Group Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Member Profile Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Activity Stream Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('@ Mention Integration', 'buddypress');
        ?>
</p></li>
				</ul>

				<div>
					<a class="button button-primary confirm" href="<?php 
        echo $action;
        ?>
"><?php 
        _e('Uninstall Group Forums', 'buddypress');
        ?>
</a> &nbsp;
				</div>
			</div>

			<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
				<h3><?php 
        _e('New! bbPress', 'buddypress');
        ?>
</h3>
				<p><?php 
        _e('bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress');
        ?>
</p>

				<p><?php 
        _e('It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress');
        ?>
</p>

				<ul class="description" style="list-style: square; margin-left: 30px;">
					<li><?php 
        _e('Non-group specific forum creation', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Moderation via the WP admin dashboard', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Topic splitting', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Revisions', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Spam management', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Subscriptions', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('And more!', 'buddypress');
        ?>
</p></li>
				</ul>

				<p><?php 
        printf(__('If you decide to use bbPress, you will need to deactivate the legacy group forum component.  For more info, <a href="%s">read this codex article</a>.', 'buddypress'), 'http://codex.buddypress.org/user/setting-up-a-new-installation/installing-group-and-sitewide-forums/using-bbpress-2-2-with-buddypress/');
        ?>
</p>

				<div>
					<a class="button thickbox button-primary" href="<?php 
        echo esc_attr($button_url);
        ?>
"><?php 
        echo esc_html($button_text);
        ?>
</a> &nbsp;
				</div>
			</div>

		<?php 
    }
    ?>

	</div>
<?php 
}
Ejemplo n.º 4
0
/**
 * Renders the Component Setup admin panel.
 *
 * @package BuddyPress Core
 * @since {@internal Unknown}}
 * @uses bp_core_admin_component_options()
 */
function bp_core_admin_page_setup()
{
    ?>

	<div class="wrap">

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

		<h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Pages', 'buddypress'));
    ?>
</h2>

		<?php 
    if (isset($_GET['updated']) && 'true' === $_GET['updated']) {
        ?>

			<div id="message" class="updated fade">

				<p><?php 
        _e('Settings Saved', 'buddypress');
        ?>
</p>

			</div>

		<?php 
    }
    ?>

		<form action="" method="post" id="bp-admin-page-form">

			<?php 
    bp_core_admin_page_options();
    ?>

			<p class="submit clear">
				<input class="button-primary" type="submit" name="bp-admin-pages-submit" id="bp-admin-pages-submit" value="<?php 
    _e('Save All', 'buddypress');
    ?>
"/>
			</p>

			<?php 
    nxt_nonce_field('bp-admin-pages-setup');
    ?>

		</form>
	</div>

<?php 
}
Ejemplo n.º 5
0
/**
 * Outputs the markup for the bb-forums-admin panel
 */
function bp_forums_bbpress_admin()
{
    global $bp;
    // The text and URL of the Site Wide Forums button differs depending on whether bbPress
    // is running
    if (is_plugin_active('bbpress/bbpress.php')) {
        // The bbPress admin page will always be on the root blog. switch_to_blog() will
        // pass through if we're already there.
        switch_to_blog(bp_get_root_blog_id());
        $button_url = admin_url(add_query_arg(array('page' => 'bbpress'), 'options-general.php'));
        restore_current_blog();
        $button_text = __('Configure Site Wide Forums', 'buddypress');
    } else {
        $button_url = bp_get_admin_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), 'plugin-install.php'));
        $button_text = __('Install Site Wide Forums', 'buddypress');
    }
    $action = bp_get_admin_url('admin.php?page=bb-forums-setup&reinstall=1');
    ?>

	<div class="wrap">
		<?php 
    screen_icon('buddypress');
    ?>

		<h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Forums', 'buddypress'));
    ?>
</h2>

		<?php 
    if (isset($_POST['submit'])) {
        ?>

			<div id="message" class="updated fade">
				<p><?php 
        _e('Settings Saved.', 'buddypress');
        ?>
</p>
			</div>

		<?php 
    }
    ?>

		<?php 
    if (isset($_REQUEST['reinstall']) || !bp_forums_is_installed_correctly()) {
        // Delete the bb-config.php location option
        bp_delete_option('bb-config-location');
        bp_forums_bbpress_install_wizard();
    } else {
        ?>

			<div style="width: 45%; float: left; margin-top: 20px;">
				<h3><?php 
        _e('(Installed)', 'buddypress');
        ?>
 <?php 
        _e('Forums for Groups', 'buddypress');
        ?>
</h3>

				<p><?php 
        _e('Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.', 'buddypress');
        ?>
</p>
				<p class="description"><?php 
        _e('You may use an existing bbPress installation if you have one.', 'buddypress');
        ?>
</p>

				<h4 style="margin-bottom: 10px;"><?php 
        _e('Features', 'buddypress');
        ?>
</h4>
				<ul class="description" style="list-style: square; margin-left: 30px;">
					<li><?php 
        _e('Group Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Member Profile Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Activity Stream Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('@ Mention Integration', 'buddypress');
        ?>
</p></li>
				</ul>

				<div>
					<a class="button button-primary" href="<?php 
        echo $action;
        ?>
"><?php 
        _e('Uninstall Group Forums', 'buddypress');
        ?>
</a> &nbsp;
				</div>
			</div>

			<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
				<h3><?php 
        _e('New! Site Wide Forums', 'buddypress');
        ?>
</h3>
				<p><?php 
        _e('Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress');
        ?>
</p>
				<p class="description"><?php 
        _e('You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress');
        ?>
</p>

				<h4 style="margin-bottom: 10px;"><?php 
        _e('Features', 'buddypress');
        ?>
</h4>
				<ul class="description" style="list-style: square; margin-left: 30px;">
					<li><?php 
        _e('Central Discussion Area', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Forum Plugins Available', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Activity Stream Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('@ Mention Integration', 'buddypress');
        ?>
</p></li>
				</ul>

				<div>
					<a class="button thickbox button-primary" href="<?php 
        echo esc_attr($button_url);
        ?>
"><?php 
        echo esc_html($button_text);
        ?>
</a> &nbsp;
				</div>
			</div>

		<?php 
    }
    ?>

		<p class="clear description"><?php 
    printf(__('Need help deciding between Group Forums and Site Wide Forums? Visit <a href="%s">the BuddyPress codex</a> for more information.', 'buddypress'), 'http://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/');
    ?>
</p>
	</div>
<?php 
}
Ejemplo n.º 6
0
function bp_forums_bbpress_admin()
{
    global $bp;
    $action = bp_get_admin_url('admin.php?page=bb-forums-setup&reinstall=1');
    ?>

	<div class="wrap">
		<?php 
    screen_icon('buddypress');
    ?>

		<h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Forums', 'buddypress'));
    ?>
</h2>

		<?php 
    if (isset($_POST['submit'])) {
        ?>

			<div id="message" class="updated fade">
				<p><?php 
        _e('Settings Saved.', 'buddypress');
        ?>
</p>
			</div>

		<?php 
    }
    ?>

		<?php 
    if (isset($_REQUEST['reinstall']) || !bp_forums_is_installed_correctly()) {
        // Delete the bb-config.php location option
        bp_delete_option('bb-config-location');
        bp_forums_bbpress_install_wizard();
    } else {
        ?>

			<div style="width: 45%; float: left; margin-top: 20px;">
				<h3><?php 
        _e('(Installed)', 'buddypress');
        ?>
 <?php 
        _e('Forums for Groups', 'buddypress');
        ?>
</h3>

				<p><?php 
        _e('Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.', 'buddypress');
        ?>
</p>
				<p class="description"><?php 
        _e('You may use an existing bbPress installation if you have one.', 'buddypress');
        ?>
</p>

				<h4 style="margin-bottom: 10px;"><?php 
        _e('Features', 'buddypress');
        ?>
</h4>
				<ul class="description" style="list-style: square; margin-left: 30px;">
					<li><?php 
        _e('Group Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Member Profile Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Activity Stream Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('@ Mention Integration', 'buddypress');
        ?>
</p></li>
				</ul>

				<div>
					<a class="button button-primary" href="<?php 
        echo $action;
        ?>
"><?php 
        _e('Uninstall Group Forums', 'buddypress');
        ?>
</a> &nbsp;
				</div>
			</div>

			<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
				<h3><?php 
        _e('New! Site Wide Forums', 'buddypress');
        ?>
</h3>
				<p><?php 
        _e('Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress');
        ?>
</p>
				<p class="description"><?php 
        _e('You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress');
        ?>
</p>

				<h4 style="margin-bottom: 10px;"><?php 
        _e('Features', 'buddypress');
        ?>
</h4>
				<ul class="description" style="list-style: square; margin-left: 30px;">
					<li><?php 
        _e('Central Discussion Area', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Forum Plugins Available', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Activity Stream Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('@ Mention Integration', 'buddypress');
        ?>
</p></li>
				</ul>
				<div>
					<a class="button thickbox button-primary" href="<?php 
        bp_admin_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), 'plugin-install.php'));
        ?>
"><?php 
        _e('Install Site Wide Forums', 'buddypress');
        ?>
</a> &nbsp;
				</div>
			</div>

		<?php 
    }
    ?>

	</div>
<?php 
}
Ejemplo n.º 7
0
    /**
     * Display the admin
     *
     * @package Rendez Vous
     * @subpackage Admin
     *
     * @since Rendez Vous (1.2.0)
     */
    public function admin_display()
    {
        ?>
		<div class="wrap">

			<h2 class="nav-tab-wrapper"><?php 
        bp_core_admin_tabs(esc_html__('Rendez-vous', 'rendez-vous'));
        ?>
</h2>

			<h3><?php 
        esc_html_e('Types', 'rendez-vous');
        ?>
</h3>

			<p class="description rendez-vous-guide">
				<?php 
        esc_html_e('Add your type in the field below and hit the return key to save it.', 'rendez-vous');
        ?>
				<?php 
        esc_html_e('To update a type, select it in the list, edit the name and hit the return key to save it.', 'rendez-vous');
        ?>
			</p>

			<div class="rendez-vous-terms-admin">
				<div class="rendez-vous-form"></div>
				<div class="rendez-vous-list-terms"></div>
			</div>

			<script id="tmpl-rendez-vous-term" type="text/html">
				<span class="rdv-term-name">{{data.name}}</span> <span class="rdv-term-actions"><a href="#" class="rdv-edit-item" data-term_id="{{data.id}}" title="<?php 
        esc_attr_e('Edit type', 'rendez-vous');
        ?>
"></a> <a href="#" class="rdv-delete-item" data-term_id="{{data.id}}" title="<?php 
        esc_attr_e('Delete type', 'rendez-vous');
        ?>
"></a></span>
			</script>

		</div>
		<?php 
    }
Ejemplo n.º 8
0
function bp_media_settings_page()
{
    $tab = isset($_GET['page']) ? $_GET['page'] : "bp-media-settings";
    ?>
    <div class="wrap bp-media-admin">
        <?php 
    //screen_icon( 'buddypress' );
    ?>
        <div id="icon-buddypress" class="icon32"><br></div>
        <h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Media', 'bp-media'));
    ?>
</h2>
        <div class="metabox-holder columns-2"><?php 
    if (array_key_exists('bp_media_refresh_count', $_GET) && empty($_REQUEST['settings-updated'])) {
        check_admin_referer('bp_media_refresh_count', 'wp_nonce');
        if (!bp_media_update_count()) {
            $bp_media_errors[] = "Recounting Failed";
        } else {
            $bp_media_messages[] = "Recounting of media files done successfully";
        }
        if (isset($bp_media_errors) && count($bp_media_errors)) {
            ?>
                    <div class="error"><p><?php 
            foreach ($bp_media_errors as $error) {
                echo $error . '<br/>';
            }
            ?>
</p></div><?php 
        }
        if (isset($bp_media_messages) && count($bp_media_messages)) {
            ?>
                    <div class="updated"><p><?php 
            foreach ($bp_media_messages as $message) {
                echo $message . '<br/>';
            }
            ?>
</p></div><?php 
        }
    } else {
        settings_errors();
    }
    ?>

            <div class="bp-media-settings-tabs"><?php 
    // Check to see which tab we are on
    if (current_user_can('manage_options')) {
        $tabs_html = '';
        $idle_class = 'media-nav-tab';
        $active_class = 'media-nav-tab media-nav-tab-active';
        $tabs = array();
        // Check to see which tab we are on
        $tab = isset($_GET['page']) ? $_GET['page'] : "bp-media-settings";
        /* BP Media */
        $tabs[] = array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-media-settings'), 'admin.php')), 'title' => __('BP Media Settings', 'bp-media'), 'name' => __('Settings', 'bp-media'), 'class' => $tab == 'bp-media-settings' ? $active_class : $idle_class . ' first_tab');
        $tabs[] = array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-media-addons'), 'admin.php')), 'title' => __('BP Media Addons', 'bp-media'), 'name' => __('Addons', 'bp-media'), 'class' => $tab == 'bp-media-addons' ? $active_class : $idle_class);
        $tabs[] = array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-media-support'), 'admin.php')), 'title' => __('BP Media Support', 'bp-media'), 'name' => __('Support', 'bp-media'), 'class' => $tab == 'bp-media-support' ? $active_class : $idle_class . ' last_tab');
        $pipe = '|';
        $i = '1';
        foreach ($tabs as $tab) {
            if ($i != 1) {
                $tabs_html .= $pipe;
            }
            $tabs_html .= '<a title=""' . $tab['title'] . '" " href="' . $tab['href'] . '" class="' . $tab['class'] . '">' . $tab['name'] . '</a>';
            $i++;
        }
        echo $tabs_html;
    }
    ?>
            </div>

            <div id="bp-media-settings-boxes">

                <form id="bp_media_settings_form" name="bp_media_settings_form" action="options.php" method="post" enctype="multipart/form-data">
                    <?php 
    settings_fields('bp_media_options_settings');
    do_settings_fields('bp_media_options_settings', '');
    do_meta_boxes('bp-media-settings', 'normal', '');
    ?>

                    <script type="text/javascript">
                        //<![CDATA[
                        jQuery(document).ready( function($) {
                            // close postboxes that should be closed
                            $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
                            // postboxes setup
                            postboxes.add_postbox_toggles('bp-media-settings');
                        });
                        //]]>
                    </script>
                </form>
            </div><!-- .bp-media-settings-boxes -->
            <div class="metabox-fixed metabox-holder alignright bp-media-metabox-holder">
                    <?php 
    bp_media_default_admin_sidebar();
    ?>
            </div>
        </div><!-- .metabox-holder -->
    </div><!-- .bp-media-admin --><?php 
}