Forum Replies Created
-
Author
-
RoaderParticipant
Radu,
Photo 2: Having problem with this. I want to remove the Reply border, but this Reply has the same Class of Comment. Then, when I change something, this affect the other. For example: border: none; font-size: 11px;
RoaderParticipantQuerida Laura, incluso he probado eso de desactivar bbpress en una instalación limpia, y es así como digo. Si desactivas bbpress el Blog no funciona para nada.
RoaderParticipantOk I found the problem with Reply:
// scripts to async.
$scripts_to_async = array(‘comment-reply.min.js’);But, the css, How can I solve it?
Comment and Reply has the same class, then, you know.
RoaderParticipantAbe, check #151936
You need to protect your site seventhqueen.com
Your site is vulnerable.
RoaderParticipantThis code works fine with Newest Registered. For Oldest Registered, you need to change the nickname manually. If your username is masterkrisna, and your full name is Radu Maharaj, then, your nickname needs to be radumaharaj.
RoaderParticipantMy friend Radu, the Solution for this Topic is:
COPY CODEfunction set_default_display_name( $user_id ) { $user = get_userdata( $user_id ); $name = sprintf( '%s %s', $user->first_name, $user->last_name ); $nickname = sanitize_user( strtolower( str_replace( ' ', '', $name ) ) ); $args = array( 'ID' => $user_id, 'display_name' => $name, 'nickname' => $nickname, 'user_nicename' => $nickname ); wp_update_user( $args ); } add_action( 'user_register', 'set_default_display_name' );
RoaderParticipantHello Abe, I spent hours looking for solutions. And I shared them here.
Just I need to put Captchas to the Theme.
On the part of you, please improve that of Pagespeed I. and GTmetrix.
Check Comment #151940RoaderParticipantAnd here, when I press Reply, nothing happens… I cant reply.
Attachments:
You must be logged in to view attached files.RoaderParticipantCOPY CODE// Force strong password BuddyPress plugin function lehelmatyus_validation() { global $bp; if ( !empty( $_POST['signup_password'] ) ) if ( !valid_pass( $_POST['signup_password'] ) ){ $bp->signup->errors['signup_password'] = __( 'Your password is not strong enough. It needs to be at least 8 characters long, and must contain at least: 1 lowercase character (a-z), 1 uppercase character (A-Z), 1 number (0-9) and 1 special character (!@#..)', 'buddypress' ); } } add_action( 'bp_signup_validate', 'lehelmatyus_validation'); function valid_pass($candidate) { $r1='/[A-Z]/'; //Uppercase $r2='/[a-z]/'; //lowercase $r3='/[!@#$%^&*()-_=+{};:,<.>]/'; // whatever you mean by special char $r4='/[0-9]/'; //numbers if(preg_match_all($r1,$candidate, $o)<1) return FALSE; if(preg_match_all($r2,$candidate, $o)<1) return FALSE; if(preg_match_all($r3,$candidate, $o)<1) return FALSE; if(preg_match_all($r4,$candidate, $o)<1) return FALSE; if(strlen($candidate)<8) return FALSE; return TRUE; }
Attachments:
You must be logged in to view attached files.RoaderParticipantRadu, please, check this, and give the right code…
https://buddypress.org/support/topic/minimum-password-strength/RoaderParticipantLimit buddypress (sweetdate) user email domains:
SOLUTION:
Create a basic plugin: restricted-email-domains.php
COPY CODE<?php /* Plugin Name: Restricted Email Domains Description: Restricts registration user email addresses to @valid-domains.com From: http://old.webit.ca/2011/03/limit-user-email-domains-in-buddypress/ Version: 1.0 */ add_option('limited_email_domains', array('yahoo.com', 'outlook.com', 'hotmail.com', 'gmail.com', 'aol.com', 'mail.com'));
Then, Radu, help me with Force users to use Strong Passwd in BP.
RoaderParticipantUPDATE CODE:
COPY CODEfunction set_default_display_name( $user_id ) { $user = get_userdata( $user_id ); $name = sprintf( '%s %s', $user->first_name, $user->last_name ); $nickname = sanitize_user( strtolower( str_replace( ' ', '', $name ) ) ); $args = array( 'ID' => $user_id, 'display_name' => $name, 'nickname' => $nickname, 'user_nicename' => $nickname ); wp_update_user( $args ); } add_action( 'user_register', 'set_default_display_name' );
RoaderParticipantRADU. The Solution for changing username / nickname is:
But please, check the Register Form, I dont know why! The code for valid Emails does not work. And not work Force Strong Passwd.
COPY CODEfunction set_default_display_name( $user_id ) { $user = get_userdata( $user_id ); $name = sprintf( '%s %s', $user->first_name, $user->last_name ); $nickname = strtolower( str_replace( ' ', '', $name ) ); $args = array( 'ID' => $user_id, 'display_name' => $name, 'nickname' => $nickname, 'user_nicename' => $nickname ); wp_update_user( $args ); } add_action( 'user_register', 'set_default_display_name' );
RoaderParticipantRADU, for example:
But, does not work, I dont know why! :-/COPY CODEfunction set_default_display_name( $user_id ) { $user = get_userdata( $user_id ); $name = sprintf( '%s %s', $user->first_name, $user->last_name ); $args = array( 'ID' => $user_id, 'display_name' => $name, 'nickname' => $name ); wp_update_user( $args ); } add_action( 'user_register', 'set_default_display_name' );
Source: quick-tip-set-the-default-display-name-for-wordpress-users
RoaderParticipantMy friend Radu.
I see where the problem is.
By default, WordPress generates the nickname based on the User Name.
If one changes the Nickname, then the Username is not exposed.
However, doing this task manually is very tedious on a site with BuddyPress.
Therefore, what we need is Only a Php Code, which automatically changes the Nickname based on the First Name and Last Name of the User.
So please, help us with that.
Photo 1: New User.
Photo 2–3: Custom User.Attachments:
You must be logged in to view attached files.RoaderParticipantHola Laura, aun en esperas de que Radu y los demás entreguen las soluciones para la Seguridad del Theme. NO funciona tampoco el plugin de SSL Insecure Content Fixer, NO funciona la función de WordFence de forzar a todos al uso de contraseña fuerte, etc.
Otra cosa es, que el BLOG No funciona sin BbPress. Yo no quiero Foros en mi página, pero si desinstalo eso, adiós Blog -_-
RoaderParticipantEspero que LAURA lea esto:
Laura, tu colega no entiende algo. Y es que esto es un error. El Tema o el WordPress o el Buddypress, demuestra el Nombre de Usuario con el que se inicia sesión de TODOS los usuarios. Eso hace vulnerable la página y las Cuentas de Usuarios.
Lo otro, con el Tema, NO funciona Forzar a usar contraseñas fuertes, que es una Función de WordFence. Tampoco funciona un código php para SOLO aceptar dominios de emails válidos como yahoo.com.
Tampoco funcionan los Captchas de All In One WP Security. Yo solo espero ayuda!
RoaderParticipantOther problem, but I dont know if it is cause by the Theme: WordFence > force users to use strong passwd, Does Not Work.
Then, this petition is not for customization, is for Security. And if you want, can include it in the next update.
RoaderParticipantUmm
But you know Php, and I know that you can help, No only me, All.
This is not a custom, is a problem of Security. If the problem is money, dont worry, When I can, I pay again for extended. But for now, Radu, I need to solve this, because this is a weak point.
RoaderParticipantFor My friend Radu.
I know he dislikes my requests, but I do them for the benefit of all.WordFence. Please, check this problem, or… includes. STRONG (LINK)
FUNCTIONS:
Point 3: Well, this works, but Only with Author Blog / Post, not with Comments, etc.
This code automatically change UserName for NickName. For BuddyPress @Username in Profile, check this Code (Link). It would help us a simple function based on this.COPY CODEadd_filter( 'request', 'wpse5742_request' ); function wpse5742_request( $query_vars ) { if ( array_key_exists( 'author_name', $query_vars ) ) { global $wpdb; $author_id = $wpdb->get_var( $wpdb->prepare( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key='nickname' AND meta_value = %s", $query_vars['author_name'] ) ); if ( $author_id ) { $query_vars['author'] = $author_id; unset( $query_vars['author_name'] ); } } return $query_vars; } add_filter( 'author_link', 'wpse5742_author_link', 10, 3 ); function wpse5742_author_link( $link, $author_id, $author_nicename ) { $author_nickname = get_user_meta( $author_id, 'nickname', true ); if ( $author_nickname ) { $link = str_replace( $author_nicename, $author_nickname, $link ); } return $link; }
Point 4:
I found this, but, does not work. Please, check it.
CODE 1.
COPY CODE// Restrict WordPress Registration to Email Whitelist add_action('registration_errors', 'sizeable_restrict_domains', 10, 3); function sizeable_restrict_domains( $errors, $login, $email ) { $whitelist = array("yahoo.com","hotmail.com"); if ( is_email($email) ) { $parts = explode('@', $email); $domain = $parts[count($parts)-1]; if ( !in_array(strtolower($domain), $whitelist) ) { $errors->add('email_domain', __('ERROR: You may only register with an approved email address.')); } } return $errors; }
CODE 2.
COPY CODE// Restrict WordPress Registration to Email Whitelist function is_valid_email_domain($login, $email, $errors ){ $valid_email_domains = array("yahoo.com","hotmail.com","outlook.com","gmail.com","aol.com","mail.com");;// whitelist email domain lists $valid = false; foreach( $valid_email_domains as $d ){ $d_length = strlen( $d ); $current_email_domain = strtolower( substr( $email, -($d_length), $d_length)); if( $current_email_domain == strtolower($d) ){ $valid = true; break; } } // if invalid, return error message if( $valid === false ){ $errors->add('domain_whitelist_error',__( '<strong>ERROR</strong>: you can only register using @gmail.com or @outlook.com emails' )); } } add_action('register_post', 'is_valid_email_domain',10,3 );
RoaderParticipantOther code, but not work from functions.php, maybe needs other lines.
COPY CODEif ( $comment->user_id != '0' ) { echo '<span class="some-class">' . get_user_meta( $comment->user_id, 'nickname', true ) . '</span>'; } else { echo '<span class="other-class">' . get_comment_author_link() . '</span>'; }
RoaderParticipantFor Bp/Profile/ @username, I found this ===> BudyPress Username Changer Plugin
And this plugin has problems…But, the best solution is to change this automatically using a sample code in functions.php
I. e. Automatically: User BP Profile @name is = to your nickname.
Attachments:
You must be logged in to view attached files.RoaderParticipantRoaderParticipantMy friend Radu 😀
This code work, but, only with Author (from Blog / Posts). In this example, you can see: author = user demo (nickname) instead sweetadmin (by default).
This code does not work with: Comments, etc., BuddyPress and BbPress. So, PLEASE… Help with the others!
Force with this, to show nickname only in Profile, /members/ , forums/profile, / comment-meta, etc.
COPY CODEadd_filter( 'request', 'wpse5742_request' ); function wpse5742_request( $query_vars ) { if ( array_key_exists( 'author_name', $query_vars ) ) { global $wpdb; $author_id = $wpdb->get_var( $wpdb->prepare( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key='nickname' AND meta_value = %s", $query_vars['author_name'] ) ); if ( $author_id ) { $query_vars['author'] = $author_id; unset( $query_vars['author_name'] ); } } return $query_vars; } add_filter( 'author_link', 'wpse5742_author_link', 10, 3 ); function wpse5742_author_link( $link, $author_id, $author_nicename ) { $author_nickname = get_user_meta( $author_id, 'nickname', true ); if ( $author_nickname ) { $link = str_replace( $author_nicename, $author_nickname, $link ); } return $link; }
Attachments:
You must be logged in to view attached files.RoaderParticipantFor Laura:
Me gustaría poner el Comutador de Idiomas de qTranslate en el Footer (copy area).
Cómo puedo hacerlo?RoaderParticipantFor Laura:
Hola Laura. Como te decía antes, la traducción española tiene varios errores.
Obviamente, usando LocoTranslate uno puede corregir, pero, inmediatamente uno actualiza el Theme se pierden los cambios.Attachments:
You must be logged in to view attached files.RoaderParticipantOther…. MAYBE… ??
https://developer.wordpress.org/reference/functions/the_author_nickname/
RoaderParticipantMaybe… I dont know… you are the master in php… If you get something… let me know.
COPY CODEif ( $comment->user_id != '0' ) { echo '<span class="some-class">' . get_user_meta( $comment->user_id, 'nickname', true ) . '</span>'; } else { echo '<span class="other-class">' . get_comment_author_link() . '</span>'; }
Comment, Post, Activity, Profile…
RoaderParticipantIf I found a PHP code to resolve this vulnerability, I would certainly share it here,
But I find nothing.RoaderParticipantI know that Radu,
And I know I’m telling you a lot.
But this is a security issue that concerns everyone.
Of course, you have the freedom to accept it or not,
Or, you can recommend partial solutions.
-
AuthorPosts