Loading...
 
Features / Usability

Features / Usability


Assign custom module to registration page?

posts: 29
How can I assign a custom module to just the registration page (tiki-register.php)?
posts: 214

Hello sholzy,

I do not find an easy way to put a custom module on the registration page. Maybe someone else has a better way, but here are two options you could consider.

You could sort of do it by adding a registration user tracker. When there is a user tracker (User Tracker) the tracker's description is added at the top of the registration page, and you could specify that the description should be wiki parsed, and then use the module plugin to display your module in the description.
But that doesn't give you a lot of options for where you can put it. (I have not tested this, but I have put plugins into user tracker descriptions before successfully.)

And It would be nice if the registration page had been set up as a Section that you could specify under the module's visibility, but that isn't in the current code. Maybe it will be added some day.

If you are willing to modify the code, you could add section visibility support for the registration page. It would require you to edit 2 files and add a couple of lines to each of them.

First edit /lib/setup/sections.php
There is an array of "sections" created near the top and you can add a section for "register" to the array.

After the code:

Copy to clipboard
// tra('Newsletter') 'newsletters' => array( 'feature' => 'feature_newsletters', 'key' => 'nlId', 'objectType' => 'newsletter', ),


Add in a new array entry for register so it looks like:

Copy to clipboard
// tra('Newsletter') 'newsletters' => array( 'feature' => 'feature_newsletters', 'key' => 'nlId', 'objectType' => 'newsletter', ), 'register' => array( 'feature' => 'allowRegister', 'key' => '', 'objectType' => 'register', ),


Then edit /tiki-register.php and add 2 lines.

Before the line:

Copy to clipboard
require_once ('tiki-setup.php');

Add a new line so it looks like this:

Copy to clipboard
$section = 'register'; require_once ('tiki-setup.php');


And then before the lines:

Copy to clipboard
$smarty->assign('mid', 'tiki-register.tpl'); $smarty->display('tiki.tpl');


Add a new line so it looks like this:

Copy to clipboard
include_once ('tiki-section_options.php'); $smarty->assign('mid', 'tiki-register.tpl'); $smarty->display('tiki.tpl');


Now when you add the custom module, in the "Parameters" option, put "section=register" and your custom module will display on the Registration page.

Tom


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting