Search Results for 'how to hide pages'
-
AuthorSearch Results
-
January 24, 2010 at 6:38 pm #61522
21cdb
ParticipantGreat work! I haven’t had the time for a detailed test, but i have some short feadback for the beginning:
1. Everything works fine and seems logical. Thats great. There could be some front-end twaeks, but i will come back later next week with some more detailed ideas and mockups.
2. From our experience it is great to have advanced edit functions but hide them in a second row from the avarage user (like the wordpress backend editor does). For a wiki article the user (students) should focus on the content instead of any fancy formating. Basic options could be a select-box for h1, h2, h3 (this is important and must be easy accessible, because it will build the toc and people should get used to it) bold, italic, url link, unordered list, and numberd list. Everything else could go in a second or third row which appears if you click some “advanced options” button.
3. (future release) A searchable wiki directory page with all public pages.
4. (future release) “Suggest a wiki page” button so that non admin-members could ask the admin to create a new wiki page for them.
5. (future release) non-admin wiki page creation
January 1, 2010 at 7:42 pm #59885In reply to: Soon to release bp group control plugin
Anonymous User 96400
Inactivesetting 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.
December 10, 2009 at 10:27 pm #58439In reply to: Group Wiki Plugin (not a release, but in progress)
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.
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.
November 24, 2009 at 1:15 pm #57376Catherine
Participantwell there are members plugins that wont allow the nav to show if the member isnt logged in, one is user access manager – you can specify pages to not show all together, in nav as well – would this work?
July 22, 2009 at 10:15 am #49782In reply to: Should we use WP/BP or another platform?
Mariusooms
ParticipantThere 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.
May 19, 2009 at 8:45 pm #45672In reply to: Author Avatars list plugin now works with BuddyPress
ndrwld
ParticipantI use it as substitute for default BP members widget. Mainly because without any code changes:
1. I can choose avatars size in px
2. Simple link avatars to blogs, their websites, member pages
3. There is possibility to chooce Sorting order (by posts number, registration date, login name, name display, user id…)
4. You can hide users by inserting their id
5. Choose to show users from selected blogs
6. Group by blogs
7. there are more features
I think it’s quite useful for those who don’t have much experience with loop and need simple customization widget.
Thanks bforchhammer to here is Changeset 118704 with possibility link avatars to bp member page.
May 7, 2009 at 4:48 am #44676Saraswati11
ParticipantDo we know where Andy would be adding the hide function?
May 5, 2009 at 2:34 pm #44505Saraswati11
ParticipantThere’s a new post regarding skeleton theme, https://buddypress.org/forums/topic.php?id=2522. He states, “So in looking through the skeleton theme I noticed something strange.
I am wondering why the ‘Activity’, ‘Profile’, ‘Wire’, and ‘Friends’ items do not work from the optionsbar?”
response, “It looks like the options bar is showing up on the directory pages when it shouldn’t – most likely because I forgot to add a hide function. All the other pages are working fine. I will update this.”
For the pages i’m referring to i have the same problem, the options bar that shows up on these pages (not user bars links to same sections) links go to “The page you were looking for was not found.”
I’m thinking the solution for that would be the same for me?
May 5, 2009 at 7:44 am #44466In reply to: Optionsbar fails in BP1.0 skeleton member theme
Andy Peatling
KeymasterIt looks like the options bar is showing up on the directory pages when it shouldn’t – most likely because I forgot to add a hide function. All the other pages are working fine. I will update this.
April 20, 2009 at 12:54 am #43015In reply to: Member pages all the same widgets
jodyw1
ParticipantI was wondering if this is what you guys were looking for:
http://wpmudev.org/project/Menus
The plugin gives you control of what menus are turned on site-wide for each member. Well, it’s kind of a “global” thing right now, but it seems to take care of disabling back-end menus.
Here’s the description of the plugin:
“….If, like me, you need to hide the Themes or Import Menu, or don’t want anyone messing with their Permalinks menu, or are frightened by the Delete Blog menu, this plugin will help.
Toggles the following in WPMU 2.7
‘Site Administrator Gets Limited Menus?’,
‘Posts’,
‘Posts Add New’,
‘Posts Edit’,
‘Posts Tags’,
‘Posts Categories’,
‘Links’,
‘Links Add New’,
‘Links Edit’,
‘Links Link Categories’,
‘Pages’,
‘Pages Add New’,
‘Pages Edit’,
‘Media’,
‘Media Add New’,
‘Media Library’,
‘Comments’,
‘Appearance’,
‘Appearance Themes’,
‘Users’,
‘Users Authors and Users’,
‘Users Add New’,
‘Users Your Profile’,
‘Tools’,
‘Tools Import’,
‘Tools Export’,
‘Tools Turbo’,
‘Settings’,
‘Settings General’,
‘Settings Writing’,
‘Settings Reading’,
‘Settings Discussion’,
‘Settings Privacy’,
‘Settings Permalinks’,
‘Settings Media’,
‘Settings Miscellaneous’,
‘Settings Delete Blog’,
‘WPMU Media Buttons’,
‘WP Media Buttons’,
‘Dashboard’
If you use other plugins to add/disable/hide admin menus, there will be collisions/errors. Happy testing!
Plugins adding menu pages to WPMU 2.7 Adminbar may not be hidden in all browsers.
Favorites menu items toggle as well….”
April 16, 2009 at 7:28 pm #42777In reply to: Restrict user blogs (tools, pages, themes)
peterverkooijen
ParticipantNo. Here\’s some code from the plugin:
‘/* Hide the Dashboard link (2.5+) and the Tools menu (2.7) */
function wphd_hide_dashboard() {
global $menu, $current_user;
if (!current_user_can(‘edit_posts’)) {
if (0 <= wphd_hide_dashboard_version(‘2.6’)) {
unset($menu[0]);
} else if (0 >= wphd_hide_dashboard_version(‘2.7’)) {
unset($menu[0]);
unset($menu[4]);
unset($menu[55]);
}
}
}
‘
I\’d remove \’unset($menu[4]);\’ and \’55\’ and see what happens. Someone who better understands programming may be able do add/edit this to get what you want.
The plugin is from Kim Parsell. Perhaps you can convince her to expand it and make it more modular.
April 16, 2009 at 6:34 pm #42793In reply to: Restrict user blogs (tools, pages, themes)
peterverkooijen
ParticipantThe WP Hide Dashboard plugin may help.
April 14, 2009 at 6:55 pm #42656In reply to: Member pages all the same widgets
John James Jacoby
KeymasterBy backend menus for WP, do you mean you want to totally remove access to the wp-admin area?
This has been a common request by others as well, especially if you have blogs turned off and are trying to hide it completely for subscribers.
If you’re saying that each member still has a blog, but you want them to be able to create new blog posts and manage their blogs through the buddypress interface, that still is not a possibility, and would require an additional plugin (in my opinion) that does not yet (and may never) exist with BP…
It is possible to setup default widgets for blogs, it’s a little tricky though. Also, in order to setup a default member blog, I’ve found the best way to do that is to only give them one option and only have one theme turned on the Site-Admin->Themes area. There may be a way to force a default theme, but I’ve never attempted it yet.
January 31, 2009 at 3:25 pm #37025In reply to: Cannot access Account Settings under Users
lorenzocoffee
MemberHy,
same problem here, on wp mu 2.7,
plus after having ‘runned’ that file twice with same alert.wp-admin/admin.php?page=bp-xprofile/admin-mods/bp-xprofile-account-tab.php(just to see what happen)homepage (on ‘root’+ BuddyPress Home Theme) did appear without most of the previously selected widgets (only the center/middle coloum did ‘survive’).
funnily, so to speak, on the widgets board them appear deactivated,
the “self-deactivated” widgets (after the double run of ‘ bp-xprofile-account-tab.php ‘ or incidentally at the same time but for other unknown reasons)
are:- Welcome
- Members
- Who’s Online
- Site Wide Activity
- Recent Blog Posts
- Groups
so all dinamic related plugs
Unafected widgets,in the Homepage, as this matter did possibily trigger homepage only (apparently)
- pages
- Recent post
- Calendar
- Search
- Archives
I’ve reactivated the ‘rebels’ widgets on their original position, content and setting
were not affected by this incidentI will hide (//) that string, even if I’m quite sure that function was working up to this morning, when I had All in One SEO , Google XML Sitemaps , and Post to SimpleMachines Forum SMF plugin already working
I did a back up before to install:Add to Any: Share/Save/Bookmark Button- AJAX Comment Preview -OpenID – and SEO Smart Links,so I’m going to deactivate theese latests plug
and see what happen backing up of 4-5 hors.please read this post as feedback.
cheers 🙂 -
AuthorSearch Results