Tutorial: Edit PHPBB Reg Links when using RokBridge

RokBridge is an experimental extension for bridging Joomla and phpBB3 user s
This quick tutorial will show you where in includes/functions.php you will need to edit to update the URL links used in phpbb register links.
Since this is a core phpbb file hack it will update all styles which use these functions. Be sure to make a backup of the original file before attempting this.

Discuss this topic here:
Discussion: Tutorial: Edit PHPBB Reg Links when using RokBridge

NOTE: This tutorial was based off the 3.0.4 release and the URL used are examples when using the default Joomla user management modules and components. Normally in a bridged setup you would not have resend activation option turned on so this link would not appear but in case your logon component has that feature we identified the edit needed for that link. This file could be updated by phpbb updates so check this file for your changes after doing any phpbb patching and updates.

Open includes/functions.php

Find around line 2661:
  1.         'U_SEND_PASSWORD'       => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '',
  2.         'U_RESEND_ACTIVATION'   => ($config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',

Replace with:
  1.         'U_SEND_PASSWORD'       => ($config['email_enable']) ? '/index.php?option=com_user&view=reset' : '',
  2.         'U_RESEND_ACTIVATION'   => ($config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable']) ? '/index.php?option=com_user&view=reset' : '',

Find around line 3706:
  1.        'U_REGISTER'            => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),

Replace with:
  1.        'U_REGISTER'            => '/index.php?option=com_user&task=register',      

Flush the phpbb cache and you should see your URL changes.
phpBB3 - RokBridge Specialist
No Support PM unless requested please.
Need help...please read this first!
Your signature is a great place for setup details...help us help you!
I agree with your analysis of your hallucination. -Scott Adams
User avatar
Joe Halleck
Global Moderator
Global Moderator
 
Posts: 3058
Location: Trying to help you...

Here is a version using some variables.

Open includes/functions.php

Find around line 2456:
  1. function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
  2. {
  3.     global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
  4.  
  5.     $err = '';

Add on next line:
  1.     $U_SEND_PASSWORD_URL = '/index.php?option=com_user&view=reset';
  2.     $U_RESEND_ACTIVATION_URL = '/index.php?option=com_user&view=reset';

Find around line 2661:
  1.        'U_SEND_PASSWORD'       => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '',
  2.         'U_RESEND_ACTIVATION'   => ($config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',

Replace with:
  1.         'U_SEND_PASSWORD'       => ($config['email_enable']) ? $U_SEND_PASSWORD_URL : '',
  2.         'U_RESEND_ACTIVATION'   => ($config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable']) ? $U_RESEND_ACTIVATION_URL : '',

Find around line 3558:
  1.     global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path;

Add on next line:
  1.     $U_REGISTER_URL = '/index.php?option=com_user&task=register';

Find around line 3706:
  1.        'U_REGISTER'            => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),

Replace with:
  1.         'U_REGISTER'            => $U_REGISTER_URL,    

Flush the phpbb cache and you should see your URL changes.
phpBB3 - RokBridge Specialist
No Support PM unless requested please.
Need help...please read this first!
Your signature is a great place for setup details...help us help you!
I agree with your analysis of your hallucination. -Scott Adams
User avatar
Joe Halleck
Global Moderator
Global Moderator
 
Posts: 3058
Location: Trying to help you...


Return to RokBridge

Who is online

Users browsing this forum: No registered users and 0 guests