Notifications
Clear all

wpForo 1.x.x [Solved] Two questions in regards to register with Facebook

12 Posts
4 Users
0 Likes
1,681 Views
Posts: 22
Topic starter
(@martin_1)
Eminent Member
Joined: 4 years ago

Is this something that might be added to a future update? Having the option to add html to the phrases?

Or is it already available and is something going wrong with my setup?

1 Reply
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@martin_1,

I'm sorry but HTML will not be enabled for phrases. We've added a new hook at the end of the facebook login information. You can edit and add it too. It'll not be removed after the update, because the same code is also added in the new update.

1. Using cPanel File Manager or Plugin Editor and open this file: /wp-content/plugins/wpforo/wpf-includes/class-api.php

2. Find this line:

<span class="wpforo-fb-info-text">
<?php echo sprintf( wpforo_phrase('When you login first time using Facebook Login button, we collect your account %s information shared by Facebook, based on your privacy settings. We also get your email address to automatically create a forum account for you. Once your account is created, you\'ll be logged-in to this account and you\'ll receive a confirmation email.', false ), $public_profile); ?>
</span>

3. Change to this and save:

<span class="wpforo-fb-info-text">
<?php echo apply_filters('wpforo_fb_login_privacy_info', sprintf( wpforo_phrase('When you login first time using Facebook Login button, we collect your account %s information shared by Facebook, based on your privacy settings. We also get your email address to automatically create a forum account for you. Once your account is created, you\'ll be logged-in to this account and you\'ll receive a confirmation email.', false ), $public_profile)); ?>
</span>

 

4. Then open your current active WordPress theme functions.php file and add custom content via the filter hook. Don't use single quotes in the $add_text value. Change it and add any HTML code you want:

function wpforo_append_html_to_facebook_login_info( $text ){
$add_text = '<br><a href="https://example.com/community/?foro=page&view=privacy">link</a>';
return $text.$add_text;
}
add_filter('wpforo_fb_login_privacy_info', 'wpforo_append_html_to_facebook_login_info', 10);

How to Easily Add Custom Code in WordPress (without Breaking Your Site): https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Posts: 22
Topic starter
(@martin_1)
Eminent Member
Joined: 4 years ago

Thanks for this! I will try it out monday, I need a break :-).

I'll let you kno how it went.

Page 2 / 2