Search Results for 'Hide Admin'
-
Search Results
-
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!
RossThis 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?
I’d love to see (and would/will create it if I can figure out how) the ability to, via a plugin which adds these features to the admin and user interfaces not via manual code changes, a way to have for EACH stream (i.e. Site-Wide, Groups, Blogs, Forums, etc)
(1) ADMIN settable INCLUDE for the Activity shown in activity streams (i.e. if the admin wants an option to include more than one action in a stream such as “New Forum Posts” + “New Forum Replies” + “New Blog Posts” + “New Blog Comments” as “Recent Blog and Forum Activity”, be able to create that in the admin interface, name it, and have it show up in the drop-down under that name)
(2) ADMIN settable DEFAULT for the Activity shown in activity streams (i.e. if the admin wants “Recent Blog and Forum Activity” instead of “no filter” to be the site-wide default for activity, be able to set that in the admin interface)
(3) ADMIN settable EXCLUDE for the Activity shown in activity streams (i.e. if the admin want to remove “New Group Memberships” from the drop down and to hide it from the “No Filter” stream, be able to set that in the admin interface)
(4) USER settable preferences for DEFAULT for the Activity shown in activity streams (i.e. if the user wants “New Blog Posts” instead of the admin selected default, and if “New Blog Posts” has not been Admin Excluded, for the user to be able to set that in their Profile interface)
So, am I crazy or what?
OR {hopeful look} maybe someone has already created such a plugin and I’m just missing it?
Topic: Hide some profile fields
Hello
how can I hide some profile fields on the profile page?
They are only information for the admins