function create_screen() { global $bp; if (!bp_is_group_creation_step($this->slug)) { return false; } ?> <p><?php _e("Add RSS feeds of blogs you'd like to attach to this group in the box below.\n\t\t\t\t Any future posts on these blogs will show up on the group page and be recorded\n\t\t\t\t in activity streams.", 'bp-groups-externalblogs'); ?> </p> <p class="desc"><?php _e("Seperate URL's with commas.", 'bp-groups-externalblogs'); ?> </span> <p> <label for="blogfeeds"><?php _e("Feed URL's:", 'bp-groups-externalblogs'); ?> </label> <textarea name="blogfeeds" id="blogfeeds"><?php echo attribute_escape(implode(', ', (array) groups_get_groupmeta($bp->groups->current_group->id, 'blogfeeds'))); ?> </textarea> </p> <?php wp_nonce_field('groups_create_save_' . $this->slug); }
function create_screen() { global $bp, $groups_template; if (!bp_is_group_creation_step($this->slug)) { return false; } ?> <div class="editfield"> <label for=""><?php _e('Group Slug', 'bp-edit-group-slug'); ?> </label> <p><?php _e('This slug has been automatically created from the group name you entered in step 1.', 'bp-edit-group-slug'); ?> </p> <p><?php _e('You can keep it, or change it to something more accurate.', 'bp-edit-group-slug'); ?> </p> <div> <?php echo $this->get_group_slug_screen($bp->groups->current_group->id); ?> </div> </div> <?php wp_nonce_field('groups_create_save_' . $this->slug); }
function create_screen($group_id = NULL) { if (!bp_is_group_creation_step($this->slug)) { return false; } // HOOK to add PER GROUP MEDIA enable/diable option in rtMedia PRO do_action('rtmedia_group_media_control_create'); global $rtmedia; $options = $rtmedia->options; ?> <div class='rtmedia-group-media-settings'> <?php if (isset($options['general_enableAlbums']) && $options['general_enableAlbums'] == 1) { // album is enabled ?> <h4><?php _e('Album Creation Control', 'rtmedia'); ?> </h4> <p><?php _e('Who can create Albums in this group?', 'rtmedia'); ?> </p> <div class="radio"> <label> <input name="rt_album_creation_control" type="radio" id="rt_media_group_level_all" checked="checked" value="all"> <strong><?php _e('All Group Members', 'rtmedia'); ?> </strong> </label> <label> <input name="rt_album_creation_control" type="radio" id="rt_media_group_level_moderators" value="moderators"> <strong><?php _e('Group Admins and Mods only', 'rtmedia'); ?> </strong> </label> <label> <input name="rt_album_creation_control" type="radio" id="rt_media_group_level_admin" value="admin"> <strong><?php _e('Group Admin only', 'rtmedia'); ?> </strong> </label> </div> <?php } ?> <?php do_action('rtmedia_playlist_creation_settings_create_group'); ?> </div> <?php wp_nonce_field('groups_create_save_' . $this->slug); }
/** * The content of the My Group Extension tab of the group creation process * * Don't need a group creation step? In the __construct() method: * * $this->enable_create_step = false; */ function create_screen() { if (!bp_is_group_creation_step($this->slug)) { return false; } $this->show_enable_chat_button(); wp_nonce_field('groups_create_save_' . $this->slug); }
public function create_screen($group_id = null) { if (!bp_is_group_creation_step($this->slug)) { return false; } bcg_admin_form(); wp_nonce_field('groups_create_save_' . $this->slug); }
/** * The content of the BP group documents tab of the group creation process * */ function create_screen($group_id = null) { $bp = buddypress(); if (!bp_is_group_creation_step($this->slug)) { return false; } $this->edit_create_markup($bp->groups->new_group_id); wp_nonce_field('groups_create_save_' . $this->slug); }
/** * The content of the BP group documents tab of the group creation process * */ function create_screen() { global $bp; if (!bp_is_group_creation_step($this->slug)) { return false; } $this->edit_create_markup($bp->groups->new_group_id); wp_nonce_field('groups_create_save_' . $this->slug); }
function create_screen() { global $bp; /* If we're not at this step, go bye bye */ if (!bp_is_group_creation_step($this->slug)) { return false; } invite_anyone_create_screen_content('create'); wp_nonce_field('groups_create_save_' . $this->slug); }
/** * Load the js only when needed * * @return bool */ function cfbgr_is_restriction_js() { // Group create if (bp_is_group_create() && bp_is_group_creation_step('group-settings')) { return true; } // Group manage if (bp_is_group() && bp_is_group_admin_screen('group-settings')) { return true; } return false; }
function create_screen() { global $bp, $groupblog_create_screen; if (!bp_is_group_creation_step($this->slug)) { return false; } $groupblog_create_screen = true; // Attaching the markup via a hook, so that plugins can unhook and replace with // their own markup. This is a bit of a hack. add_action('bp_groupblog_create_screen_markup', 'bp_groupblog_signup_blog'); do_action('bp_groupblog_create_screen_markup'); echo '<input type="hidden" name="groupblog-group-id" value="' . $bp->groups->current_group->id . '" />'; echo '<input type="hidden" name="groupblog-create-save" value="groupblog-create-save" />'; wp_nonce_field('groups_create_save_' . $this->slug); }
/** * Create screen. * * @param int $group_id The group ID. */ public function create_screen($group_id = null) { if (!bp_is_group_creation_step($this->slug)) { return false; } $times = array('10', '15', '20', '30', '60'); echo '<label for="fetch-time">' . _e('Refresh time:', 'bp-groups-externalblogs') . '</label>'; echo "<select id='fetch-time' name='fetch-time'>"; $default = __('Default', 'buddysuite'); echo "<option value='30'>{$default}</option>"; foreach ($times as $time) { $selected = $fetch == $time ? 'selected="selected"' : ''; echo "<option value='{$time}' {$selected}>{$time}</option>"; } echo "</select> "; ?> <p><?php _e("Add RSS feeds of blogs you'd like to attach to this group in the box below.\n\t\t\t\t Any future posts on these blogs will show up on the group page and be recorded\n\t\t\t\t in activity streams.", 'bp-groups-externalblogs'); ?> </p> <p> <span class="desc"><?php _e("Seperate URL's with commas.", 'bp-groups-externalblogs'); ?> </span> <label for="blogfeeds"><?php _e("Feed URL's:", 'bp-groups-externalblogs'); ?> </label> <textarea name="blogfeeds" id="blogfeeds"><?php echo implode(', ', array_map('esc_url', (array) groups_get_groupmeta(bp_get_current_group_id(), 'blogfeeds'))); ?> </textarea> </p> <?php wp_nonce_field('groups_create_save_' . $this->slug); ?> <?php }
/** * * @since 0.0.1 * @access public * @static * @return bool */ function create_screen($group_id = NULL) { global $bp; if (!bp_is_group_creation_step($this->slug)) { return false; } $fetch = groups_get_groupmeta($bp->groups->current_group->id, 'rw-group-blogs-fetchtime'); $times = array('10', '15', '20', '30', '60'); echo '<label for="fetch-time">' . _e('Refresh time:', RW_Group_Blogs::$textdomain) . '</label>'; echo "<select id='fetch-time' name='fetch-time'>"; $default = __('Default', RW_Group_Blogs::$textdomain); echo "<option value='30'>{$default}</option>"; foreach ($times as $time) { $selected = $fetch == $time ? 'selected="selected"' : ''; echo "<option value='{$time}' {$selected}>{$time}</option>"; } echo "</select> "; ?> <p><?php _e("Add RSS feeds of blogs you'd like to attach to this group in the box below.\n\t\t\t\t Any future posts on these blogs will show up on the group page and be recorded\n\t\t\t\t in activity streams.", RW_Group_Blogs::$textdomain); ?> </p> <p> <span class="desc"><?php _e("Seperate URL's with commas.", RW_Group_Blogs::$textdomain); ?> </span> <label for="blogfeeds"><?php _e("Feed URL's:", RW_Group_Blogs::$textdomain); ?> </label> <textarea name="blogfeeds" id="blogfeeds"><?php echo attribute_escape(implode(', ', (array) groups_get_groupmeta($bp->groups->current_group->id, 'rw-group-blogs-feeds'))); ?> </textarea> </p> <?php wp_nonce_field('groups_create_save_' . $this->slug); }
/** * Are we on a page to edit a cover image ? * * @since 2.4.0 * * @return bool True if on a page to edit a cover image, false otherwise */ function bp_attachments_cover_image_is_edit() { $retval = false; $current_component = bp_current_component(); if ('profile' === $current_component) { $current_component = 'xprofile'; } if (!bp_is_active($current_component, 'cover_image')) { return $retval; } if (bp_is_user_change_cover_image()) { $retval = !bp_disable_cover_image_uploads(); } if (bp_is_group_admin_page() && 'group-cover-image' == bp_get_group_current_admin_tab() || bp_is_group_create() && bp_is_group_creation_step('group-cover-image')) { $retval = !bp_disable_group_cover_image_uploads(); } return apply_filters('bp_attachments_cover_image_is_edit', $retval, $current_component); }
/** * The create screen method * * @package Rendez Vous * @subpackage Groups * * @since Rendez Vous (1.1.0) * * @param int $group_id the group ID * @uses bp_is_group_creation_step() to make sure it's the extension create step * @uses bp_get_new_group_id() to get the just created group ID * @uses Rendez_Vous_Group->edit_screen() to display the group extension settings form */ public function create_screen($group_id = null) { // Bail if not looking at this screen if (!bp_is_group_creation_step($this->slug)) { return false; } // Check for possibly empty group_id if (empty($group_id)) { $group_id = bp_get_new_group_id(); } return $this->edit_screen($group_id); }
/** * Admin markup used on the edit and create admin panels * * @since 1.0-beta */ function admin_markup() { if (bp_is_group_creation_step($this->slug)) { // Default settings $settings = apply_filters('bp_docs_default_group_settings', array('group-enable' => 1, 'can-create' => 'member')); } else { $settings = bp_docs_get_group_settings($this->maybe_group_id); } $group_enable = empty($settings['group-enable']) ? false : true; $can_create = empty($settings['can-create']) ? false : $settings['can-create']; ?> <h2><?php _e('Docs', 'bp-docs'); ?> </h2> <p><?php _e('Docs is a powerful tool for collaboration with members of your group. A cross between document editor and wiki, Docs allows you to co-author and co-edit documents with your fellow group members, which you can then sort and tag in a way that helps your group to get work done.', 'bp-docs'); ?> </p> <p> <label for="bp-docs[group-enable]"> <input type="checkbox" name="bp-docs[group-enable]" id="bp-docs-group-enable" value="1" <?php checked($group_enable, true); ?> /> <?php _e('Enable Docs for this group', 'bp-docs'); ?> </label> </p> <div id="group-doc-options" <?php if (!$group_enable) { ?> class="hidden"<?php } ?> > <h3><?php _e('Options', 'bp-docs'); ?> </h3> <table class="group-docs-options"> <tr> <td class="label"> <label for="bp-docs-can-create"><?php _e('Minimum role to associate Docs with this group:', 'bp-docs'); ?> </label> </td> <td> <select name="bp-docs[can-create]" id="bp-docs-can-create"> <option value="admin" <?php selected($can_create, 'admin'); ?> ><?php _e('Group admin', 'bp-docs'); ?> </option> <option value="mod" <?php selected($can_create, 'mod'); ?> ><?php _e('Group moderator', 'bp-docs'); ?> </option> <option value="member" <?php selected($can_create, 'member'); ?> ><?php _e('Group member', 'bp-docs'); ?> </option> </select> </td> </tr> </table> </div> <?php }
/** * Call the create_screen_save() method, if we're on the right page * * @since BuddyPress (1.8) */ public function maybe_create_screen_save() { if (!bp_is_group_creation_step($this->screens['create']['slug'])) { return; } $this->check_nonce('create'); call_user_func($this->screens['create']['screen_save_callback'], $this->group_id); }
function settings_screen($group_id = NULL) { // Make sure we are in the right place global $bp, $groups_template; if (!bp_is_group_creation_step($this->slug)) { return false; } // Display the form fields ?> <div class="instructions"> <h3 class="double-border bottom">Step 6 - Appoint Guild Leader</h3> <ul> <li>Enter the exact email address of the user you wish to promote to guild leader.</li> <li>Please be careful to precisely enter this field, as errors in the email address may have unintended consequences.</li> </ul> </div> <ol id="group-create-list"> <li class="text"> <label for="editable-guild-leader">Guild Leader's Email (☆) :</label> <input type="text" id="editable-guild-leader" name="editable-guild-leader" title="Leader email address" value="" size="50" /> </li> <li class="hidden"> <?php wp_nonce_field('groups_create_save_' . $this->slug); ?> </li><?php }
/** * Show forums and new forum form when creating a group * * @since bbPress (r3465) */ public function create_screen($group_id = 0) { // Bail if not looking at this screen if (!bp_is_group_creation_step($this->slug)) { return false; } // Check for possibly empty group_id if (empty($group_id)) { $group_id = bp_get_new_group_id(); } $checked = bp_get_new_group_enable_forum() || groups_get_groupmeta($group_id, 'forum_id'); ?> <h4><?php esc_html_e('Group Forum', 'bbpress'); ?> </h4> <p><?php esc_html_e('Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress'); ?> </p> <div class="checkbox"> <label><input type="checkbox" name="bbp-create-group-forum" id="bbp-create-group-forum" value="1"<?php checked($checked); ?> /> <?php esc_html_e('Yes. I want this group to have a forum.', 'bbpress'); ?> </label> </div> <?php }
/** * Show forums and new forum form when creating a group * * @since bbPress (r3465) */ public function create_screen() { // Bail if not looking at this screen if (!bp_is_group_creation_step($this->slug)) { return false; } $checked = bp_get_new_group_enable_forum() || groups_get_groupmeta(bp_get_new_group_id(), 'forum_id'); ?> <h4><?php _e('Group Forums', 'bbpress'); ?> </h4> <p><?php _e('Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress'); ?> </p> <div class="checkbox"> <label><input type="checkbox" name="bbp-create-group-forum" id="bbp-create-group-forum" value="1"<?php checked($checked); ?> /> <?php _e('Yes. I want this group to have a forum.', 'bbpress'); ?> </label> </div> <?php // Verify intent wp_nonce_field('groups_create_save_' . $this->slug); }
/** * Checks whether Avatar UI should be loaded. * * @since 2.3.0 * * @return bool True if Avatar UI should load, false otherwise. */ function bp_avatar_is_front_edit() { $retval = false; // No need to carry on if the current WordPress version is not supported. if (!bp_attachments_is_wp_version_supported()) { return $retval; } if (bp_is_user_change_avatar() && 'crop-image' !== bp_get_avatar_admin_step()) { $retval = !bp_core_get_root_option('bp-disable-avatar-uploads'); } if (bp_is_active('groups')) { // Group creation if (bp_is_group_create() && bp_is_group_creation_step('group-avatar') && 'crop-image' !== bp_get_avatar_admin_step()) { $retval = !bp_disable_group_avatar_uploads(); // Group Manage } elseif (bp_is_group_admin_page() && bp_is_group_admin_screen('group-avatar') && 'crop-image' !== bp_get_avatar_admin_step()) { $retval = !bp_disable_group_avatar_uploads(); } } /** * Use this filter if you need to : * - Load the avatar UI for a component that is !groups or !user (return true regarding your conditions) * - Completely disable the avatar UI introduced in 2.3 (eg: __return_false()) * * @since 2.3.0 * * @param bool whether to load the Avatar UI. */ return apply_filters('bp_avatar_is_front_edit', $retval); }
/** * Determines what shows up on the BP Docs panel of the Create process * * @package BuddyPress Docs * @since 1.0-beta */ function create_screen($group_id = null) { if (!bp_is_group_creation_step($this->slug)) { return false; } $this->admin_markup(); wp_nonce_field('groups_create_save_' . $this->slug); }
do_action('bp_after_group_avatar_creation_step'); ?> <?php wp_nonce_field('groups_create_save_group-avatar'); ?> <?php } ?> <?php /* Group creation step 4: Invite friends to group */ ?> <?php if (bp_is_group_creation_step('group-invites')) { ?> <?php do_action('bp_before_group_invites_creation_step'); ?> <?php if (bp_is_active('friends') && bp_get_total_friend_count(bp_loggedin_user_id())) { ?> <div class="left-menu"> <div id="invite-list"> <ul> <?php
function create_screen() { global $bp; if (!bp_is_group_creation_step($this->slug)) { return false; } $this_group = new BP_Groups_Hierarchy($bp->groups->new_group_id); if (isset($_COOKIE['bp_new_group_parent_id'])) { $this_group->parent_id = $_COOKIE['bp_new_group_parent_id']; $this_group->save(); } $groups = BP_Groups_Hierarchy::get('alphabetical', null, null, 0, false, false, true, $bp->groups->new_group_id); $site_root = new stdClass(); $site_root->id = 0; $site_root->name = __('Site Root', 'bp-group-hierarchy'); $display_groups = array($site_root); foreach ($groups['groups'] as $group) { $display_groups[] = $group; } /* deprecated */ $display_groups = apply_filters('bp_group_hierarchy_display_groups', $display_groups); $display_groups = apply_filters('bp_group_hierarchy_available_parent_groups', $display_groups, $this_group); ?> <label for="parent_id"><?php _e('Parent Group', 'bp-group-hierarchy'); ?> </label> <select name="parent_id" id="parent_id"> <!--<option value="0"><?php _e('Site Root', 'bp-group-hierarchy'); ?> </option>--> <?php foreach ($display_groups as $group) { ?> <option value="<?php echo $group->id; ?> "<?php if ($group->id == $this_group->parent_id) { echo ' selected'; } ?> ><?php echo stripslashes($group->name); ?> </option> <?php } ?> </select> <?php $subgroup_permission_options = apply_filters('bp_group_hierarchy_subgroup_permission_options', $this->subgroup_permission_options, $this_group); $current_subgroup_permission = groups_get_groupmeta($bp->groups->current_group->id, 'bp_group_hierarchy_subgroup_creators'); if ($current_subgroup_permission == '') { $current_subgroup_permission = $this->get_default_permission_option(); } $permission_select = '<select name="allow_children_by" id="allow_children_by">'; foreach ($subgroup_permission_options as $option => $text) { $permission_select .= '<option value="' . $option . '"' . ($option == $current_subgroup_permission ? ' selected' : '') . '>' . $text . '</option>' . "\n"; } $permission_select .= '</select>'; ?> <p> <label for="allow_children_by"><?php _e('Member Groups', 'bp-group-hierarchy'); ?> </label> <?php printf(__('Allow %1$s to create %2$s', 'bp-group-hierarchy'), $permission_select, __('Member Groups', 'bp-group-hierarchy')); ?> </p> <?php wp_nonce_field('groups_create_save_' . $this->slug); }