Search Results for 'Hide Admin'
-
Search Results
-
Im using @Modemlooper BuddyPress Widget Theme’s code in my own theme and I would like to hide the widget title box’s?
I thought about just using echo to display the data but I can’t come right. Im using the enhanced-buddypress-widgets and with all the admin options and stuff I keep getting errors or nothing displays..
here’s my edited code of enhanced-buddypress-widgets to display only the popular groups without the newest,active,popular links.. http://pastebin.com/arCFtUuE
Any one know how I can go about doing this?
Hi guys,
I have taken away my members ability to delet their topics and forum posts in BP by deleting bp_get_the_topic_post_is_mine() in my themes topic.php file.I would also like to hide the delete links in the activity stream for members, in both the main activity and each seperate groups activity.
Obviously admin needs to be able to delete these but I don’t want members to be able to.Is it a similar process as the forum posts and group topics? I presume it is but don’t know where to locate it. I still need the ‘view’ link but don’t want the ‘delete’ link for members.
Thanks.
Ross
Hi guys,
I’m sure I’m not the only one who would like to do this.
I would like to hide the edit/ delete links in forum posts from my members so that once they post something it cannot be changed. I run a site where people can cause a nuisance by posting then editing their post before an admin sees what had been originally posted and I want to stop this.Hiding them may work but then if someone simply input the url they could still mess with the posts. Is there a fool proof way so that ONLY ADMIN can ever see and use these?
Thanks so much!
Ross
This is a simple rehash of some old code by @nuprn1 (thanks Rich), and filters out various activity messages to keep the stream from clogging up. Put the following in your theme’s functions.php file, and modify as desired;
// Remove (hide) various activities from streams.
function my_hidden_activities($a, $activities) {
//if admin we want to know
//if (is_site_admin())
// return $activities;$nothanks = array(“new_blog_post”, “created_group”, “joined_group”, “new_member”, “friendship_created”, “activity_liked”);
foreach ($activities->activities as $key => $activity) {
if (in_array($activity->type, $nothanks, true)) {
unset($activities->activities[$key]);
$activities->activity_count = $activities->activity_count-1;
$activities->total_activity_count = $activities->total_activity_count-1;
$activities->pag_num = $activities->pag_num -1;
}
}// Renumber the array keys to account for missing items.
$activities_new = array_values( $activities->activities );
$activities->activities = $activities_new;return $activities;
}
add_action(‘bp_has_activities’, ‘my_hidden_activities’, 10, 2 );Have you notice (or I am the only one):
If I hide admin bar for logged out users
I receive this error message:
document type does not allow element “style” hereIf I don’t hide admin bar for logged out users
I passed the w3 validator
I foolishly attempted to do this http://www.phidevinc.com/tech-tips/changing-conceailing-and-securing-wp-admin/comment-page-1#comment-1073 It didn’t work so I deleted what I did and now I’m no longer super admin of my website. I’m only admin. How can I get my super admin status back?
How is Buddypress hidden on the plugins screen (where you activate/deactivate plugins in the admin panel) for user sites? I’m using a ton of Buddypress add-on plugins, as well as Cubepoints and a few others that my users really have no use for, and all of those being shown for them to activate/deactivate is really overwhelming for them.
Just wondering if anyone knows what file the code that hides the core BP plugin from child sites actually is, or if anyone has successfully hidden other plugins from child sites? I thought maybe if I could see the code that does it, maybe I could apply it to the other plugins I’m using that I’d like hidden from users.
WPMU 2.9.2
BuddyPress 1.2.4I need admins to activate newly registered users, not the users themselves. I haven’t been able to come up with a working plugin – probably because I’ve got MU and BuddyPress both running on my “members only” site.
I’ve modified the bp-core-signup.php file to send an e-mail to the user without the activation link and added an e-mail to the admin e-mail with the activation url. However, the user still ends up with the only e-mail, and it contains the activation url. Furthermore, the e-mail comes from noreplay@ which means that WP thinks I don’t have an admin e-mail set, which is not the case (I have one set).
bp-core-signup.php (originally)
Code:function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
$activate_url = bp_get_activation_page() .”?key=$key”;
$activate_url = clean_url( $activate_url );
$admin_email = get_site_option( “admin_email” );if ( empty( $admin_email ) )
$admin_email = ‘noreply@’ . $_SERVER[‘SERVER_NAME’];$from_name = ( ” == get_option( ‘blogname’ ) ) ? ‘BuddyPress’ : wp_specialchars( get_option( ‘blogname’ ) );
$message_headers = “MIME-Version: 1.0n” . “From: “{$from_name}” n” . “Content-Type: text/plain; charset=”” . get_option( ‘blog_charset’ ) . “”n”;
$message = sprintf( __( “Thanks for registering! To complete the activation of your account please click the following link:nn%snn”, ‘buddypress’ ), $activate_url );
$subject = ‘[‘ . $from_name . ‘] ‘ . __( ‘Activate Your Account’, ‘buddypress’ );/* Send the message */
$to = apply_filters( ‘bp_core_activation_signup_user_notification_to’, $user_email );
$subject = apply_filters( ‘bp_core_activation_signup_user_notification_subject’, $subject );
$message = apply_filters( ‘bp_core_activation_signup_user_notification_message’, $message );wp_mail( $to, $subject, $message, $message_headers );
}bp-core-signup.php (my modification, not working)
Code:function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
$activate_url = bp_get_activation_page() .”?key=$key”;
$activate_url = clean_url( $activate_url );
$admin_email = get_site_option( “admin_email” );if ( empty( $admin_email ) )
$admin_email = ‘noreply@’ . $_SERVER[‘SERVER_NAME’];/* START MOD */
$from_name = ( ” == get_option( ‘blogname’ ) ) ? ‘BuddyPress’ : wp_specialchars( get_option( ‘blogname’ ) );
$message_headers = “MIME-Version: 1.0n” . “From: “{$from_name}” n” . “Content-Type: text/plain; charset=”” . get_option( ‘blog_charset’ ) . “”n”;
$message = sprintf( __( “Thanks for registering! And admin will confirm your membership.nnYou will receive a separate e-mail after this confirmation.”, ‘buddypress’ ), $activate_url );
$subject = ‘[‘ . $from_name . ‘] ‘ . __( ‘Activate Your Account’, ‘buddypress’ );/* Send the message */
$to = apply_filters( ‘bp_core_activation_signup_user_notification_to’, $user_email );
$subject = apply_filters( ‘bp_core_activation_signup_user_notification_subject’, $subject );
$message = apply_filters( ‘bp_core_activation_signup_user_notification_message’, $message );wp_mail( $to, $subject, $message, $message_headers );
/* END MOD *//* START ADD */
$from_name = ( ” == get_option( ‘blogname’ ) ) ? ‘BuddyPress’ : wp_specialchars( get_option( ‘blogname’ ) );
$message_headers = “MIME-Version: 1.0n” . “From: “{$from_name}” n” . “Content-Type: text/plain; charset=”” . get_option( ‘blog_charset’ ) . “”n”;
$message = sprintf( __( “New registration request fromnnUsername: %snnE-mail: %snnPlease confirm by clicking the link below:nn%snn”, ‘buddypress’ ), $user_id, $user_email, $activate_url );
$subject = ‘[‘ . $from_name . ‘] ‘ . __( ‘Activate Your Account’, ‘buddypress’ );/* Send the message */
$to = apply_filters( ‘bp_core_activation_signup_user_notification_to’, $admin_email );
$subject = apply_filters( ‘bp_core_activation_signup_user_notification_subject’, $subject );
$message = apply_filters( ‘bp_core_activation_signup_user_notification_message’, $message );wp_mail( $to, $subject, $message, $message_headers );
/* END ADD */
}So, after I submit a test registration, I get an with the information below:
[blockquote]
from Members Only <noreply@domain.net>
to user@domain.com
date Thu, Jun 3, 2010 at 3:42 AM
subject [Members Only] Activate Your Accounthide details 3:42 AM (3 minutes ago)
Thanks for registering! To complete the activation of your account please click the following link:
http://members.domain.net/activate?key=xxxxxxxxxxxxxxxx
[/blockquote]Could someone help me by directing me to a plugin or some way to change my code so that I’m able to restrict registration to admin approval?