Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 651 through 675 (of 691 total)
  • Author
    Search Results
  • #59885
    Anonymous User 96400
    Inactive

    @Bowe

    setting up different group types is fairly easy. You just have to attach some groupmeta to the group, that basically let you add as many types as you’d like. Then you just check the metadata to figure out what type of group you’re in. Using the groups API you can then add different functionality for different groups.

    I’ve written a types-plugin for one of my sites. It doesn’t have an interface, though. The 3 types I needed are hardcoded into it, so it’s really not suited for a release at the moment. There’s also a lot of more stuff, like a shopping cart, part of that plugin. So, I’ve stripped the functions needed for group types out (hopefully al of them).

    First we need to add the addtional fields to our registration form:

    function sv_add_registration_group_types()
    {
    ?>
    <div id="account-type" class="register-section">
    <h3 class="transform"><?php _e( 'Choose your account type (required)', 'group-types' ) ?></h3>

    <script type="text/javascript" defer="defer">
    jQuery(document).ready(function(){
    jQuery("#account-type-normal_user").attr("checked", true);
    jQuery("#group-details").hide();
    jQuery("#account-type-type_one,#account-type-type_two,#account-type-type_three").click(function(){
    if (jQuery(this).is(":checked")) {
    jQuery("#group-details").slideDown("slow");
    } else {
    jQuery("#group-details").slideUp("slow");
    }
    });
    jQuery("#account-type-normal_user").click(function(){
    if (jQuery(this).is(":checked")) {
    jQuery("#group-details").slideUp("slow");
    } else {
    jQuery("#group-details").slideDown("slow");
    }
    });
    });
    </script>

    <?php do_action( 'bp_account_type_errors' ) ?>
    <label><input type="radio" name="account_type" id="account-type-normal_user" value="normal_user" checked="checked" /><?php _e( 'User', 'group-types' ) ?></label>
    <label><input type="radio" name="account_type" id="account-type-type_one" value="type_one" /><?php _e( 'Type 1', 'group-types' ) ?></label>
    <label><input type="radio" name="account_type" id="account-type-type_two" value="type_two" /><?php _e( 'Type 2', 'group-types' ) ?></label>
    <label><input type="radio" name="account_type" id="account-type-type_three" value="type_three" /><?php _e( 'Type 3', 'group-types' ) ?></label>

    <div id="group-details">
    <p><?php _e( 'We will automatically create a group for your business or organization. This group will be tailored to your needs! You can change the description and the news later in the admin section of your group.', 'group-types' ); ?></p>

    <?php do_action( 'bp_group_name_errors' ) ?>
    <label for="group_name"><?php _e( 'Group Name', 'scuba' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
    <input type="text" name="group_name" id="group_name" value="" />
    <br /><small><?php _e( 'We suggest you use the name of your business or organization', 'group-types' ) ?></small>

    <label for="group_desc"><?php _e( 'Group Description', 'scuba' ) ?></label>
    <textarea rows="5" cols="40" name="group_desc" id="group_desc"></textarea>
    <br /><small><?php _e( 'This description will be visible on your group profile, so it could be used to present your mission statement for example.', 'group-types' ) ?></small>

    <label for="group_news"><?php _e( 'Group News', 'scuba' ) ?></label>
    <textarea rows="5" cols="40" name="group_news" id="group_news"></textarea>
    <br /><small><?php _e( 'Enter any news that you want potential members to see.', 'group-types' ) ?></small>
    </div>
    </div>
    <?php
    }
    add_action( 'bp_before_registration_submit_buttons', 'sv_add_registration_group_types' );

    Then we have to validate things and add some usermeta when a regitration happens:

    /**
    * Add custom userdata from register.php
    * @since 1.0
    */
    function sv_add_to_signup( $usermeta )
    {
    $usermeta['account_type'] = $_POST['account_type'];

    if( isset( $_POST['group_name'] ) )
    $usermeta['group_name'] = $_POST['group_name'];

    if( isset( $_POST['group_desc'] ) )
    $usermeta['group_desc'] = $_POST['group_desc'];

    if( isset( $_POST['group_news'] ) )
    $usermeta['group_news'] = $_POST['group_news'];

    return $usermeta;
    }
    add_filter( 'bp_signup_usermeta', 'sv_add_to_signup' );

    /**
    * Update usermeta with custom registration data
    * @since 1.0
    */
    function sv_user_activate_fields( $user )
    {
    update_usermeta( $user['user_id'], 'account_type', $user['meta']['account_type'] );

    if( isset( $user['meta']['group_name'] ) )
    update_usermeta( $user['user_id'], 'group_name', $user['meta']['group_name'] );

    if( isset( $user['meta']['group_desc'] ) )
    update_usermeta( $user['user_id'], 'group_desc', $user['meta']['group_desc'] );

    if( isset( $user['meta']['group_news'] ) )
    update_usermeta( $user['user_id'], 'group_news', $user['meta']['group_news'] );

    return $user;
    }
    add_filter( 'bp_core_activate_account', 'sv_user_activate_fields' );

    /**
    * Perform checks for custom registration data
    * @since 1.0
    */
    function sv_check_additional_signup()
    {
    global $bp;

    if( empty( $_POST['account_type'] ) )
    $bp->signup->errors['account_type'] = __( 'You need to choose your account type', 'group-types' );

    if( empty( $_POST['group_name'] ) && $_POST['account_type'] != 'normal_user' )
    $bp->signup->errors['group_name'] = __( 'You need to pick a group name', 'group-types' );

    if( ! empty( $_POST['group_name'] ) && $_POST['account_type'] != 'normal_user' )
    {
    $slug = sanitize_title_with_dashes( $_POST['group_name'] );
    $exist = groups_check_group_exists( $slug );
    if( $exist )
    $bp->signup->errors['group_name'] = __( 'This name is not available. If you feel this is a mistake, please <a href="/contact">contact us</a>.', 'group-types' );
    }
    }
    add_action( 'bp_signup_validate', 'sv_check_additional_signup' );

    And then we set up the group for the user (there are some constants in this function, so you’ll need to change that):

    /**
    * Create custom groups for skools, biz and org accounts
    * @since 1.0
    */
    function sv_init_special_groups( $user )
    {
    global $bp;

    // get account type
    $type = get_usermeta( $user['user_id'], 'account_type' );

    if( $type == 'normal_user' )
    {
    // Do nothing
    }
    elseif( $type == 'type_one' || $type == 'type_two' || $type == 'type_three' )
    {
    // get some more data from sign up
    $group_name = get_usermeta( $user['user_id'], 'group_name' );
    $group_desc = get_usermeta( $user['user_id'], 'group_desc' );
    $group_news = get_usermeta( $user['user_id'], 'group_news' );

    $slug = sanitize_title_with_dashes( $group_name );

    // create dive skool group
    $group_id = groups_create_group( array(
    'creator_id' => $user['user_id'],
    'name' => $group_name,
    'slug' => $slug,
    'description' => $group_desc,
    'news' => $group_news,
    'status' => 'public',
    'enable_wire' => true,
    'enable_forum' => true,
    'date_created' => gmdate('Y-m-d H:i:s')
    )
    );
    // add the type to our group
    groups_update_groupmeta( $group_id, 'group_type', $type );

    // delete now useless data
    delete_usermeta( $user['user_id'], 'group_name' );
    delete_usermeta( $user['user_id'], 'group_desc' );
    delete_usermeta( $user['user_id'], 'group_news' );

    // include PHPMailer
    require_once( SV_MAILER . 'class.phpmailer.php' );

    $mail = new PHPMailer();
    $mail->IsSMTP();
    $mail->Host = SV_SMTP;

    $auth = get_userdata( $user['user_id'] );
    $profile_link = $bp->root_domain . '/' . $bp->groups->slug . '/' . $slug . '/admin';

    $message = sprintf( __( 'Hello %s,

    we have created a group for your business or organization. To get more out of your presence on Yoursitenamehere please take some time to set it up properly.

    Please follow this link to fill in the rest of your profile: %s

    We wish you all the best. Should you have any questions regarding your new group, please contact us at support@yoursitenamehere.com.

    Your Yoursitenamehere Team', 'group-types' ), $auth->display_name, $profile_link );

    $mail->SetFrom("support@yoursitenamehere.com","Yoursitenamehere");
    $mail->AddAddress( $auth->user_email );

    $mail->Subject = __( 'Your new group pages on Yoursitenamehere', 'group-types' );
    $mail->Body = $message;
    $mail->WordWrap = 75;
    $mail->Send();
    }
    }
    add_action( 'bp_core_account_activated', 'sv_init_special_groups' );

    When you write a group extension we’ll have to swap the activation call with a function like the one below to be able to check for group types.

    /**
    * Replacement activation function for group extension classes
    */
    function activate_type_one()
    {
    global $bp;
    $type = groups_get_groupmeta( $bp->groups->current_group->id, 'group_type' );
    if( $type == 'type_one' )
    {
    $extension = new Group_Type_One;
    add_action( "wp", array( &$extension, "_register" ), 2 );
    }
    }
    add_action( 'plugins_loaded', 'activate_type_one' );

    The last thing we need to do is add our group type names to group and directory pages:

    /**
    * Modify the group type status
    */
    function sv_get_group_type( $type, $group = false )
    {
    global $groups_template;

    if( ! $group )
    $group =& $groups_template->group;

    $gtype = groups_get_groupmeta( $group->id, 'group_type' );
    if( $gtype == 'type_one' )
    $name = __( 'Type 1', 'group-types' );

    elseif( $gtype == 'type_two' )
    $name = __( 'Type 2', 'group-types' );

    elseif( $gtype == 'type_three' )
    $name = __( 'Type 3', 'group-types' );

    else
    $name = __( 'User Group', 'group-types' );

    if( 'public' == $group->status )
    {
    $type = sprintf( __( "%s (public)", "group-types" ), $name );
    }
    elseif( 'hidden' == $group->status )
    {
    $type = sprintf( __( "%s (hidden)", "group-types" ), $name );
    }
    elseif( 'private' == $group->status )
    {
    $type = sprintf( __( "%s (private)", "group-types" ), $name );
    }
    else
    {
    $type = ucwords( $group->status ) . ' ' . __( 'Group', 'buddypress' );
    }

    return $type;
    }
    add_filter( 'bp_get_group_type', 'sv_get_group_type' );

    /**
    * Modify the group type status on directory pages
    */
    function sv_get_the_site_group_type()
    {
    global $site_groups_template;

    return sv_get_group_type( '', $site_groups_template->group );
    }
    add_filter( 'bp_get_the_site_group_type', 'sv_get_the_site_group_type' );

    It’s quite a bit of code, but it should get you started. This hasn’t been tested with 1.2 btw.

    #58439
    D Cartwright
    Participant

    @Boone Gorges

    Initially I wanted to have the wiki pages privacy completely controlled by the group privacy level but unfortunately we have a need to be able to ‘unhide’ individual wiki pages so in the implementation we’re working on pages will be individually controlled via the group wiki admin page.

    @nexia

    As stated above, I completely agree. Whilst the work we’re doing at the moment will involve mediawiki I think it’s highly likely that I’ll simultaneously (though at a much slower pace) work on something similar to you’re describing in your last post.

    #57379
    maburker
    Participant

    I am sorry the bp-core-adminbar.php

    #56682
    Brajesh Singh
    Participant

    hi

    This is a css problem.

    Put something like this in the theme css(which ever blog theme you are using)

    body {padding-top:28px !important;}

    and The top bar will no more hide the theme.

    Hope it helps.

    btw,you need to have adminbar css in all your themes in order to enable visibility of admin bar.The best way is use import url syntax of css and import adminbar.css from one theme to all the themes.

    #56548

    In reply to: what about bp-plugins?

    Xevo
    Participant

    You can hide the plugins panel in the administration area from your users and you can use plugincommander to choose which plugins should be activated for users and which shouldnt be.

    Personally I don’t see why you would make a plugin folder for a plugin. If every plugin started doing that, then we’d have a lot of plugin folders. :)

    #56312

    In reply to: Broken activity

    arghagain
    Participant

    OK, I saw this in bp-activity.php:

    /* Drop the old sitewide and user activity tables */

    $wpdb->query( “DROP TABLE IF EXISTS {$wpdb->base_prefix}bp_activity_user_activity” );

    $wpdb->query( “DROP TABLE IF EXISTS {$wpdb->base_prefix}bp_activity_sitewide” );

    And so I look in the db and saw there is no bp_activity_user_activity table, and there is no bp_activity_sitewide table. This means it’s a good thing since these got dropped.

    Though I saw this

    $sql[] = “CREATE TABLE {$bp->activity->table_name}

    but to my lack of knowledge of programming, I see this and think it’s bp_activity_something (but no idea)…

    Looked everywhere and I only saw this in db bp_activity_user_activity_cached. This table doesn’t look like it was created by

    $sql[] = “CREATE TABLE {$bp->activity->table_name}, but I could be wrong because I looked at the part under $sql[] = “CREATE TABLE {$bp->activity ->table_name} and saw similar rows get created and these rows are in my bp_activity_user_activity_cached table.

    For example, in bp-activity.php,

    function bp_activity_install() {

    global $wpdb, $bp;

    if ( !empty($wpdb->charset) )

    $charset_collate = “DEFAULT CHARACTER SET $wpdb->charset”;

    $sql[] = “CREATE TABLE {$bp->activity->table_name} (

    id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,

    user_id bigint(20) NOT NULL,

    component_name varchar(75) NOT NULL,

    component_action varchar(75) NOT NULL,

    content longtext NOT NULL,

    primary_link varchar(150) NOT NULL,

    item_id varchar(75) NOT NULL,

    secondary_item_id varchar(75) NOT NULL,

    date_recorded datetime NOT NULL,

    hide_sitewide bool DEFAULT 0,

    KEY date_recorded (date_recorded),

    KEY user_id (user_id),

    KEY item_id (item_id),

    KEY component_name (component_name)

    ) {$charset_collate};”;

    require_once( ABSPATH . ‘wp-admin/upgrade-functions.php’ );

    dbDelta($sql);

    In my current db, table bp_activity_user_activity_cached has everything except hide_sitewide row. In my current db, table bp_activity_user_activity_cached has extra rows that function_bp_activity_install doesn’t have such as date_cached and is_private rows.

    Any suggestion? What rows should I add or remove? Am I looking at the right stuff?

    Looked like at the end of the function bp_activity_install(), it has require_once( ABSPATH . ‘wp-admin/upgrade-functions.php’ );

    dbDelta($sql);

    Maybe the upgrade-functions.php had not gone smoothly?

    #55615
    still giving
    Participant

    A dropdown admin bar, that hides itself, would be nice as a standard option.

    At the very least it dominates all theme design at present, at worst it interferes with the lay out of others themes.

    Added this to the trac for you as it’s a confirmed bug. I spent a few minutes wrestling with it and found that the posting mechanism is tied to the check_is_member function, even though is_site_admin is used to make the post-form visible.

    A quick fix would be to hide the post-form even for site admins, but I’d rather rebuild the access check to allow admins + group members to post on the group wire.

    #53310
    ryans149
    Participant

    Hey, thanks. You are great!!! I was looking for the same

    #53306
    Andy Peatling
    Keymaster

    In your wp-config.php add the line:

    define( ‘BP_DISABLE_ADMIN_BAR’, true );

    #53304
    Rahul Sonar
    Participant

    socialpreneur

    I didnt get a single one. can you give me any suggestion?

    Thanks

    #53227
    takuya
    Participant

    There’re plenty ways! Search the plugins from Developer menu.

    #53049

    In reply to: Hide Admin

    johnegg
    Participant

    Any update on this?

    #51822
    peterverkooijen
    Participant

    Yes, I already use wp-hide-dashboard. It’s a partial solution.

    Users still get the pushy wp-login every now and then, which is a problem because it also has a link to an ancient register/signup form that clashes with Buddypress.

    wp-admin/profile.php also is not whacked by wp-hide-dashboard.

    #51782
    Jeff Sayre
    Participant

    @elemsee

    but it sounds as if your solution removes blogs from the bar altogether. We plan to make subscribers members of blogs that the Admins set up…

    You have BuddyPress installed, I assume. So why don’t you give it a try–disabled the blog tracking and see what happens. It does exactly what you’re looking for. It prevents your members (users) from being able to create their own blogs. It does not hide the existing Admin blogs from them.

    If you have more than one Admin-created blog, you can place additional buttons, or fancy menus, to those Admin-based blogs.

    Unless you change the default behavior, WPMU by default makes all new users subscribers to the primary site blog (Blog ID number 1), which is the Admin blog. If you try out my suggestion, you will see that the “Blog” button is still visible. It takes users to the Admin-created blog. Only the “Blogs” button disappears for sight as it is a link to all user-created blogs, not the Admin blog.

    #51562

    Easiest way would be to use the WPMU function is_site_admin() to determine if the currently logged in user is a site admin, and then hide the buttons accordingly in your template.

    Then, you can create a custom function in plugins/bp-custom.php to redirect a user if they try to access the group creation URL directly.

    r-a-y
    Keymaster

    I’m using a plugin called WP Hide Dashboard on the primary blog:

    https://wordpress.org/extend/plugins/wp-hide-dashboard/

    This hides mostly everything from a subscriber.

    Hope that helps!

    webatease
    Participant

    Gigya Socialize worked for my install… I’ve only tried myspace, facebook and twitter – but it authenticated me correctly and I was able to login to BuddyPress. Only issue I’m having is that each time you login with one of your social usernames, it creates a new username in WPMU/BuddyPress, as opposed to all tying to your one WPMU/BuddyPress account. This created havoc for me, since I want to use groups, and other permissions.

    At this point, I’m leaning towards limiting to just the Facebook login. Does anyone know if there is a way to hide/not allow login using the actual wordpress login, and ONLY use the login for Gigya Socialize? I/e allow users to go to wp-admin, but not give them the option to login using the user/pass – only letting them see the Gigya Socialize plugin.

    #49782
    Mariusooms
    Participant

    There are other platforms and have tried a few myself. As new as the bp platform is, it is by far the quickest out of the box that enables much of what you need already (together with wpmu). However other platform might offer more fine grained control, but it comes with a hefty learning curve as the platform is simply more complex. The upside to bp’s less complex architecture makes it also easier to develop for.

    I’ll see if I can give some input on your requirements.

    The main feature is an easy and somewhat restrictive way to post content. The only thing girls can publish is pictures of outfits, and then tag the clothes (describe, tag, categorize…).

    It looks like you need a custom content type that omits the post message. Flutter allows you to create a specific post type. I haven’t tried it with wpmu. There is also a wpmu plugin called ‘toggle_meta_boxes’ which allows you to hide unneeded post boxes to make it super easy for your users to just upload content.

    We want to have some level of control here. BTW not all users can upload content.

    Since you only have one subject users post on I would recommend NOT giving every user a blog at sign up, but just let them post to the main blog. Keeps you in control over categories, tags, etc. Plus it lets you control the user level. I however you do want to give users a blog there are wpmu plugins which allow you to set blog defaults like categories, predefined pages and posts and such. Also you can make new blog users have an editor role rather than an admin role if you want to control what they can or can not do.

    The content published by everyone goes to the main page, same of today.

    This is done by buddypress through widgets or even custom loops if you are adventurous.

    No problem there.

    People con vote their fabs.

    I haven’t looked at this, but I imagine there would be a wp plugin which would let users vote on posts. If you can find a vote plugin that serves an RSS feed you could pull that into the bp user profile. EVen link it to the activity stream with a small custom plugin.

    When user is logged in, she sees the content of the girls she is following (not pictures of everyone, just pictures of the ones that inspire the user).

    In bp through making friends with other users you can follow the activity of your friends only. At the moment the activity stream is text only, afaik, but I think images in the activity stream is in the pipeline?

    User profile is built by the outfits she publishes

    The profile page shows the latest activity, blog posts, wire messages, etc. of the profiles user.

    and the outfits she favorites.

    This is the most dificult part, since I haven’t looked into it. Assuming you can find a good vote/favorite plugin it should be doable.

    You can search for/discover/subscribe to trends, types of clothes, styles, colors, people…

    This is where bp shines as the search is very well done. Combine it with bp_contents plugin which allows your users to tag themselve, groups, blog and add categories…your archiving possibilities are endless.

    Some pitfalls (already mentioned):

    Privacy controls, inappropriate content flagging (is coming in 1.1 though), it is still not an out of the box solution (however for you requirements there is none that I can think of).

    There are still even other approaches when I think about it, I would recommend wp and bp in a heartbeat. Especially since the backend of both are really solid. Plugins are installed and upgraded easily. It is a widely supported and growing platform and would not hesitate to recommend it to you.

    I hope this helps a little bit.

    #48837
    r-a-y
    Keymaster

    Hey Peter,

    It’s safe, but when upgrading to the newest BP version, you’ll have to remember to make this change again.

    Either that, or until some option in the admin area is made.

    I’m using BeLogical’s fix plus a CSS hack to hide the “Create a Blog” field right now.

    There is no voting system, Peter. Although you can leave a message on the trac:

    https://trac.buddypress.org/ticket/835

    You can login with your existing BP username and password there.

    #48556
    r-a-y
    Keymaster

    Hi Tedmann,

    There’s two ways to go about this:

    (1) CSS route:

    In your /wp-content/themes/carrington-mobile-1.0.2/style.css file, add this:

    body {padding-top:0 !important;}
    #wp-admin-bar {display:none !important;}

    (2) Theme functions.php route:

    In your /wp-content/themes/carrington-mobile-1.0.2/functions.php file, add this:

    remove_action( 'wp_footer', 'bp_core_admin_bar' );
    remove_action( 'admin_footer', 'bp_core_admin_bar' );

    Option #1 will simply hide the admin bar from view, however it will still be loaded if you view the HTML source.

    Option #2 will completely remove the admin bar from the HTML source.

    Not completely 100% that code will work, but give it a shot and report back.

    #48393

    Just read over your post again and you say you want to eliminate the entire backend? Off the top of my head, I don’t know if that’s possible.

    Best way to do this would be to integrate the P2 theme into your user blogs.

    Otherwise, I know there is a WPMU plugin out there to help limit the admin side bar’s available links. If you manually navigate to the page you can still get to them, but it hides the options from view.

    #47786
    3206013
    Inactive

    Hello,

    I’ve tried to check that option “Hide admin bar for logged out users to (No) ” , where shoud I include wp_footer() in the themes ,

    #47783
    Burt Adsit
    Participant

    If it’s not showing on all your blogs then check the setting of: wpmu back end > BuddyPress > General Settings > Hide admin bar for logged out users?

    If some themes are still not showing the admin bar then that means they are not written to calll wp_footer() in the theme itself.

    #47609
    21cdb
    Participant

    As mentioned above the solution is working for me. I also figured out a way to remove the original admin-bar.css out of the header. I’m not at work at the moment, so i can’t look it up and write it down here, but i will do so tomorrow!

    One problem remains for me. In the admin-bar.css and also in my-admin-bar.css there is a padding-top width the height of the buddybar applied to the body of the page.

    If i don’t use my-admin-bar.css and check the “hide adminbar for users that aren’t logged in” in the settings of the dashboard the padding-top isn’t applied to the body. However if i use my-admin-bar.css it gets loaded all the time and not only if a user is logged in. This implies that i always have an extra gap, because the padding si applied all the time!?

    Any hints for this problem?

Viewing 25 results - 651 through 675 (of 691 total)
Skip to toolbar