-
Author
-
June 18, 2017 at 18:39 #164529RoaderParticipant
Please, if you can, includes:
• Support for: <em>WPGlobus Multilingual Everything</em>, qTranslate X is very outdate, abandoned.
• Security Measure: A honeypot in comments, registration and login form. Or, a reCaptcha.
If you can, in Theme Options you can includes a new Tab named: Optimizations (yes my friend, nice and userfull for new customers and noobs).
Security:
* Htaccess recommendations
* Enable some functions php
Speed:
Recommends Wp Super Cache and htaccess for Speed.
• Ajax Search more criteria => Members, Groups, Forums or whatever. The plugin Bp Global Search does not work with your Theme. And for now, Ajax Search does not have sense if only works for search Posts from the Blog. :-/ Please, think about this.
• Copyright Widget Area by Default.
• <a href=”https://buddydev.com/buddypress/add-send-private-message-button-in-members-directory-on-a-buddypress-network/”>Send Private Message from Members Directory</a> (actually only has: View Profile and Add Friend).
• Private Message Privacy:
Code:
// Restrict Private Message to friends function pp_check_message_recipients( $message_info ) { // Site admins are not restricted if ( is_super_admin() ) return $message_info; $recipients = $message_info->recipients; $friend_ids = friends_get_friend_user_ids( bp_displayed_user_id() ); $nf = 0; foreach ( $recipients as $key => $recipient ) { if ( ! in_array( $recipient->user_id, $friend_ids ) ) $nf++; } // If any recipients are not friends, remove everyone from the recipient’s list if ( $nf > 0 ) unset( $message_info->recipients ); return $message_info; } add_action( ‘messages_message_before_save’, ‘pp_check_message_recipients’ );
But, this functions has not option. It says: Allow users to choice: everyone or friens_only from Message Settings.
And this code needs to include: if ( is_super_admin() ) and Editor, Collaborator, Shop_Manager… you know.
• <a href=”https://archived.seventhqueen.com/forums/topic/scroll-down-user-notifications-or-whatever”><strong>Scroll Down User Notify</strong></a>.
————–
If you want:
• A Chat Messenger. Yes, there is one, nice for SweetDate, <a href=”https://codecanyon.net/item/wordpress-buddypress-users-chat-plugin/10776067″><strong>BpChat by Mircode</strong></a> but, is outdate! And does not work very well with your Theme.
Or if you can and wants. Picture ..>
Attachments:
You must be logged in to view attached files.June 18, 2017 at 18:41 #164531RoaderParticipantCode (correction):
COPY CODE// Restrict Private Message to friends. function pp_check_message_recipients( $message_info ) { // site admins are not restricted if ( is_super_admin() ) return $message_info; $recipients = $message_info->recipients; $friend_ids = friends_get_friend_user_ids( bp_displayed_user_id() ); $nf = 0; foreach ( $recipients as $key => $recipient ) { if ( ! in_array( $recipient->user_id, $friend_ids ) ) $nf++; } // if any recipients are not friends, remove everyone from the recipient's list if ( $nf > 0 ) unset( $message_info->recipients ); return $message_info; } add_action( 'messages_message_before_save', 'pp_check_message_recipients' );
June 19, 2017 at 00:28 #164569RoaderParticipantOther important function:
COPY CODE// Limit the access only to Admin add_action( 'init', 'blockusers_init' ); function blockusers_init() { if ( is_admin() && !current_user_can( 'administrator' ) && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { wp_redirect( home_url() ); exit; } }
But, from the Theme Options, you put selection:
[ ] Enable limit the access only to Admins
Include others:
[ ] Editor
[ ] Author
[ ] Contributor
[ ] Shop Manager (for Woocommerce)
[ ] AllAnd that code will be added to functions.php.
Variants (for replace):
If you select Editor, the code is:
`add_action( ‘init’, ‘blockusers_init’ );
function blockusers_init() {
if ( is_admin() && !current_user_can( ‘administrator’ ) && !current_user_can( ‘editor’ ) && !( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}`If you select Contributor:
`add_action( ‘init’, ‘blockusers_init’ );
function blockusers_init() {
if ( is_admin() && !current_user_can( ‘administrator’ ) && !current_user_can( ‘contributor’ ) && !( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}`If you select Author:
COPY CODEadd_action( 'init', 'blockusers_init' ); function blockusers_init() { if ( is_admin() && !current_user_can( 'administrator' ) && !current_user_can( 'author' ) && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { wp_redirect( home_url() ); exit; } }
If you select Shop Manager:
`add_action( ‘init’, ‘blockusers_init’ );
function blockusers_init() {
if ( is_admin() && !current_user_can( ‘administrator’ ) && !current_user_can( ‘shop_manager’ ) && !( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}`If you select Editor and Shop Manager:
`add_action( ‘init’, ‘blockusers_init’ );
function blockusers_init() {
if ( is_admin() && !current_user_can( ‘administrator’ ) && !current_user_can( ‘editor’ ) && !current_user_can( ‘shop_manager’ ) && !( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}`If you select All:
`add_action( ‘init’, ‘blockusers_init’ );
function blockusers_init() {
if ( is_admin() && !current_user_can( ‘administrator’ ) && !current_user_can( ‘editor’ ) && !current_user_can( ‘author’ ) && !current_user_can( ‘contributor’ ) && !current_user_can( ‘shop_manager’ ) && !( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}`You can create more combinations with editor, etc.
June 19, 2017 at 20:26 #164664LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
June 20, 2017 at 01:20 #164698RoaderParticipantHola Laura.
Bueno, este Ticket no requiere de ayuda en realidad. Lo abrí para que uds tengan pendiente ciertas Updates que necesita el Theme, como esa Opción de Seguridad Básica.June 22, 2017 at 19:23 #164934RaduModeratorSorry, we cannot include that cuz, the theme should be lighter as possible(speed, performance, code
quality), every webmaster that uses sweetdate theme can develop and improve functionalities of the theme for the client needs.Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJune 22, 2017 at 19:25 #164935RaduModeratorWe will launch Sweetdate 3.0 in future and after then we can see how some plugin behaves with that and then we will implement most needed plugins for sweetdate users.
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 16, 2017 at 00:12 #167555RoaderParticipantHi Radu,
Okey, but, for security measure:The Registration Form, needs:
When a New User enters his username, if it is equal to his personal name and last name,
You should automatically receive this message:
Your username must be different from your personal name.
So: If his username is johndoe, and his personal name is John Doe, = Error!
But, If his username is john02 and his personal name is John Doe, = No Problem!Laura (in spanish)
Lo que le estoy diciendo a Radu es, que en el Formulario de Registro, si un Nuevo Usuario pone de username: johndoe y de nombre completo John Doe, que automáticamente reciba un aviso: Su nombre de usuario debe ser diferente de su Nombre personal. Pues lógicamente, si alguien usa como username el mismo nombre personal, será fácil de adivinar por cualquier hacker.Por otro lado convertí esa función php que encontré en un plugin básico.
July 18, 2017 at 17:05 #167824RaduModeratorHi,
The logic and conditions that you have recommended for us cannot be implemented thru the theme cuz it depends on every user project, so my advice for you it’s to implement yourself the logic that you needs.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 18, 2017 at 20:29 #167851RoaderParticipant#167555
My solution was:
COPY CODE// Force Strong Username function strong_username() { global $bp; if ( !empty( $_POST['signup_username'] ) ) if ( !valid_username( $_POST['signup_username'] ) ){ $bp->signup->errors['signup_username'] = __( 'Your username is too weak or short. Please, use uppercase, lowercase and numbers.', 'bp-strong-username-password', 'buddypress' ); } } add_action( 'bp_signup_validate', 'strong_username'); function valid_username($candidate) { $r1='/[A-Z]/'; //Uppercase $r2='/[a-z]/'; //lowercase $r3='/[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(strlen($candidate)<8) return FALSE; return TRUE; }
July 19, 2017 at 15:41 #167940RaduModeratorGreat
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.