Subject: New hooks
Hook: cf.rebuild
Rationale: this allows for 'read-only' entries in the config file; furthermore, dynamic configuration options are possible where the standard configuration is preserved in the config file (example: parallel use of 'indep_page=[0|1]' designs).
unb_lib/common.lib.php:
Hook: page.logincontrol
Rationale: the current layout of the login control is static; within the hook function the layout can be entirely changed and the standard output can be suppressed if $params=[true|false], for instance.
unb_lib/common_out.lib.php:
Hook: page.showpath
Rationale: the current layout of the forum path and the thread/post heading is rather static; within the hook function everything can be put into global variables (and moved to other places if one uses a CMS) or redesigned, etc.
unb_lib/common_out.lib.php
The 'return control' is a rather ad-hoc solution that just works (for me). If there is a better one, I'd happily agree to changes (if they don't slash the functionality, of course
). For instance, output of the hook call may be considered to be returned (return $params/$data;).
Rationale: this allows for 'read-only' entries in the config file; furthermore, dynamic configuration options are possible where the standard configuration is preserved in the config file (example: parallel use of 'indep_page=[0|1]' designs).
unb_lib/common.lib.php:
Hook: page.logincontrol
Rationale: the current layout of the login control is static; within the hook function the layout can be entirely changed and the standard output can be suppressed if $params=[true|false], for instance.
unb_lib/common_out.lib.php:
- @@ -2471,6 +2472,10 @@
- 'key' => UnbUrlGetKey());
- }
- + UnbCallHook('page.logincontrol', $params);
- + return '';
- +
- $out = '';
- if ($UNB['LoginUserID'])
- {
Hook: page.showpath
Rationale: the current layout of the forum path and the thread/post heading is rather static; within the hook function everything can be put into global variables (and moved to other places if one uses a CMS) or redesigned, etc.
unb_lib/common_out.lib.php
- @@ -2513,6 +2518,11 @@
- {
- boolean) $bookmarked);
- + UnbCallHook('page.showpath', $data);
- + return '';
- +
- $forum = new IForum();
- $path = '';
- $fdesc = false; // forum description
). For instance, output of the hook call may be considered to be returned (return $params/$data;).
Alala, Alala, Gimme three wishes - CSS

jense
Show profile
Link to this post