Page 1 of 1

Redirect phpbb Registration to Wordpress

Posted: Tue Feb 27, 2024 1:01 am
by Ezrael
Due to the fact, that Wordpress provide better options to send html email to new users or emails to the admins about the registration I would prefer to use just the WP Registration instead of the phpbb.

Do you know any possibility to change/redirect the phpbb registration to a Wordpress registration form?

Re: Redirect phpbb Registration to Wordpress

Posted: Tue Feb 27, 2024 8:16 pm
by axew3
You can easily use javascript adding this:

Code: Select all

<script>
 if(/mode=login/ig.exec(window.location.href) !== null)
 {
  document.location.replace('https://mysite/mypage');
 }
</script>
into the overall_header.html, just after

Code: Select all

<title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>

{META}
change https://mysite/mypage to fit your page

or if you are using the phpBB wp extension, or any other that hook into the
core.common
event listener in phpBB, just adding the required Php code, that's also very short, and redirect in any case, even if javascript is disabled on browser, but maybe the easy js one can be ok because js is +- always active on any browser 99.9% of times.

Remember to Recompile Stale templates into phpBB (option in ACP) if you add code into template files so to see changes you applied and let them take effect.

[EDITED]