Hi,
Our forum has user registration disabled (PHPBB ACP => User registration settings => Account activation = Disable registration), but the WP phpBB w3all Login widget still has a Register link that just goes goes to a PHPBB error page ("Creating a new account is currently not possible.")
Would it be possible for the widget to automatically detect that registration is disabled and omit the Register link?
Or, alternatively, could there be an option in the plugin settings to disable the Register link?
Thanks,
Andy
Feature request: detect when PHPBB user registration is disabled
-
- Posts: 2
- Joined: Wed Apr 12, 2017 9:41 pm
- Location: Massachusetts, US
- Contact:
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Feature request: detect when PHPBB user registration is disabled
so you would like to have the register link just to point to WP and not phpBB into widget:
This is adjustment can be done with easy (also could be considered as option to be added).
You just need to replace url that point to phpbb registration, with url to point WP registration instead, just using wp_registration_url() on code, so
In the while (until not added as option), you can open
if in iframe mode open:
views/login_form_include_iframe_mode_links.php
search for line
replace with:
or if not iframe mode open:
views/login_form_include_noiframe_mode_links.php
search for line:
replace with:
hope to not have forget on fly nothing, just post in case.
This is adjustment can be done with easy (also could be considered as option to be added).
You just need to replace url that point to phpbb registration, with url to point WP registration instead, just using wp_registration_url() on code, so
In the while (until not added as option), you can open
if in iframe mode open:
views/login_form_include_iframe_mode_links.php
search for line
Code: Select all
<h3><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=login"><?php echo __( 'Login' , 'wp-w3all-phpbb-integration' ); ?></a> - <a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=register"><?php echo __( 'Register' , 'wp-w3all-phpbb-integration' ); ?></a></h3>
Code: Select all
<h3><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=login"><?php echo __( 'Login' , 'wp-w3all-phpbb-integration' ); ?></a> - <a href="<?php echo wp_registration_url(); ?>"><?php echo __( 'Register' , 'wp-w3all-phpbb-integration' ); ?></a></h3>
or if not iframe mode open:
views/login_form_include_noiframe_mode_links.php
search for line:
Code: Select all
<h3><a href="<?php echo $w3all_url_to_cms; ?>/ucp.php?mode=register"><?php esc_html_e( 'Register' , 'wp-w3all-phpbb-integration' ); ?></a></h3>
Code: Select all
<h3><a href="<?php echo wp_registration_url(); ?>"><?php esc_html_e( 'Register' , 'wp-w3all-phpbb-integration' ); ?></a></h3>
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Feature request: detect when PHPBB user registration is disabled
p.s note the above has just been updated to point to registration url and not login:
wp_registration_url()
and yes this seem to be a valid option necessary into plugin. Will be added in the way you've suggest.
wp_registration_url()
and yes this seem to be a valid option necessary into plugin. Will be added in the way you've suggest.
-
- Posts: 2
- Joined: Wed Apr 12, 2017 9:41 pm
- Location: Massachusetts, US
- Contact:
Re: Feature request: detect when PHPBB user registration is disabled
Actually, I was hoping to have the option to completely remove the "Register" link, since we manually register our PHPBB users. (We use the ACP Add User phpbb mod)
Thanks for the pointers to those php sources. I can hack them for now to comment-out the Register link until you have a chance to add the option (or, better, detect it automatically from the PHPBB settings.)
Thanks for the great support.
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Feature request: detect when PHPBB user registration is disabled
this is even more easy:
REMOVE instead than substitute, the above code, that's all!
REMOVE instead than substitute, the above code, that's all!