Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'group_id'

Viewing 14 results - 551 through 564 (of 564 total)
  • Author
    Search Results
  • #42594
    talk2manoj
    Participant

    Its very simple

    1. Login with admin id

    2. Paste following in your address bar and press enter

    http://youdomainname.com/wp-admin/admin.php?page=xprofile_settings&group_id=1&field_id=1&mode=edit_field

    Note: Replace “http://youdomainname.com” with your domain name in above url

    3. Do editing as you want and save for changes.

    #41954
    mypop
    Participant

    @Lance,

    Done it may times, just done it again, here’s the infor for the new forum from

    id creator_id name slug

    17 1 Lance Group8 lance-group8

    “groupmeta” data:

    id group_id meta_key meta_value

    65 17 total_member_count 1

    66 17 last_activity 1239056228

    67 17 theme buddypress

    68 17 stylesheet buddypress

    There is only one entry in the bb_forums table:

    forum_id forum_name forum_slug forum_desc

    1 Test test qwswsq

    This is driving me nuts!

    #41953
    Lance Willett
    Participant

    and even created new forums

    Have you tried creating a brand new group and enabling the forum for it? I only see one group on your site. You could try creating a new group, enabling the forum, then test again.

    Since the issue is with an existing forum/group connection, it could be that BuddyPress thinks the forum exists (with a certain “id”) which doesn’t exist in bbPress any more.

    If you look in the “wp_bp_groups_groupmeta” table in your database, find the “group_id” for the group you are testing, and then look in the “bp_forums” table and see if the same id is being used there for a forum (look at the “forum_id”).

    #41048

    In reply to: Group Administration

    talk2manoj
    Participant
    function bp_group_admin_only(){
    global $bp, $current_blog;
    global $group_obj, $is_single_group;

    if (!is_site_admin()){
    remove_action( 'wp', 'groups_setup_nav', 2 );
    }
    }

    /* I am using the same function (groups_setup_nav) as BuddyPress to avoid
    * any hacking to the original code
    */

    function manoj_groups_setup_nav(){

    if (!is_site_admin() ){

    global $bp, $current_blog;
    global $group_obj, $is_single_group;

    if ( $group_id = BP_Groups_Group::group_exists($bp->current_action) ) {
    /* This is a single group page. */
    $is_single_group = true;
    $group_obj = new BP_Groups_Group( $group_id );

    /* Using "item" not "group" for generic support in other components. */
    if ( is_site_admin() )
    $bp->is_item_admin = 1;
    else
    $bp->is_item_admin = groups_is_user_admin( $bp->loggedin_user->id, $group_obj->id );

    /* If the user is not an admin, check if they are a moderator */
    if ( !$bp->is_item_admin )
    $bp->is_item_mod = groups_is_user_mod( $bp->loggedin_user->id, $group_obj->id );

    /* Is the logged in user a member of the group? */
    $is_member = ( groups_is_user_member( $bp->loggedin_user->id, $group_obj->id ) ) ? true : false;

    /* Should this group be visible to the logged in user? */
    $is_visible = ( 'public' == $group_obj->status || $is_member ) ? true : false;
    }

    /* Add 'Groups' to the main navigation */
    bp_core_add_nav_item( __('Groups', 'buddypress'), $bp->groups->slug );

    if ( $bp->displayed_user->id )
    bp_core_add_nav_default( $bp->groups->slug, 'groups_screen_my_groups', 'my-groups' );

    $groups_link = $bp->loggedin_user->domain . $bp->groups->slug . '/';

    /* Add the subnav items to the groups nav item */
    bp_core_add_subnav_item( $bp->groups->slug, 'my-groups', __('My Groups', 'buddypress'), $groups_link, 'groups_screen_my_groups', 'my-groups-list' );
    //bp_core_add_subnav_item( $bp->groups->slug, 'create', __('Create a Group', 'buddypress'), $groups_link, 'groups_screen_create_group', false, bp_is_home() );
    bp_core_add_subnav_item( $bp->groups->slug, 'invites', __('Invites', 'buddypress'), $groups_link, 'groups_screen_group_invites', false, bp_is_home() );

    if ( $bp->current_component == $bp->groups->slug ) {

    if ( bp_is_home() && !$is_single_group ) {

    $bp->bp_options_title = __('My Groups', 'buddypress');

    } else if ( !bp_is_home() && !$is_single_group ) {

    $bp->bp_options_avatar = bp_core_get_avatar( $bp->displayed_user->id, 1 );
    $bp->bp_options_title = $bp->displayed_user->fullname;

    } else if ( $is_single_group ) {
    // We are viewing a single group, so set up the
    // group navigation menu using the $group_obj global.

    /* When in a single group, the first action is bumped down one because of the
    group name, so we need to adjust this and set the group name to current_item. */
    $bp->current_item = $bp->current_action;
    $bp->current_action = $bp->action_variables[0];
    array_shift($bp->action_variables);

    $bp->bp_options_title = bp_create_excerpt( $group_obj->name, 1 );
    $bp->bp_options_avatar = '<img src="' . $group_obj->avatar_thumb . '" alt="Group Avatar Thumbnail" />';

    $group_link = $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug . '/';

    // If this is a private or hidden group, does the user have access?
    if ( 'private' == $group_obj->status || 'hidden' == $group_obj->status ) {
    if ( groups_is_user_member( $bp->loggedin_user->id, $group_obj->id ) &amp;&amp; is_user_logged_in() )
    $has_access = true;
    else
    $has_access = false;
    } else {
    $has_access = true;
    }

    // Reset the existing subnav items
    bp_core_reset_subnav_items($bp->groups->slug);
    // bp_core_add_nav_default( $bp->groups->slug, 'groups_screen_group_home', 'home' );
    bp_core_add_subnav_item( $bp->groups->slug, 'home', __('Home', 'buddypress'), $group_link, 'groups_screen_group_home', 'group-home' );

    // If the user is a group mod or more, then show the group admin nav item */
    if ( $bp->is_item_mod || $bp->is_item_admin )
    bp_core_add_subnav_item( $bp->groups->slug, 'admin', __('Admin', 'buddypress'), $group_link , 'groups_screen_group_admin', 'group-admin', ( $bp->is_item_admin + (int)$bp->is_item_mod ) );

    // If this is a private group, and the user is not a member, show a "Request Membership" nav item.
    if ( !$has_access &amp;&amp; !groups_check_for_membership_request( $bp->loggedin_user->id, $group_obj->id ) &amp;&amp; $group_obj->status == 'private' )
    bp_core_add_subnav_item( $bp->groups->slug, 'request-membership', __('Request Membership', 'buddypress'), $group_link , 'groups_screen_group_request_membership', 'request-membership' );

    if ( $has_access &amp;&amp; $group_obj->enable_forum &amp;&amp; function_exists('bp_forums_setup') )
    bp_core_add_subnav_item( $bp->groups->slug, 'forum', __('Forum', 'buddypress'), $group_link , 'groups_screen_group_forum', 'group-forum', $is_visible);

    if ( $has_access &amp;&amp; $group_obj->enable_wire &amp;&amp; function_exists('bp_wire_install') )
    bp_core_add_subnav_item( $bp->groups->slug, 'wire', __('Wire', 'buddypress'), $group_link, 'groups_screen_group_wire', 'group-wire', $is_visible );

    if ( $has_access &amp;&amp; $group_obj->enable_photos &amp;&amp; function_exists('bp_gallery_install') )
    bp_core_add_subnav_item( $bp->groups->slug, 'photos', __('Photos', 'buddypress'), $group_link, 'groups_screen_group_photos', 'group-photos', $is_visible );

    if ( $has_access )
    bp_core_add_subnav_item( $bp->groups->slug, 'members', __('Members', 'buddypress'), $group_link, 'groups_screen_group_members', 'group-members', $is_visible );

    if ( is_user_logged_in() &amp;&amp; groups_is_user_member( $bp->loggedin_user->id, $group_obj->id ) ) {
    if ( function_exists('friends_install') )
    bp_core_add_subnav_item( $bp->groups->slug, 'send-invites', __('Send Invites', 'buddypress'), $group_link, 'groups_screen_group_invite', 'group-invite', $is_member );

    bp_core_add_subnav_item( $bp->groups->slug, 'leave-group', __('Leave Group', 'buddypress'), $group_link, 'groups_screen_group_leave', 'group-leave', $is_member );
    }
    }
    }
    }
    }
    add_action( 'wp', 'bp_group_admin_only',1);
    add_action( 'wp', 'manoj_groups_setup_nav',2);

    #40039
    fishbowl81
    Participant

    possibly,

    /**************************************************************************

    xprofile_admin_manage_field()

    Handles the adding or editing of profile field data for a user.

    **************************************************************************/

    function xprofile_admin_manage_field( $group_id, $field_id = null ) {

    global $message, $groups;

    $field = new BP_XProfile_Field($field_id);

    $field->group_id = $group_id;

    if ( isset($_POST) ) {

    if ( BP_XProfile_Field::admin_validate($_POST) ) {

    $field->name = $_POST;

    $field->desc = $_POST;

    $field->is_required = $_POST;

    $field->is_public= $_POST;

    $field->type = $_POST;

    $field->order_by = $_POST[“sort_order_$field->type”];

    if ( !$field->save() ) {

    $message = __(‘There was an error saving the field. Please try again’, ‘buddypress’);

    $type = ‘error’;

    unset($_GET);

    xprofile_admin($message, $type);

    } else {

    $message = __(‘The field was saved successfully.’, ‘buddypress’);

    $type = ‘success’;

    unset($_GET);

    $groups = $groups = BP_XProfile_Group::get_all();

    xprofile_admin( $message, $type );

    }

    } else {

    $field->render_admin_form($message);

    }

    } else {

    $field->render_admin_form();

    }

    }

    line 199, in bp-xprofile-admin.php,

    not really sure what you are asking

    Brad

    #37783
    reprocessor
    Participant

    and some of this:

    [Sat Feb 7 17:41:14 2009] [error] [client 86.162.51.73] user gigbuddy not found: /

    [Mon Feb 9 12:26:44 2009] [error] [client 86.158.64.7] FastCGI: server “/var/www/fcgi/php-cgi” stderr: WordPress database error Unknown column ‘g.status’ in ‘where clause’ for query SELECT id as group_id, slug FROM wp_bp_groups WHERE g.status = ‘public’ made by require_once, do_action, call_user_func_array, groups_admin_settings, bp_has_groups, BP_Groups_Template->bp_groups_template, groups_get_all, BP_Groups_Group->get_all

    [Mon Feb 9 12:28:56 2009] [error] [client 86.158.64.7] user damageinc not found: /phpmyadmin

    [Mon Feb 9 12:29:53 2009] [error] [client 86.158.64.7] user gigbuddy not found: /wp-admin/

    [Thu Feb 12 10:41:55 2009] [error] [client 86.162.51.73] FastCGI: server “/var/www/fcgi/php-cgi” stderr: WordPress database error Unknown column ‘g.status’ in ‘where clause’ for query SELECT id as group_id, slug FROM wp_bp_groups WHERE g.status = ‘public’ made by require_once, do_action, call_user_func_array, groups_admin_settings, bp_has_groups, BP_Groups_Template->bp_groups_template, groups_get_all, BP_Groups_Group->get_all

    [Thu Feb 12 10:44:35 2009] [error] [client 86.162.51.73] user damageinc not found: /phpmyadmin

    #37321
    Burt Adsit
    Participant

    Lets start from scratch here. Do you have the x-profile tables in you db? You should have:

    (tableprefix_)bp_xprofile_groups

    (tableprefix_)bp_xprofile_fields

    (tableprefix_)bp_xprofile_data

    Where (tableprefix_) is set to something like ‘wp_’ depending on how you specified it on wpmu install.

    When you look at the tables with phpMyAdmin is there any data in the bp_xprofile_groups table? There should be 1 record in there on a clean install. id == 1 and name == ‘Basic’.

    In the table bp_xprofile_fields there should be 1 record it should have id == 1, group_id == 1 and name == ‘Full Name’.

    If you don’t have all the above you will get the error you describe. If you don’t have all of that then the required tables for bp are not being created and populated properly.

    #36471
    ageeshkg
    Member

    do you want to create members and add the to specific groups while creating them?

    this piece of code may help you in adding the user to group.

    //this will give the groups for the logged in user.

    $groupIDs = get_userGroups($bp);

    //from the groupIDs you can create the group object

    $group = new BP_Groups_Group( $group_id )

    //make the user assigned to the specific group. pass the user id of the new member

    groups_join_group($groupID,$user_id);

    #35816
    yu
    Participant

    we got it!

    in bp-groups-clases.php change

    function get_user_dataset() {
    global $wpdb, $bp;
    return $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT user_id, is_admin, inviter_id, user_title, is_mod FROM " . $bp['groups']['table_name_members'] . " WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0 ORDER BY rand()", $this->id ) );
    }

    to this ->

    function get_user_dataset() {
    global $wpdb, $bp;
    return $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT user_id, is_admin, user_title, is_mod FROM " . $bp['groups']['table_name_members'] . " WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0 ORDER BY rand()", $this->id ) );}

    #35672
    Burt Adsit
    Participant

    If I were gonna do what you want to do I’d do something like this:

    // group_id, limit, page, exclude_admins_mods, exclude_banned
    $group = BP_Groups_Member::get_all_for_group( $group_id, false, false, false, false ) {
    if ( $group['members'] ) {
    foreach ( (array) $group['members']['user_id'] as $member ) {
    $user= new BP_Core_User($member);
    // do some formatting and display of this user obj
    // see: bp-core-classes.php, 'class BP_Core_User' for what's available

    // $user->avatar_thumb is html link to avatar
    // $user->user_link is html link to user full name
    }
    }

    I’m kinda hazy about the returned array from get_all_for_group(). It looks like it returns an array structured like this:

    array( ‘members’ => $members, ‘count’ => $total_member_count )

    Which means we need the $groups and it is actually composed of:

    array( ‘user_id’, ‘date_modified’)

    Which means we need:

    $group['members']['user_id'] (syntax?)

    As the foreach loop array.

    (sigh) Gotta be a better way but I don’t see any. I have no place to test this easily at the moment.

    #35651

    In reply to: Group ID

    seriestv
    Member

    I dont get it, please help me as a noob. First time with wp

    Its another bp-component: bp_xxx but works IN groups like forums. I’ve tried to use bp_group_id() (just as wire group) but isnt working.

    #35191
    oceandoctor
    Member

    Here’s another snippet. This is the first error log entry that appears after invoking BP:

    [suexec 11345] kundenfile = 1, mustkundenfile = 1, file = /kunden/homepages/14/d123456789/htdocs/exploreouroceans/index.php, cgifeature = 350

    [suexec 11345] Chdir to /kunden/homepages/14/d123456789/htdocs/exploreouroceans

    [suexec 11345] Executing PHP5 /usr/lib/cgi-bin/php5 /kunden/homepages/14/d123456789/htdocs/exploreouroceans/index.php

    WordPress database error Table ‘db270846977.wp_bp_xprofile_data’ doesn’t exist for query SELECT d.value, f.name FROM wp_bp_xprofile_data d, wp_bp_xprofile_fields f WHERE d.field_id = f.id AND d.user_id = 0 AND f.parent_id = 0 AND f.name = ‘Full Name’ made by get_value_byfieldname

    WordPress database error Table ‘db270846977.wp_bp_xprofile_data’ doesn’t exist for query SELECT d.value, f.name FROM wp_bp_xprofile_data d, wp_bp_xprofile_fields f WHERE d.field_id = f.id AND d.user_id = 0 AND f.parent_id = 0 AND f.name = ‘Full Name’ made by get_value_byfieldname

    WordPress database error Table ‘db270846977.wp_bp_messages_recipients’ doesn’t exist for query SELECT unread_count FROM wp_bp_messages_recipients WHERE user_id = 0 AND is_deleted = 0 made by get_inbox_count

    WordPress database error Table ‘db270846977.wp_bp_messages_recipients’ doesn’t exist for query SELECT unread_count FROM wp_bp_messages_recipients WHERE user_id = 0 AND is_deleted = 0 made by get_inbox_count

    WordPress database error Table ‘db270846977.wp_bp_groups’ doesn’t exist for query SELECT id FROM wp_bp_groups WHERE slug = ‘public’ made by group_exists

    WordPress database error Table ‘db270846977.wp_bp_groups_groupmeta’ doesn’t exist for query SELECT gm.group_id FROM wp_bp_groups_groupmeta gm, wp_bp_groups g WHERE g.id = gm.group_id AND g.status != ‘hidden’ AND gm.meta_key = ‘total_member_count’ ORDER BY CONVERT(gm.meta_value, SIGNED) DESC made by get_popular

    [Sat Dec 27 13:46:21 2008] [warn] (2)No such file or directory: mod_mime: analyze_ct: cannot get media type from ‘x-mapp-php5’

    [Sat Dec 27 13:46:21 2008] [warn] mod_mime: analyze_ct: cannot get media type from ‘x-mapp-php5’

    [suexec 11347] started: /usr/lib/apache-ssl/suexec dummywwwexecuser ftpusers php5exe

    [suexec 11347] REDIRECT_STATUS: 200

    [suexec 11347] doing chroot

    Can you tell I’m desperate? :)

    gogoplata
    Participant

    The basics of what I did was edit bp-xprofile.php and removed these lines:

    $sql[] = “INSERT INTO “. $bp . ” (

    id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete

    ) VALUES (

    1, 1, 0, ‘textbox’, ‘” . __( ‘Public Display Name’, ‘buddypress’) . “‘, ”, 1, 1, 0, ”, 1, 0

    );”;

    $sql[] = “INSERT INTO “. $bp . ” (

    id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete

    ) VALUES (

    2, 1, 0, ‘textbox’, ‘” . __( ‘Last Name’, ‘buddypress’) . “‘, ”, 1, 2, 0, ”, 1, 0

    );”;

    Then I went into my database and deleted those fields. Once those are gone BP defaults to using the username.

    #33525

    In reply to: Wire & Activity

    Andy Peatling
    Keymaster

    For posting on a profile wire yes. On a profile wire:

    item_id = user_id for the user you are posting a wire message to.

    The wire messages are stored in wp_bp_xprofile_wire.

    However, the wire component is generic and can be used on anything at all. For instance it’s used for groups:

    item_id = group_id and messages are stored in the table ‘wp_bp_groups_wire’.

    The purpose for component_name in the activity tables is for formatting. It will use the component_name to match a formatting function in the code, that will turn an activity entry into something readable and that you can print to the screen.

Viewing 14 results - 551 through 564 (of 564 total)
Skip to toolbar