| View previous topic :: View next topic |
| Author |
Message |
HexAngel
Joined: 22 Feb 2006 Posts: 90
|
Posted: Sun May 14, 2006 8:07 pm Post subject: phpBB2 Authentication Module :: Registration |
|
|
I'm using the phpbb2 authentication module and would like to add a "register" button to be displayed when no user is logged in.
What's the best way to go about this?
p. _________________ Home: eJournal
Thyme: Critical Events
Shop: Critical Graphics; Travel Photographs; |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Sun May 14, 2006 8:28 pm Post subject: |
|
|
Hi Hex,
1) Copy modules/today_link to modules/register
2) Rename modules/register/today_link.php to register.php
3) Edit modules/register/register_module.php
Search and replace 'today_link' with 'register'
change _TODAY_LINK_ to "Guest Registration"
add:
$_cal_modules['register']['guest_only'] = 1;
4) Modify modules/register/register.php to contain what ever content you want. |
|
| Back to top |
|
 |
HexAngel
Joined: 22 Feb 2006 Posts: 90
|
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Sun May 14, 2006 11:17 pm Post subject: |
|
|
| Also, enable it in Options -> Nav Bar |
|
| Back to top |
|
 |
HexAngel
Joined: 22 Feb 2006 Posts: 90
|
Posted: Mon May 15, 2006 3:35 am Post subject: |
|
|
That worked great. (Well, it will as soon as I design a registration page.) Thanks.
Now, what if instead I wanted it to appear on the horizontal nav bar adjacent to the "Log In" link, and not at all when the user is logged on?
p. _________________ Home: eJournal
Thyme: Critical Events
Shop: Critical Graphics; Travel Photographs; |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon May 15, 2006 11:26 am Post subject: |
|
|
Disable the module in Options -> Nav bar. Then in register_module.php change these:
$_cal_modules['register']['parents'][] = 'navbar';
$_cal_modules['register']['navbar'] = "register/register.php";
$_cal_modules['register']['priority'] = 0;
to:
$_cal_modules['register']['parents'][] = 'footer';
$_cal_modules['register']['include'] = "register/register.php";
$_cal_modules['register']['priority'] = 999;
You'll probably also want to add:
$_cal_modules['register']['hide_nav'] = 1;
What that will do is create a link at Thyme's footer called "Register". The link's text is set to the 'display_name' property of the module. When someone clicks on the link, the contents of modules/register/register.php will be displayed. Which is now (I assume) the registration link that used to be in the nav bar. So register.php is where you should place your registration page code. |
|
| Back to top |
|
 |
|